Prototype/StorageTank: Difference between revisions
(Converted to SMW format) |
(1.1.51: Prototype/EntityWithOwner added) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Prototype parent|Prototype/ | {{Prototype parent|Prototype/EntityWithOwner}} | ||
A [[storage tank]]. | A [[storage tank]]. | ||
Line 5: | Line 5: | ||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/ | This prototype inherits all the properties from [[Prototype/EntityWithOwner]]. | ||
{{Prototype property|fluid_box|[[Types/FluidBox|FluidBox]]}} | {{Prototype property|fluid_box|[[Types/FluidBox|FluidBox]]}} | ||
{{Prototype property|window_bounding_box|[[Types/BoundingBox|BoundingBox]]}} | {{Prototype property|window_bounding_box|[[Types/BoundingBox|BoundingBox]]}} | ||
The location of the window showing the contents. Note that for window_background the width and height are determined by the sprite and window_bounding_box only determines the drawing location. For fluid_background the width is determined by the sprite and the height and drawing location are determined by window_bounding_box. | |||
{{Prototype property|pictures|[[Types/table|table]] | {{Prototype property|pictures|[[Types/table|table]]}} | ||
Table with the following mandatory members: | Table with the following mandatory members: | ||
* picture - [[Types/Sprite4Way|Sprite4Way]] | * picture - [[Types/Sprite4Way|Sprite4Way]] |
Latest revision as of 19:27, 21 January 2022
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/StorageTank
A storage tank.
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
fluid_box
Type: FluidBox
window_bounding_box
Type: BoundingBox
The location of the window showing the contents. Note that for window_background the width and height are determined by the sprite and window_bounding_box only determines the drawing location. For fluid_background the width is determined by the sprite and the height and drawing location are determined by window_bounding_box.
pictures
Type: table
Table with the following mandatory members:
- picture - Sprite4Way
- window_background - Sprite
- fluid_background - Sprite
- flow_sprite - Sprite
- gas_flow - Animation
flow_length_in_ticks
Type: uint32
Must be positive.
Used for determining the x position inside the flow_sprite when drawing the storage tank. Does not affect gameplay.
The x position of the sprite will be ((game.tick % flow_length_in_ticks) ÷ flow_length_in_ticks) × (flow_sprite.width - 32)
. This means, that over flow_length_in_ticks ticks, the part of the flow_sprite that is drawn in-game is incrementally moved from most-left to most-right inside the actual sprite, that part always has a width of 32px. After flow_length_in_ticks, the part of the flow_sprite that is drawn will start from the left again.
Diagram:
Example state: [ { } ] [] <- flow_sprite {} <- the part that is drawn in-game, width is 32px This means: State at (tick % flow_length_in_ticks) == 0: [{ } ] State at (tick % flow_length_in_ticks) == (flow_length_in_ticks ÷ 2): [ { } ] State at (tick % flow_length_in_ticks) == (flow_length_in_ticks - 1): [ { }]
Optional properties
two_direction_only
Type: bool
Default: false
circuit_wire_max_distance
Type: double
Default: 0
draw_copper_wires
Type: bool
Default: true
draw_circuit_wires
Type: bool
Default: true
circuit_wire_connection_points
Type: table of WireConnectionPoint
Mandatory if circuit_wire_max_distance > 0.
circuit_connector_sprites
Type: table of CircuitConnectorSprites
Mandatory if circuit_wire_max_distance > 0.
scale_info_icons
Type: bool
Default: true
If the icons of fluids shown in alt-mode should be scaled to the storage tank's size.