Object - originalfoo/Prison-Architect-API GitHub Wiki
Were you looking for [Object script global](Objects (Global)) or Objects category?
##Overview
The Object requirement prevents a Room from becoming active until the required object has been constructed within it.
##Syntax
The setting is used in materials.txt and must be within a BEGIN Room ... definition block. It can be used multiple times per definition block, once per required <objectId>.
BEGIN Requirement Type Object Id <objectId> END
Where <objectId> specifies an Object that the room requires.
It is also possible to specify an alternate object using the Alt setting:
BEGIN Requirement Type Object Id <objectId> Alt <altObjectId> END
Where <altObjectId> specifies an alternate object that can be used instead of <objectId>.
##Example
Taken from the [Library room](Library (Room)):
BEGIN Requirement Type Object Id LibraryBookshelf END
BEGIN Requirement Type Object Id SortingTable END
Taken from the [Cell room](Cell (Room)), an example of the Alt setting:
BEGIN Requirement Type Object Id Bed Alt BunkBed END
##Notes
The room will not become active unless all specified objects (or, optionally, their alternatives, where applicable) have been fully constructed within it.
A red warning indicator will appear over any rooms not meeting the requirement.
This setting also causes hidden objects to reappear in the "Objects" menu when the room is near the middle of the map window. The object will also have a white border around its icon in the "Objects" menu making it easier to find, regardless of whether it was previously hidden or not. Objects can be hidden from the menu by giving them the Properties RoomSpecific setting.
Room requirements are not currently exposed by the scripting API :(
##See Also
-
Requirement ... *AdjacentObject- room setting -
LikelyObject ... *- room setting -
PropertiesRoomSpecific- object setting
