Module DoorUnit
A door that can be opened or closed.
Applies to doors, hatches, gates, etc.
Element class: DoorUnit
Extends: Element > ElementWithState > ElementWithToggle
Functions
open () | Open the door. |
close () | Close the door. |
isOpen () | Returns the opening status of the door. |
setSignalIn (plug, state) | Set the value of a signal in the specified IN plug of the element. |
getSignalIn (plug) | Return the value of a signal in the specified IN plug of the element. |
mockGetClosure () | Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":". |
Functions
- open ()
- Open the door.
- close ()
- Close the door.
- isOpen ()
-
Returns the opening status of the door.
Returns:
-
0/1
1 if the door is open.
- setSignalIn (plug, state)
-
Set the value of a signal in the specified IN plug of the element.
Valid plug names are:
- "in" for the in signal (seems to have no actual effect when modified this way).
Parameters:
- plug string A valid plug name to set.
- state 0/1 The plug signal state
- getSignalIn (plug)
-
Return the value of a signal in the specified IN plug of the element.
Valid plug names are:
- "in" for the in signal.
Parameters:
- plug string A valid plug name to query.
Returns:
-
0/1
The plug signal state
- mockGetClosure ()
-
Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":".
Returns:
-
table
A table encompasing the api calls of object.
See also: