Factorio Runtime DocsVersion 2.1.25

LuaPin - Runtime Docs

ClassLuaPinnew

A map 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. [...]

The index of this pin. [...]

owner :: R LuaPlayer

The player that this pin belongs to.

The player that this pin belongs to.

player :: R LuaPlayer? | W PlayerIdentification?

The player that this pin targets, if any.

The player that this pin targets, if any.

targets :: RW array[LuaEntity]

The entities that this pin targets, if any.

The entities that this pin targets, if any.

surface_index :: RW uint32?

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

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

position :: RW MapPosition?

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

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

chart_tag :: RW LuaCustomChartTag?

The custom chart tag, if this pin specifically targets a chart tag. [...]

The custom chart tag, if this pin specifically targets 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 this pin targets an alert.

The type of alert this pin is for, if this pin targets an alert.

alert_positions :: RW array[MapPosition]

The alert positions, if this pin targets an alert.

The alert positions, if this pin targets an alert.

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. The index is unique to this player.

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


owner :: Read LuaPlayer

The player that this pin belongs to.


player :: Read LuaPlayer? | Write PlayerIdentification?

The player that this pin targets, if any.


targets :: Read|Write array[LuaEntity]

The entities that this pin targets, if any.


surface_index :: Read|Write uint32?

The surface index if this pin specifically targets a surface and position.

When 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 targets a surface and position.

When 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 specifically targets 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 this pin targets an alert.


alert_positions :: Read|Write array[MapPosition]

The alert positions, if this pin targets an alert.


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