Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Heavy command overhaul #538

Closed Olink closed 10 years ago

Olink commented 11 years ago

In that it touches each command handler and will be a nightmare commit :(

Commands currently are a little awkward for other plugins, I suggest making two hooks, PreCommand and PostCommand, remove OnCommand, and change the command delegates to have bool return values. This allows plugins to cancel commands, do something on success of a command, etc.

Ideally this will be implemented pre 4.1 (next week) but I dont think its that important since I think a lot of stuff is going to miss the release date (refactoring, ban database, etc)

stevenh commented 11 years ago

Sounds good Olink :)

tylerjwatson commented 11 years ago

I think it's a great time to bring about a paradigm shift about TShock commands since Terraria 1.2 and the impending update is going to break everything existing anyway.

I think the bool returner will be a lot simpler than the pre/post events, and would bring transparency to commands for plugin developers that could easily be ignored; nothing special about a bool, just a simple value type that could be ignored.

(Obviously this is biased as I'm a plugin author)

hakusaro commented 11 years ago

@givemeafuckingusername nice username >.<

Lucas Nicodemus via Google Nexus 4 On Sep 25, 2013 2:34 AM, "givemeafuckingusername" notifications@github.com wrote:

I think it's a great time to bring about a paradigm shift about TShock commands since Terraria 1.2 and the impending update is going to break everything existing anyway.

I think the bool returner will be a lot simpler than the pre/post events, and would bring transparency to commands for plugin developers that could easily be ignored; nothing special about a bool, just a simple value type that could be ignored.

(Obviously this is biased as I'm a plugin author)

— Reply to this email directly or view it on GitHubhttps://github.com/NyxStudios/TShock/issues/538#issuecomment-25069917 .

tylerjwatson commented 11 years ago

Haha yeah, spent about 10 minutws typing in usernames and got over it, the first one that worked is gimmeafuckingusername.

I changed it, anyway.