Pryaxis / TShock

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

Added /ssc reset command #2929

Closed RenderBr closed 1 year ago

RenderBr commented 1 year ago

This pull request adds one very simple command: /ssc reset. Obviously, this will be the "ssc" manager, so other subcommands are perfectly welcome. For now, it only serves one function:

You may utilize the command in a few ways.

Firstly, /ssc reset *. This will reset all player's inventories, server-wide. Anyone with the ssc bypass permission will be, of course bypassed.

Then, you may either use /ssc reset [player name], which will reset a currently online player, OR instead of a player name you may use an account name, and it will reset the account's inventory despite whether or not the user is online. Obviously, the ssc bypass permission is taken into account here as well.

I think this command will be highly beneficial for... practically anyone utilizing SSC. In years past, we had to rely on plugins created by others, when the actual functionality for everything that is done here was already built into TShock, it just wasn't being utilized in this way. This will make the server administrator user experience much better. Obviously, I am also welcome to any feedback or changes that those of you reviewing would want to make.

I also removed some unused using directives, along with cleaned up some other areas of Commands.cs. If these changes are not welcome, feel free to remove them in the review.

sgkoishi commented 1 year ago

This will reset everybody to the same looking of default style and colour, just like the Guide. 🤔

RenderBr commented 1 year ago

This will reset everybody to the same looking of default style and colour, just like the Guide. 🤔

I'm not sure what you mean, you can see in this video the vanity is not reset? The character remains with his purple hair, and the command functions exactly as I have explained. Could you elaborate possibly?

https://user-images.githubusercontent.com/24498058/224434856-efc8054d-b592-4910-815c-8f3c68f7a7fe.mp4

sgkoishi commented 1 year ago

My bad, never mind - it was caused by another issue not related to the reset command.

punchready commented 1 year ago

Normally you wouldn't do all these code style changes in a PR that is not about changing code style, especially if the changes aren't consistent across the whole project... maybe revert them and instead do another PR with code cleanup applied to the whole project?

hakusaro commented 1 year ago

I agree — the code style changes really make the diff incomprehensible.

RenderBr commented 1 year ago

I'm good. Do as you wish with this. Close it, don't close it, let it sit in PR limbo for the next twelve months. 🤷‍♂️

I get the fact this PR wasn't designated as a code cleanup but I also don't see how that is an issue either considering how minor the changes actually were. w/e

drunderscore commented 1 year ago

Don't act like you're doing us a favor -- you're being lazy & ignorant for choosing to hold up a PR because you don't want to properly split commits up.

It is as simple as git add -p

RenderBr commented 1 year ago

Don't act like you're doing us a favor -- you're being lazy & ignorant for choosing to hold up a PR because you don't want to properly split commits up.

It is as simple as git add -p

Have your opinions. I will be using this change personally and simply thought it wouldn't hurt to submit it here. The fact that you are acting the way you are speaks volumes. I'm sorry your morning isn't going well.

ghost commented 1 year ago

lmao yall crying about legacy code base work on orion

sgkoishi commented 1 year ago

Please note that even if you ignore the style change, this is still a bug to fix - or say, the ssc reset all is not functioning as expected in most cases.

RenderBr commented 1 year ago

Please note that even if you ignore the style change, this is still a bug to fix - or say, the ssc reset all is not functioning as expected in most cases.

This is a valid statement, and is frankly a testament to my limited knowledge of TShock. Regardless it seems this PR is thrown out the window anyway, so it's whatever.

hakusaro commented 1 year ago

Obviously, I am also welcome to any feedback or changes that those of you reviewing would want to make.

I also removed some unused using directives, along with cleaned up some other areas of Commands.cs.

If these changes are not welcome, feel free to remove them in the review.

If you feel like my comments were too heavy-handed, please let me know. I don’t personally think I was too heavy-handed. I simply added an agreeing comment — not even a review — from an opinion from another contributor. My use of the term “incomprehensible” probably was inaccurate — however it was incomprehensible when viewing the diff on a phone, in order to try to expedite the review process.

I have hidden various comments on this PR. If you wish to resurrect this PR, please feel free to.

hakusaro commented 1 year ago

Though we have a license to use your work, work from contributors who have been irritated with us has caused us significant strife in the past. Therefore, we won’t accept this contribution without your explicit permission, despite the license permitting it.

RenderBr commented 1 year ago

Though we have a license to use your work, work from contributors who have been irritated with us has caused us significant strife in the past. Therefore, we won’t accept this contribution without your explicit permission, despite the license permitting it.

I appreciate the response and no, nothing you said made me feel irritated. You can use this PR in whatever way you'd like. That's the whole reason I put it here.

I feel I must apologize as well as I somewhat egged on the situation especially near the end. My remarks were not meant to be hurtful, I genuinely just have a hard time articulating my tone on the internet.