larsiusprime / polymod

Atomic modding framework for Haxe
MIT License
162 stars 62 forks source link

[ENHANCEMENT] Add a Polymod.desactivate #77

Closed Cheemsandfriends closed 2 years ago

Cheemsandfriends commented 2 years ago

Imagine if you have a mod menu selection for ppl that want to load their mods. Well, It can be easily done with some coding. But What if you want to desactivate them? There should be a Polymod.desactivate or Polymod.deactivate For a modLists-menu-friendly ecosystem lol

EliteMasterEric commented 2 years ago

This currently isn't implemented due to aggressive caching on the part of OpenFL, see #38 for more details.

I will leave this issue up since I have been investigating possible means to clear said cache.

In the meantime, I suggest using the solution in the linked issue (close the application and reopen it to reload mods).

Cheemsandfriends commented 2 years ago

This currently isn't implemented due to aggressive caching on the part of OpenFL, see #38 for more details.

I will leave this issue up since I have been investigating possible means to clear said cache.

In the meantime, I suggest using the solution in the linked issue (close the application and reopen it to reload mods).

Wouldn't be easy with the Assets.clear() thing of the openfl.utils.Assets import? or do you mean like calling that without openfl? or some FlxG.[Asset Thing, like sound, bitmap or stuff].clear Should exist I think. (Sorry if I'm being rude, I'm thinking of possible solutions lol)

EliteMasterEric commented 2 years ago

Polymod.unloadMod(id) was added in version 1.4.2. Note that this is functionally the same as calling Polymod.init with a different modlist.