Tile - YEnergy - Is Energy Port Connected – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:{{FULLPAGENAME}}.png]]
<!---
*Returns '''whenever''' a selected '''port''' is connected to '''power''' grid.
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
-->
== Is Energy Port Connected(Entity, Port) ==


=Notes=
[[File:YlandsTile-341.png]]
*Energy ports are numbered from 0, e.g: ports of entity with 3 ports are numbered 0, 1, 2
 
<pre>static isEnergyPortConnected(entity: YEntity, port: number): boolean;</pre>
=== Parameters ===
 
==== entity ====
 
Target entity
 
==== port ====
 
Target port
 
=== Returns ===
 
'''boolean'''
 
=== Availability ===
 
[[Ylands:Tile Availability - Client|Client]], [[Ylands:Tile Availability - Server|Server]]
 
=== Description ===
 
Returns whether selected '''port''' is connected to the '''power''' grid.
 
=== Notes ===
 
* Energy ports are numbered from 0, e.g: ports of entity with 3 ports are numbered 0, 1, 2.




----
----
{{Ylands scripting navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}


[[Category: Instructions]]
[[Category: Instructions]]
[[Category: Ylands 0.12]]

Latest revision as of 15:26, 24 November 2023

Is Energy Port Connected(Entity, Port)

YlandsTile-341.png

static isEnergyPortConnected(entity: YEntity, port: number): boolean;

Parameters

entity

Target entity

port

Target port

Returns

boolean

Availability

Client, Server

Description

Returns whether selected port is connected to the power grid.

Notes

  • Energy ports are numbered from 0, e.g: ports of entity with 3 ports are numbered 0, 1, 2.