NumSlots - originalfoo/Prison-Architect-API GitHub Wiki
##Overview
The NumSlots setting tells the base game how many slots it can use on your object.
##Syntax
This optional setting is used in materials.txt and must be within a BEGIN Object ... definition block. It can be used only once per definition block.
NumSlots <number>
Where <number> is an integer between 0 (no slots) and 8 (eight slots, with indexes from 0 to 7).
##Example
NumSlots 4
##Scripting
It's not possible to access the setting from scripts, but you can access slots (and if you get the object within them you can determine the position and orientation of the slot).
Scripts ignore the NumSlots setting and can use all 8 slots.
Note: Using slots on Entities is unreliable and may crash the game.
##Notes
A slot is like a 'docking port' on your object that other objects can be connected to.
When an object is connected to a slot, it's map position and orientation will be set to the marker associated with the slot.
For example, a FireEngine has 6 slots. When a Fireman is put in a slot, he will be moved to the associated marker on the FireEngine and will face forwards (south) due to the orientation of that marker.
If the object that provides the slots moves, anything in the slots will move with it.
If the object is rotated (its orientation changed) then the game will update the markers (slot position and orientation) automatically.
Defining markers is different on where your sprites are coming from:
- Using base game sprites from
objects.pngorpeople.png?
Seeobjects.spritebank - Markers - Using custom
sprites.png?
SeeMarker
##See Also