thepeacockproject / Peacock

The Peacock Project is a HITMAN™ World of Assassination trilogy server replacement.
https://thepeacockproject.org
GNU Affero General Public License v3.0
367 stars 57 forks source link

revert(compat): Reintroduce smf checks in controller #416

Closed Yanrishatum closed 6 months ago

Yanrishatum commented 6 months ago

Adds back the addClientSideModDependency and modIsInstalled to controller instance with an explicit deprecation warning in console and an path to intended API.

Reasoning provided in Discord;

Imma be honest, "months" is a very small timeframe and the way it currently handles breaking change is not very obvious to plugin developers. I'm all for better API, but breaking changes like that seem excessive. My proposal woudl be to bring those back with one of:

  • Log a warning about deprecation (and show intended API), but retain bad behavior.
  • Log an error about deprecation and always return not installed
  • Throw an error with more descriptive message pointing at the right API.

Not saying to keep it indefinitely, but at least provide a better window to spot the deprecation issue.