My idea is a placement limit category prototype that has a field to define if it's per surface, another for per force, and finally a base amount allowed.Xorimuth wrote:1 per surface per force? or just globally per surface? 1 per prototype or 1 per type? Which object should store all those runtime modifiers be stored? How would that combine with techs that increase the limit? How should those techs be defined?
With this prototype, the CargoLandingPadLimitModifier would be replaced with a PlacementLimitCategoryModifier that refers to them by prototype name.
The EntityPrototypes themselves would opt into a category (or maybe possibly multiple?) via a new field just like RecipePrototype::category or CraftingMachinePrototype::crafting_categories, allowing modders to manually control whether it's by type, prototype, or even more complex groupings; like those 3 assembling machines all count towards the same limit as they're the same 'type' of building in canon.
To expand on the idea of an entity belonging to multiple placement limit categories, I imagine that it would increment each category when placed down, and reject placement if any one of them is full.