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

Request tile editing on protected area to give item back #825

Closed tchomphoochan closed 10 years ago

tchomphoochan commented 10 years ago

Yes, as usually, placing anything in protected area will result in tile disappeared, destroyed, consumed. That might be a problem if server is SSC and tile placed is precious one. This also includes editable tile, such as Weapon Rack. Many of players accidently right click on Weapon Rack so their items are consumed. So I request here, if possible and someone will do it, please make it that it gives player back the item, at least just Weapon Rack.

TL;DR : Give item back on placing tile in protected area

Optional : For SSC enabled server, there should be a way to prevent noob players who don't know they can't place Piggy Bank/Safe to buy it and place it then just complain later. Maybe on place = money give back? Probably... Or an inventory check if piggy bank has come inside.

Olink commented 10 years ago

1) Money is handled client side. 2) Clients can spawn any item, no reason to give them coins. 3) If you dont understand the concept of Server Side Characters, and buy a piggy bank, you deserve to lose your coins.

tchomphoochan commented 10 years ago

1) Wait, what? I'm talking about spawning item which is COINS right at player. Isn't that server did it? I didn't talk about controlling inventory. 2) For SSC enabled server and for sake of non-cheaters 3) I know it that they lost their coins on placing Piggy Bank/Safe in SSC server, that's why I wanted it to be helped, at least for somebody don't know. 4) All I'm talking about, as the main reason, is about placing tiles or modifying tiles (Weapon Racks for example) might get them lost their items. Especially on Weapon Racks where player might right click at rack and, tadah! Your weapon is lost!

Also, fine, at least I've got answer here, thanks. Closed.

Olink commented 10 years ago

You seem a little butthurt. All I answered were your questions regarding piggy banks in SSC. If you think that means you can throw a hissyfit and tempertantrums......gg

IraJacobs commented 10 years ago

There were some needlessly blunt and harsh responses there. They seem like valid concerns/ideas to me!

On Fri, Jul 18, 2014 at 9:24 AM, Zack notifications@github.com wrote:

Reopened #825 https://github.com/NyxStudios/TShock/issues/825.

— Reply to this email directly or view it on GitHub https://github.com/NyxStudios/TShock/issues/825#event-143089899.

QuiCM commented 10 years ago

I agree with weapon racks, but piggybanks and safes are up to the server owner to deal with. As for returning coins to people for losing blocks... Natural blocks are worth nothing in-game, and as Olink stated, clients can spawn anything they want anyway.

Olink commented 10 years ago

I thought the fact that I specifically addressed SSC and Piggy banks and didn't close this issue was clear enough that I thought the idea of returning items when placing in protected regions was ok. I specifically called out SSC and piggy banks because those have serious security concerns and potential roadblocks that make the features not worth implementing. We have no control on any operation that a client does that results in them losing money, which means we cant stop the client from buying an item. Hence we can't stop them from buying a piggy bank. There is no way for tshock to know that they bought said item. As for wasting their money once they place a piggybank, their money was wasted the moment they bought the bank. We have no reason to give a user money when we consume their bank because their is no guarantee that the bank was procured legally, or with their money. They could have been given it.

tchomphoochan commented 10 years ago

Okay... then. Ya, I don't really think much about Piggy Bank and Safe. At least I warned them. But main problem is Weapon Rack, any help out there huh?

meticulou commented 10 years ago

Its not visible enough when something is protected, so the way most people will test to see if its protected is to simply try placing something, usually resulting in a few lost blocks or items. The weapon rack definitely loses the most valuable items, but I don't think a single dirt block needs to be lost to this. Please return all the blocks and items being placed in protected areas, thanks.

AxisKriel commented 10 years ago

About having every item return when placed in a protected region, this is quite possible and easy to implement. The question lies in whether should it be implemented in tshock itself. I can see someone making a plugin out of this, which could be way more potent.

meticulou commented 10 years ago

would kind of prefer just a simple boolean in a config file or something

dark22 commented 10 years ago

Is there any way around the problem with "Weapon Rack" through plugins? Since opened a forum thread and was locked, but did not know the existence of this link here, but reading here I have not seen a solution. I would love that weapons were not consumed by "Weapon Rack" novice players really do not understand how a protected area works. Thank for all.

Olink commented 10 years ago

Yes.

Olink commented 10 years ago

Having investigated this issue, it would be quite a bit of work, as this is not as trivial as it sounds. The client interprets the consumption of the item and the placement of the tile, all the server knows is that a tile was placed. We have no way of returning the item that created the tile.

Mannequins and Racks are the same, the client interprets some values from what you place on it and send it to the server, the server has no way of determining the weapon/armor that was used to put on the item. While it is likely possible to do this, the amount of effort and work that is required from someone to investigate is outside the scope of this projects current status as a nonprofit open source project. Feel free to contribute a solution that provides an intuitive solution to this.

IraJacobs commented 10 years ago

What about disallowing Mannequins or Racks to be placed in restricted areas? Or requiring a different group permission for it?

On Sat, Aug 2, 2014 at 10:26 AM, Zack notifications@github.com wrote:

Having investigated this issue, it would be quite a bit of work, as this is not as trivial as it sounds. The client interprets the consumption of the item and the placement of the tile, all the server knows is that a tile was placed. We have no way of returning the item that created the tile.

Mannequins and Racks are the same, the client interprets some values from what you place on it and send it to the server, the server has no way of determining the weapon/armor that was used to put on the item. While it is likely possible to do this, the amount of effort and work that is required from someone to investigate is outside the scope of this projects current status as a nonprofit open source project. Feel free to contribute a solution that provides an intuitive solution to this.

— Reply to this email directly or view it on GitHub https://github.com/NyxStudios/TShock/issues/825#issuecomment-50964150.

AxisKriel commented 10 years ago

IraJacobs, we cannot "stop" the client from placing it, regardless. It would still consume their item, working pretty much as it does right now.

I might map tiles to their items tomorrow. If this can be done fully, then implementing this as a side plugin might be possible. Would be nice if we could get a ProtectedRegionPlacement event, but I doubt that would happen as it is too specific. It is still easily caught with a few checks though. The investigation is what takes the most effort.

IraJacobs commented 10 years ago

Yes but if the Mannequin/Rack can't be placed and gets consumed, that's a lot less worrisome than a weapon/armor!

On Sat, Aug 2, 2014 at 11:42 PM, Rodrigo notifications@github.com wrote:

IraJacobs, we cannot "stop" the client from placing it, regardless. It would still consume their item, working pretty much as it does right now.

I might map tiles to their items tomorrow. If this can be done fully, then implementing this as a side plugin might be possible. Would be nice if we could get a ProtectedRegionPlacement event, but I doubt that would happen as it is too specific. It is still easily caught with a few checks though. The investigation is what takes the most effort.

— Reply to this email directly or view it on GitHub https://github.com/NyxStudios/TShock/issues/825#issuecomment-50981265.

Olink commented 10 years ago

no.