Functions
Note: This documentation lists all exported functions (
exports
) in the codebase.
Client Side
getCurrentDoor()
Returns the current door ID and its lock state for the player.
openEditorWithDefaultObject()
Opens the building editor with a default object.
openEditorSpecial(data)
Opens the building editor with a special object (e.g., for special models).
Important:
data
must contain thename
of the item that is linked in the config to a special model.
startUpgrading()
Starts the upgrade mode for structures.
checkDistToBuildTc()
Checks if the player is far enough from other TCs to build a new one.
getTscData()
Returns all currently loaded TCs (tool cupboards) data.
getObjectInTc(id)
Returns all objects within the radius of a given TC.
getClosestTc()
Returns the closest TC ID and distance to the player.
getCurrentTcId()
Returns the current TC ID the player is in.
checkAuth(id)
Checks if the player is authorized in the given TC.
setInBuildingZone(bool)
Sets the inBuildingZone variable to the given boolean.
setInNoBuildingZone(bool)
Sets the inNoBuildingZone variable to the given boolean.
Server Side
getTcData(id)
Returns upkeep and status data for a given TC (tool cupboard).
checkAuth(source, bid)
Checks if the player (source) is authorized in the given TC.
getCurrentTcId(source)
Returns the current TC ID for the given player.
setHealthObject(uid, hp)
Sets the health of an object by its unique ID.
getObjects()
Returns all currently loaded building objects.
Last updated