Prototype/StorageTank

From Official Factorio Wiki
Revision as of 17:17, 5 August 2019 by Bilka (talk | contribs) (typo)
Jump to navigation Jump to search

Template:Prototype parent A storage tank.

Template:Prototype TOC

Mandatory properties

This prototype inherits all the properties from Prototype/EntityWithHealth.

Template:Prototype property

Template:Prototype property

Template:Prototype property Table with the following mandatory members:

Template:Prototype property 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

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property

Template:Prototype property Mandatory if circuit_wire_max_distance > 0.

Template:Prototype property Mandatory if circuit_wire_max_distance > 0.

Template:Prototype property If the icons of fluids shown in alt-mode should be scaled to the storage tank's size.