MysticJay / ZasoItems.CE

Take Zaso Items forward to be used with IITC-CE
9 stars 5 forks source link

[Layers profiles] Errors with some layers in profile #7

Open acamara7es opened 1 year ago

acamara7es commented 1 year ago

When I try to activate a profile created with this plugin an error appears indicating "plugin not installed or actived". However the layers affected by this error are included in IITC by default so it shouldn't be necessary to use any plugin. The following images shows the layers included in the profile and the error showed when hover the mouse over red text.

image image

I'm not sure about the base layer problem, because I tried it with OSM baselayer plugin and it still shows the same error, but the problem with the "Scouting" and "Battle" layers may be related to the introduction of these layers in intel after the last commit of this plugin.

I use IITC-CE version 0.34.0 with Tampermonkey on Google Chrome

ajaywillis commented 1 year ago

In TamperMonkey make sure that the bookmarks plugin is loaded before the layers-profiles plugin. Not sure why that matters but it fixed the issue for me.

On mobile I had to comment out the first getAll() call in setup and let the hook run it. Even then sometimes if fails.

var setup = function(){
    if(window.isSmartphone()){}

    window.plugin.layersProfiles.ui.setupCSS();
    window.plugin.layersProfiles.storage.check();
    window.plugin.layersProfiles.ui.addControl();

    //window.plugin.layersProfiles.layer.getAll();
    window.addHook('iitcLoaded', window.plugin.layersProfiles.layer.getAll);
}