Limiting building does not work
Hello when I have set max turret 10 and I can build as much as I want.
"Not work" is huge explanation. What is your cofig? Where and how you are building? Video, screenshots?

Let me enrich that with a bit more detail...

I added...

 if (limit > 0 || limit == -1)
                {
                    var entities = player.GetBuildingPrivilege()?.GetBuilding()?.decayEntities;
                    if (entities != null)
                    {
                        foreach(var e in entities)
                        {
                            Puts("DEBUG: " + e.PrefabName);
                        }

returns:

[Entity Limit] DEBUG: assets/prefabs/building core/foundation/foundation.prefab
[Entity Limit] DEBUG: assets/prefabs/building core/foundation/foundation.prefab
[Entity Limit] DEBUG: assets/prefabs/building core/foundation/foundation.prefab
[Entity Limit] DEBUG: assets/prefabs/building core/foundation/foundation.prefab
[Entity Limit] DEBUG: assets/prefabs/deployable/tool cupboard/cupboard.tool.deployed.prefab

I am debugging this a bit further and let you know, when I found the issue... (seems "decayEntities" does not contain all things anymore...) 

EDIT_1:  it seems to be only affecting select items like IOEntity (AutoTurret, CeilingLight, SearchLight, SAMsite...), and a couple of non-decay MISC Items like candles, graveyard fences etc...  Regular "DecayEntities" like tables, rugs, planters etc. work.

EDIT_2: yep, I couldn't find a usable way to get all IOEntities of a Building currently (unless you want to do some weird VIS checks that would be very laggy, I would suggest just mentioning that in the Documentation to NOT use Building-Based limits for Electro stuff. (It's still useful for things like Planters etc. to prevent "Team-Spamming" of items)

Having the same problem. Works with all the other items. Except the IOEntity items

l6uHVI5G2RhNnCq.png RocketMyrr

Having the same problem. Works with all the other items. Except the IOEntity items

IO Entities is no longer part of building (in game code) so its a bit more complicated to get all objects in base. Maybe in near future i will handle into that

o7lIOHKqmejFC1u.png Orange

IO Entities is no longer part of building (in game code) so its a bit more complicated to get all objects in base. Maybe in near future i will handle into that

Haven't looked into the code, but maybe upon scanning the items initially you could also store the id of the dominant privilege TC (if existing). 

This might need a lot of extra code for when the TC gets killed and replaced... (but that's already an issue, when people remove TC to place items to their item limit > Building limit and then replace it...)