openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

plugin update guards #398

Closed XertroV closed 10 months ago

XertroV commented 10 months ago

Not sure exactly where this should go so figured here was best for the moment. It would be nice if a plugin (i.e., modless skids) could elect to not be unloaded outside of a map (excluding exiting the game or stopping the script engine I guess). The reason being that it's unsafe to undo the texture stuff while a map is loaded (for simplicity, the plugin only does those things while in the main menu). If someone clicks update plugins currently, and modless skids is updated, the unload function won't call the undo function (doing so would mean the game would crash loading a new map). But unloading in the menu is fine.

The end result then is that unloading the plugin in a map leaves the game in an altered state (until it's restarted).

So the feature request is some what for a plugin to elect the contexts in which it can be safely unloaded.

codecat commented 10 months ago

This is not a possible feature; your plugin should be able to handle cases where a plugin is unloaded at any time of the game. Not allowing a plugin to unload would be unsafe for a lot of reasons such as signature mode handling.

XertroV commented 10 months ago

will close this as not possible.