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 379 forks source link

Region does not protect Herbs and the wall/fence behind it. #1334

Open tanpro260196 opened 7 years ago

tanpro260196 commented 7 years ago

If you use clay pot or Planter Box inside a protected Region. The seeds or the wild flower grow from them are not protected by the Region. The same thing goes for the wall behind the seeds/flower.

I'm using the unstable build on Nov. 24. A work around is to use the Housing District plugin to set House over the same Region.

ivanbiljan commented 7 years ago

Can't reproduce in the latest version of Mintaka.

tanpro260196 commented 7 years ago

Test again with lastest clean Mintaka, it's still exist.

tanpro260196 commented 7 years ago

Everything else in the region is still being protected. Even the planter box, only the herb grow on it is effected.

QuiCM commented 7 years ago

This is caused by the config option AllowCutTilesAndBreakables. The issue likely arises from this line: https://github.com/NyxStudios/TShock/blob/general-devel/TShockAPI/GetDataHandlers.cs#L2194, where cut tiles and breakables are checked before region permissions.

Possible solutions:

tanpro260196 commented 7 years ago

I think region should protect the herbs as well, not just the wall.

QuiCM commented 7 years ago

Regions do protect herbs, just not if you set AllowCutTilesAndBreakables to true in your config. To fix this change "AllowCutTilesAndBreakables": true to "AllowCutTilesAndBreakables": false

hakusaro commented 7 years ago

@WhiteXZ we should really ask people for their configs, or have TShock throw only the delta from defaults out so we can see what they have set. How you even tracked this down is beyond me.

AxisKriel commented 7 years ago

The config option exists solely because it also includes vines, which should be breakable even if protected in most situations or you'll get randomly spammed with region protection messages when swinging a weapon nearby, which gets annoying.

We should focus this issue on getting the protection to work as intended; something else may be done about the OP's request (such as discussing whether or not flowers should be on the list of breakables or not).

Kojirremer commented 7 years ago

It is as Enerdy says. Swinging a sword... hell, even using a grappling hook on a vine-infested, full of tall grass area causes massive spam of region protect messages and unbelievably annoying permanent grass-cutting sound, not to mention grass and vines dissapearing and reappearing at the speed of sound while generating an endless stream of grass particles. Sure, it is client-sided, but hell if I want to play while hearing an eternal loop of grass-cutting sfx just because I am grappling to escape a zombie.

Also, I believe flowers from pots and planters (not wild ones if possible, but if not why bother, protect all) should be protected, as they count as furniture one would like to keep untouched to, for instance, make your spawn point 1% prettier. I've received complaints of people building houses with greenhouses that eventually got griefed. I could only say "Sorry". :P

Kirbyarm commented 7 years ago

A cooldown on received protected region messages may help with the spamming issue quite a bit.

QuiCM commented 7 years ago

I believe there already is a cooldown - we'll look into implementing an elegant solution such that flowers/vines may be cut but not herbs, pots, walls, etc. Added to my list of things to do on Sunday

Kojirremer commented 4 years ago

Well, since we were remembering about this issue and I just confirmed it's still there in latest prerelease, I'll just add a couple pics to make it more pretty (and to revive it). 20200602005336_1 20200602005509_1 20200602005759_1 First image shows that I was currently in superadmin mode when I created the region. Second one shows the created region, its boundaries and protected status. It's the only region in the world, so the Z-index doesn't matter. Last pic shows a guest harvesting the protected herbs. This, as stated above, is due to the "AllowCutTilesAndBreakables" config option being set to TRUE.

Just for reference, this was what I wrote on Discord:

When planting herbs on pots within protected regions, using the option to allow pots and grass to be destroyed on protected regions also allows herbs planted on clay pots and planters to be harvested by anyone. That means they can be griefed/stolen. Would it be possible to keep that config option from affecting planter herbs?(editado)