Factorio Runtime DocsVersion 2.1.11

LuaPin - Runtime Docs

ClassLuaPinnew

A pin owned by a player.

Members

destroy()

Destroys this pin.

Destroys this pin.

get_pin_center() MapPosition?

The center of this pin if it can be computed.

The center of this pin if it can be computed.

index :: R uint32

The index of this pin (unique to this player). [...]

The index of this pin (unique to this player). [...]

owner :: R LuaPlayer

The player that this pin belongs to.

The player that this pin belongs to.

player :: RW LuaPlayer?

The player that this pin is bound to.

The player that this pin is bound to.

targets :: RW array[LuaEntity]

The targets of this pin - if any.

The targets of this pin - if any.

surface_index :: RW uint32?

The surface index if this pin specifically binds to a surface and position. [...]

The surface index if this pin specifically binds to a surface and position. [...]

position :: RW MapPosition?

The position if this pin specifically binds to a surface and position. [...]

The position if this pin specifically binds to a surface and position. [...]

chart_tag :: RW LuaCustomChartTag?

The custom chart tag - if this pin specificaly binds to a chart tag. [...]

The custom chart tag - if this pin specificaly binds to a chart tag. [...]

label :: RW string

The label for this pin - if any. [...]

The label for this pin - if any. [...]

always_visible :: RW boolean
preview_distance :: RW uint16

The radius (in tiles) that is shown in the tooltip for this pin.

The radius (in tiles) that is shown in the tooltip for this pin.

alert_type :: RW defines.alert_type?

The type of alert this pin is for (if configured to be about alerts).

The type of alert this pin is for (if configured to be about alerts).

alert_positions :: RW array[MapPosition]

The alert positions if this pin is configured to show alert data.

The alert positions if this pin is configured to show alert data.

valid :: R boolean

Is this object valid? [...]

Is this object valid? [...]

object_name :: R string

The class name of this object. [...]

The class name of this object. [...]

Methods

destroy()

Destroys this pin.


get_pin_center() → MapPosition?

The center of this pin if it can be computed.

Attributes

index :: Read uint32

The index of this pin (unique to this player).

Note that this index has no corelation to the position of the pin within LuaPlayer::get_pins


owner :: Read LuaPlayer

The player that this pin belongs to.


player :: Read|Write LuaPlayer?

The player that this pin is bound to.


targets :: Read|Write array[LuaEntity]

The targets of this pin - if any.


surface_index :: Read|Write uint32?

The surface index if this pin specifically binds to a surface and position.

If writing, and this pin was not bound to a specific surface and position, the default position of (0,0) is used.


position :: Read|Write MapPosition?

The position if this pin specifically binds to a surface and position.

If writing, and this pin was not bound to a specific surface and position, the default surface of nauvis is used.


chart_tag :: Read|Write LuaCustomChartTag?

The custom chart tag - if this pin specificaly binds to a chart tag.

The chart tag must be on the same force as the owning player.


label :: Read|Write string

The label for this pin - if any. This will be an empty string if there is no label set.


always_visible :: Read|Write boolean


preview_distance :: Read|Write uint16

The radius (in tiles) that is shown in the tooltip for this pin.


alert_type :: Read|Write defines.alert_type?

The type of alert this pin is for (if configured to be about alerts).


alert_positions :: Read|Write array[MapPosition]

The alert positions if this pin is configured to show alert data.


valid :: Read boolean

Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.


object_name :: Read string

The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.

Fulltext search

Classes

Concepts

Events

Defines

Fulltext search for