Addon/thutconcrete/elevator: Difference between revisions

From OpenComputers: Rebooted
Jump to navigation Jump to search
imported>OCDoc Import
Imported from legacy OpenComputers documentation at ocdoc.cil.li
 
Clean up Markdown artifacts from DokuWiki migration
 
Line 3: Line 3:
This component can be accessed by connecting an Elevator Control to a Computer.
This component can be accessed by connecting an Elevator Control to a Computer.


Component name: `elevator`. Callbacks:
Component name: <code>elevator</code>. Callbacks:


* `call(floor:number):boolean`
* <code>call(floor:number):boolean</code>


<pre>Tries to call the elevator to a certain floor. Returns `true` on success, `false` and an error message otherwise.
<pre>Tries to call the elevator to a certain floor. Returns true on success, false and an error message otherwise.
</pre>
</pre>
* `isReady():boolean`
* <code>isReady():boolean</code>


<pre>Returns `true` if the elevator can be called, `false` if it can not (because it is already moving).
<pre>Returns true if the elevator can be called, false if it can not (because it is already moving).
</pre>
</pre>
* `getLocalFloor():number`
* <code>getLocalFloor():number</code>


<pre>Returns the number of the floor the currently accessed Elevator Control is set to.
<pre>Returns the number of the floor the currently accessed Elevator Control is set to.
</pre>
</pre>
* `getElevatorFloor():number`
* <code>getElevatorFloor():number</code>


<pre>Returns the number of the floor the elevator is currently at. If the elevator is moving, the function returns the destination floor as its second argument.
<pre>Returns the number of the floor the elevator is currently at. If the elevator is moving, the function returns the destination floor as its second argument.
</pre>
</pre>
* `doesFloorExist(floor:number):boolean`
* <code>doesFloorExist(floor:number):boolean</code>


<pre>Returns `true` if the floor exists and thus can be called; the function returns `false` if the floor does not exist.
<pre>Returns true if the floor exists and thus can be called; the function returns false if the floor does not exist.
</pre>
</pre>
== Contents ==
== Contents ==


{{:Addon/thutconcrete/contents}}
{{:Addon/thutconcrete/contents}}

Latest revision as of 20:26, 24 August 2026

Component: Elevator

This component can be accessed by connecting an Elevator Control to a Computer.

Component name: elevator. Callbacks:

  • call(floor:number):boolean
Tries to call the elevator to a certain floor. Returns true on success, false and an error message otherwise.
  • isReady():boolean
Returns true if the elevator can be called, false if it can not (because it is already moving).
  • getLocalFloor():number
Returns the number of the floor the currently accessed Elevator Control is set to.
  • getElevatorFloor():number
Returns the number of the floor the elevator is currently at. If the elevator is moving, the function returns the destination floor as its second argument.
  • doesFloorExist(floor:number):boolean
Returns true if the floor exists and thus can be called; the function returns false if the floor does not exist.

Contents

Thut's Concrete
Components Elevator