Tile - YEnergy - Is Energy Port Connected – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:


==== entity ====
==== entity ====
Target entity


==== port ====
==== port ====
Target port


=== Returns ===
=== Returns ===


'''boolean'''
'''boolean'''
=== Availability ===
[[Ylands:Tile Availability - Client|Client]], [[Ylands:Tile Availability - Server|Server]]


=== Description ===
=== Description ===


Returns whether the selected '''port''' is connected to the '''power''' grid.
Returns whether selected '''port''' is connected to the '''power''' grid.


=== Notes ===
=== Notes ===

Revision as of 12:16, 12 November 2021

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.