eXpansionPluginPack / eXpansion2

The next generation server controller for maniaplanet using symfony components
http://mp-expansion.com/
MIT License
7 stars 3 forks source link

[RFC][Core]Prevent all manialinks to be hidden at startup #381

Open oliverde8 opened 5 years ago

oliverde8 commented 5 years ago

Is your feature request related to a problem? Please describe. If eXpansion is used with a second controller, and used only for command lines, at startup expansion hide all manialinls and therefore also those of any other controller that might be running : https://github.com/eXpansionPluginPack/eXpansion2/blob/master/src/eXpansion/Framework/Core/Plugins/GuiHandler.php#L95

We need to do this in order for eXpansion to remove any leftovers from a previous crash, or for another controller that crashed previously.

Describe the solution you'd like At startup, eXpansion is aware of all "services" and therefore if a ManialinkFactory exists it means that manialink functionality is present and that therefore that all manianlinks should be hidden.

We could use data providers for this as well,

Describe alternatives you've considered Alternatively anyone that wishes to disable it could write their own module that replaces the existing service. This is possible today. But this wrongly configured would mean that it is possible for commands that should display manialinks to exist but not function properly.

Additional context Need to think if the first solution could be easily implemented without introducing compatibility issues with existing code? Or if it does should we ignore them as we haven't released yet? Or wait and do it for a later major release ?