Create building

Export

exports["doors_creator"]:createBuilding(buildingData)

Parameters

Name
Data Type
Description

buildingData

table

The building data to be added

buildingData Format

Field
Data Type
Description
Required

label

string

Name of the building

Yes

defaultState

integer

Default state: 1 = locked, 0 = unlocked

Yes

allowedJobs

table

Table of jobs allowed to access, with grades

No

allowedGangs

table

Table of gangs allowed to access, with grades

No

requiredItem

string

Item required to access

No

requiresJobAndItem

boolean

If true, both job and item are required

No

requiredCode

string

Code required to access

No

autoClosureSeconds

integer

Seconds after which doors auto-close

No

requiresIdentifier

boolean

If true, specific identifiers are allowed

No

allowedIdentifiers

table

Table of identifiers allowed to access

No

requiredItemRemoveOnUse

boolean

If true, the required item will be removed on use

No

Returns

Data Type
Description

integer

The building ID if successful, false otherwise

Example

Last updated

Was this helpful?