-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate legacy functions #10
Comments
Which ones do you have in mind? Off the top of my head the console IO classes are stubs in the RocketMod code now *and would be good to mark obsolete. |
Most of the events which are only wrappers now. https://github.com/SmartlyDressedGames/RocketMod/blob/master/Rocket.Unturned/Events/UnturnedPlayerEvents.cs Redunant wrappre classes like these: Maybe even the whole UnturnedPlayer class, as it just provides shortcuts and causes bugs (for example, various NRE's when the player is offline): Console IO classes could be removed completely as they were only used internally and were not meant for plugins. The launcher should also be removed imo. RocketMod should only focus on its core, which is loading plugins, handling commands, managing configurations, etc. It should not create wrappers for everything. |
If there is one thing I have learned these past years with plugin devs, it is that just because something should not be used does not mean it is not being used. :) I agree with you about RocketMod's core functionality, and that wrappers for everything is undesirable. That said, I am not sure about going so far as to make huge components like While they are essentially wrappers, it seems to me that these examples do provide at least some value for the meantime. For example:
Leaving this issue open for further discussion and because it ideally will be gradually addressed. |
In my experience, UnturnedPlayer is quite convenient. It provides a lot of shortcuts that I mostly use for getting the player's Steam64 and a player's different names instead of using player.channel.owner.blah.blah. It's also really handy for parsing player names/ids. |
Rocket OnPlayerConnected event is very useful, because if you try to give items in Provider.EnemyConnected event you'll get null reference exeption because inventory initializes in Start() |
Many events and methods used in RocketMod are no longer required and have been replaced by official implementations. I suggest to add a Obsolete attribute with a description that refers to the official implementation.
The text was updated successfully, but these errors were encountered: