World.Capacity - originalfoo/Prison-Architect-API GitHub Wiki
World.Capacity
Returns a table security level names linked to the number of cells available in that sector. This number may be incorrect on level loading until the simulation has caught up with the world state. N.B. This is a cfunction call, which can be expensive. Try not to call it every tick. Cache the result and only update it every now and then.
Returns: A table listing security level names to the number of cells of that security category.