Doors Lua API: Difference between revisions
No edit summary |
No edit summary |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 20: | Line 20: | ||
=== SetNetwork === | === SetNetwork === | ||
<syntaxhighlight source lang="lua">Doors.SetNetwork( | <syntaxhighlight source lang="lua">Doors.SetNetwork(networkName)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 26: | Line 26: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | networkName || string | ||
|} | |} | ||
'''Description''': Sets the name of the network for the door system to use | '''Description''': Sets the name of the network for the door system to use | ||
Line 33: | Line 33: | ||
=== SetKeyOnDevice === | === SetKeyOnDevice === | ||
<syntaxhighlight source lang="lua">Doors.SetKeyOnDevice(keyName, | <syntaxhighlight source lang="lua">Doors.SetKeyOnDevice(keyName, deviceName)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 41: | Line 41: | ||
| keyName || string | | keyName || string | ||
|- | |- | ||
| | | deviceName || string | ||
|} | |} | ||
'''Description''': Sets a key as the current NFC file on a net device | '''Description''': Sets a key as the current NFC file on a net device | ||
Line 48: | Line 48: | ||
=== AssignKeyToCharacter === | === AssignKeyToCharacter === | ||
<syntaxhighlight source lang="lua">Doors.AssignKeyToCharacter(keyName, | <syntaxhighlight source lang="lua">Doors.AssignKeyToCharacter(keyName, character)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 56: | Line 56: | ||
| keyName || string | | keyName || string | ||
|- | |- | ||
| | | character || Lua Type | ||
|} | |} | ||
'''Description''': Adds a key to a characters inventory and sets it as the characters current NFC data | '''Description''': Adds a key to a characters inventory and sets it as the characters current NFC data | ||
'''Returns''': Nothing | |||
=== Open === | |||
<syntaxhighlight source lang="lua">Doors.Open(doorID)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| doorID || string | |||
|} | |||
'''Description''': Open the specified door. | |||
'''Returns''': Nothing | |||
'''Notes''': This call will not open a locked door. If the door is (or could potentially be) locked, call Unlock first to guarantee that it will open | |||
=== Close === | |||
<syntaxhighlight source lang="lua">Doors.Close(doorID)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| doorID || string | |||
|} | |||
'''Description''': close the specified door. | |||
'''Returns''': Nothing | |||
'''Notes''': This will close the door regardless of is someone is in the way. Please contact Semaeopus Health & Safety if this is a problem. | |||
=== Unlock === | |||
<syntaxhighlight source lang="lua">Doors.Unlock(doorID)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| doorID || string | |||
|} | |||
'''Description''': Unlock the specified door | |||
'''Returns''': Nothing | |||
=== Lock === | |||
<syntaxhighlight source lang="lua">Doors.Lock(doorID)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| doorID || string | |||
|} | |||
'''Description''': Lock the specified door | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
Line 66: | Line 120: | ||
This file is auto generated, please don't edit manually! | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': | '''Docs last hacked together on''': 29/08/2023 16:24 | ||
[[ | [[Category:Modding]][[Category:LuaAPI]] |
Latest revision as of 14:14, 29 August 2023
Doors
Description
API to control the logic of doors in the mission
Functions
SetZoneKeys
Doors.SetZoneKeys(zoneName, keyNames)
Expected parameter types
Name | Type |
---|---|
zoneName | string |
keyNames | Lua Table |
Description: Sets a key as unlocking a specific zone
Returns: Nothing
SetNetwork
Doors.SetNetwork(networkName)
Expected parameter types
Name | Type |
---|---|
networkName | string |
Description: Sets the name of the network for the door system to use
Returns: Nothing
SetKeyOnDevice
Doors.SetKeyOnDevice(keyName, deviceName)
Expected parameter types
Name | Type |
---|---|
keyName | string |
deviceName | string |
Description: Sets a key as the current NFC file on a net device
Returns: Nothing
AssignKeyToCharacter
Doors.AssignKeyToCharacter(keyName, character)
Expected parameter types
Name | Type |
---|---|
keyName | string |
character | Lua Type |
Description: Adds a key to a characters inventory and sets it as the characters current NFC data
Returns: Nothing
Open
Doors.Open(doorID)
Expected parameter types
Name | Type |
---|---|
doorID | string |
Description: Open the specified door.
Returns: Nothing
Notes: This call will not open a locked door. If the door is (or could potentially be) locked, call Unlock first to guarantee that it will open
Close
Doors.Close(doorID)
Expected parameter types
Name | Type |
---|---|
doorID | string |
Description: close the specified door.
Returns: Nothing
Notes: This will close the door regardless of is someone is in the way. Please contact Semaeopus Health & Safety if this is a problem.
Unlock
Doors.Unlock(doorID)
Expected parameter types
Name | Type |
---|---|
doorID | string |
Description: Unlock the specified door
Returns: Nothing
Lock
Doors.Lock(doorID)
Expected parameter types
Name | Type |
---|---|
doorID | string |
Description: Lock the specified door
Returns: Nothing
This file is auto generated, please don't edit manually!
Docs last hacked together on: 29/08/2023 16:24