TShock icon indicating copy to clipboard operation
TShock copied to clipboard

Provide a way for plugins to override TShock SSC

Open ZakFahey opened this issue 1 year ago • 5 comments

Add TShock.UseSSCInventory, which can be set to false by another plugin on initialization to override TShock's SSC implementation while keeping SSC on. This fixes the use case where you want to be able to override players' inventories from the server, but you don't want to use TShock's SSC system or force players to stay logged in.

Context: this functionality is in the internal Penguin Games server fork of TShock that we have, but I'm trying to merge everything from there upstream because I don't want to have to deal with maintaining a fork. Especially with 1.4.5 coming out any day now, I don't want to create more work for myself. We use SSC but allow logged-out users to play, and I'm sure that that's the case for other public servers as well.

Not all instances of Main.ServerSideCharacter were replaced because this is the code our server uses, and it works. I could understand wanting to change most if not all instances of it, though.

ZakFahey avatar Feb 18 '24 19:02 ZakFahey