Prototype/LinkedContainer: Difference between revisions
m (word) |
(1.1.62: circuit_wire_connection_point, circuit_wire_max_distance, draw_copper_wires, draw_circuit_wires, circuit_connector_sprites added) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Prototype parent|Prototype/ | {{Prototype parent|Prototype/EntityWithOwner}} | ||
A container that shares its inventory with containers with the same [https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.link_id link_id], which can be set via the GUI. The link IDs are per prototype and force, so only containers with the same ID | A container that shares its inventory with containers with the same [https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.link_id link_id], which can be set via the GUI. The link IDs are per prototype and force, so only containers with the '''same ID''', '''same prototype name''' and '''same force''' will share inventories. | ||
{{Prototype TOC|linked-container}} | {{Prototype TOC|linked-container}} | ||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/ | This prototype inherits all the properties from [[Prototype/EntityWithOwner]]. | ||
{{Prototype property|inventory_size|[[Types/ItemStackIndex|ItemStackIndex]]}} | {{Prototype property|inventory_size|[[Types/ItemStackIndex|ItemStackIndex]]}} | ||
Line 13: | Line 13: | ||
{{Prototype property|picture|[[Types/Sprite|Sprite]]|optional=true}} | {{Prototype property|picture|[[Types/Sprite|Sprite]]|optional=true}} | ||
{{Prototype property|inventory_type|[[Types/string|string]]|"with_bar"|optional=true}} | |||
One of "with_bar" and "with_filters_and_bar". Whether the inventory of this container can be filtered (like cargo wagons) or not. | |||
{{Prototype property|gui_mode|[[Types/string|string]]|all|optional=true}} | {{Prototype property|gui_mode|[[Types/string|string]]|all|optional=true}} | ||
Line 18: | Line 21: | ||
{{Prototype property|scale_info_icons|[[Types/bool|bool]]|false|optional=true}} | {{Prototype property|scale_info_icons|[[Types/bool|bool]]|false|optional=true}} | ||
{{Prototype property|circuit_wire_connection_point|[[Types/WireConnectionPoint|WireConnectionPoint]]|optional=true}} | |||
Defines how wires visually connect to this linked container. | |||
{{Prototype property|circuit_wire_max_distance|[[Types/double|double]]|0|optional=true}} | |||
The maximum circuit wire distance for this linked container. | |||
{{Prototype property|draw_copper_wires|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|draw_circuit_wires|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|circuit_connector_sprites|[[Types/CircuitConnectorSprites|CircuitConnectorSprites]]|optional=true}} | |||
The pictures displayed for circuit connections to this linked container. |
Latest revision as of 10:41, 12 August 2022
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/LinkedContainer
A container that shares its inventory with containers with the same link_id, which can be set via the GUI. The link IDs are per prototype and force, so only containers with the same ID, same prototype name and same force will share inventories.
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
inventory_size
Type: ItemStackIndex
Must be > 0.
Optional properties
picture
Type: Sprite
inventory_type
Type: string
Default: "with_bar"
One of "with_bar" and "with_filters_and_bar". Whether the inventory of this container can be filtered (like cargo wagons) or not.
gui_mode
Type: string
Default: all
Players that can access the GUI to change the link ID. Possible options: "all", "none", "admins".
scale_info_icons
Type: bool
Default: false
circuit_wire_connection_point
Type: WireConnectionPoint
Defines how wires visually connect to this linked container.
circuit_wire_max_distance
Type: double
Default: 0
The maximum circuit wire distance for this linked container.
draw_copper_wires
Type: bool
Default: true
draw_circuit_wires
Type: bool
Default: true
circuit_connector_sprites
Type: CircuitConnectorSprites
The pictures displayed for circuit connections to this linked container.