I don't think there's much to be done with some of the work arounds I've seen players figure out, but maybe there's a way?
First, I found that when building limits were set, players could just delete the TC and place as many limited items as they wanted and then put the TC back. Looking at the code, not sure why it would allow it since the first check is if (cupboard != null), but I made the global limit for the item as 1, so people can place 1 item without a TC, but then place more with a TC.
However, what I've noticed now, is that people can make a building, place the limit number down. Remove the TC, build an extension, delete a gap so its a new building, add up to the building limit, and then reconnect the two sections and have one base again. So I don't really know if there's a way around this. My thought was you would have a check that runs when a building block is placed, and then recount the items for that building, and if there are too many items, randomly delete the amount that are over the limit (kind of like how if you connect two TCs it will auto break one of them). But that might be too much to do.
Lastly, would there be a way to group certain items together, or to use wildcards in the prefab name to group things together toward a limit? i.e. all of this stems from the Large.Planter. And now they added in the new frontier and railway planters. Maybe instead of checking for the full prefab name, it just does a .Contains() search for the what's listed in the config, so you could put "planter" in the config, then all prefabs containing planter would be contained to the same limit?
Players figuring out work arounds & wildcard/partial prefab name suggestionSuggestion
Tried a wildcard system, just could not get it to work. I don't have the free time I used to have to play with the code. If I get a chance I'll see if I can add it in, but https://codefling.com/plugins/limit-entities seems to have the features you're after. If you do consider the paid option, ask MON@H if this bypassing is an issue with their plugin or not. Can tell them I recommended their plugin.
No worries. I can try to look into the code myself when I get free time too. Just thought I'd start here first. I did see the one on codefling too. If I figure stuff out, I'll report back!
Yeah, not really getting much chance to sit and play with code. I work in the solar industry in a country with major power grid stability issues, so I've been run off my feet since June, with no end in sight.
TheFriendlyChap
I work in the solar industry...
Ask for more money. 😘