TShock icon indicating copy to clipboard operation
TShock copied to clipboard

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

Open tanpro260196 opened this issue 8 years ago • 12 comments
trafficstars

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.

tanpro260196 avatar Dec 05 '16 10:12 tanpro260196

Can't reproduce in the latest version of Mintaka.

ivanbiljan avatar Dec 11 '16 15:12 ivanbiljan

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

  • Try to use planter box and grow their respective seeds in their.
  • Wait for them to grow.
  • Set a region around that area.
  • Use a different account and try to harvest them (they will be cut out like usual).
  • Now try to use hammer on the wall behind a herb (must be behind a herb, other part have no effect). The wall will come out like there is no region protecting them.

tanpro260196 avatar Dec 15 '16 03:12 tanpro260196

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

tanpro260196 avatar Dec 15 '16 03:12 tanpro260196

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:

  • remove the config option. I'm not sure why it exists
  • resolve the code flow so that the plants in the pot may be cut, but walls etc will not

QuiCM avatar Dec 15 '16 05:12 QuiCM

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

tanpro260196 avatar Dec 15 '16 05:12 tanpro260196

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

QuiCM avatar Dec 15 '16 05:12 QuiCM

@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.

hakusaro avatar Dec 15 '16 06:12 hakusaro

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).

AxisKriel avatar Dec 15 '16 08:12 AxisKriel

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

Kojirremer avatar Dec 16 '16 01:12 Kojirremer

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

Kirbyarm avatar Dec 16 '16 10:12 Kirbyarm

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

QuiCM avatar Dec 16 '16 11:12 QuiCM

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)

Kojirremer avatar Jun 02 '20 05:06 Kojirremer