GhostStaticBlock
classStatic block placed as a build ghost
- load-only Usable only while mods load. The game seals these members once loading finishes, so a call or a write from a running world raises an error.
Standard members (5)
These members are available on all classes of this kind.
| GhostStaticBlock.cast(object) | Trying to cast Object into GhostStaticBlock |
| GhostStaticBlock.get_class() | Return GhostStaticBlock class object |
| GhostStaticBlock.find(name) | Looks GhostStaticBlock up in db, nil when there is none |
| GhostStaticBlock.get(name) | Takes GhostStaticBlock from db, reports a miss to the log |
| GhostStaticBlock.reg(name, spec) load-only | Register a new GhostStaticBlock static object, or take the registered one of that name |
Inherited from StaticBlock (28)
- logic BlockLogic class driving the simulation
- actor Presentation actor class spawned for the block
- selector Selector widget class
- tesselator Mesh tesselator used to render the block
- sub_blocks Occupied cells relative to the block origin
- rotation_locks Block local axes that keep their world direction; a turn moving a locked axis is refused
- replace_tag Blocks sharing a tag replace each other on build
- tier Block tier used for recipe speed scaling
- level Block level within its tier
- energy_consumption_per_tick Energy drawn per simulation tick
- energy_production_per_tick Energy produced per simulation tick
- energy_consumption_item Resource item drawn by this block
- energy_production_item Resource item produced by this block
- energy_tooltip read-only Lines on the power the block draws and produces, as its item tooltip shows them; empty for a block without energy
- break_effect Effect actor class spawned when the block is destroyed
- lua Lua prototype table holding logic_init, actor_init and tooltip
- logic_init load-only Called with the block logic of every new block of this type; makes its inventories and accessors
- actor_init load-only Called with the block actor when it spawns
- tooltip load-only Tooltip of the block: a string, or a function of the block logic returning one
- components load-only Components every block of this type keeps: component name to the values a new block starts with; a field left out starts at 0, false, nil or "". Saved with the block and part of the sim state; batch_tick gets them as arrays, BlockLogic.component and get_field read them
- batch_tick load-only Called once every sim tick with all placed blocks of this type, in position order: batch_tick(blocks, components, inventories), or batch_tick(n, components, slots, inventories) from a --!sim chunk. components.<Component>.<field> is the array of that field of every block, read back after the call; --!sim gets integer, boolean and item fields as int64 columns, an item as its sim_id, and no string fields. slots.<inventory> holds item and count columns indexed (i-1)*slots+s, taken before the call. inventories maps an inventory name to the array of that inventory of every block. The tables are kept between ticks and change only when a block of the type comes or goes
- window load-only Builds the window of a block of this type: window(logic) returns the content widget, and may return a function the window calls every frame while it is open
- half_cover Cover mesh for the half-height variant
- center_cover Cover mesh for the center part
- body_cover Cover mesh for the block body
- export_options Logic export signals published by this block type
- import_options Logic import signals accepted by this block type
- StaticBlock:copy(name, spec) load-only Register a copy of this block under a new name; its item stays the item of the original until block.item is set
Inherited from StaticObject (3)
- item Item this object is built from and mined into
- mined_item Item a build pays and mining returns; nil when the object is not minable
- mined_count How many of mined_item a build pays and mining returns; zero when the object is not minable
Inherited from Prototype (2)
- name read-only Object name
- Prototype:is_valid() Returns false once the underlying engine object has been destroyed
Inherited from Object (1)
- Object:get_class() Class of this object