StaticBlock
classPlaceable block prototype
- 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.
Fields
| Name | Type | Description | |
|---|---|---|---|
| logic | Class | BlockLogic class driving the simulation | |
| actor | Class | Presentation actor class spawned for the block | |
| selector | Class | Selector widget class | |
| tesselator | Tesselator | Mesh tesselator used to render the block | |
| sub_blocks | Vec3i[] | Occupied cells relative to the block origin | |
| rotation_locks | Vec3i | Block local axes that keep their world direction; a turn moving a locked axis is refused | |
| replace_tag | string | Blocks sharing a tag replace each other on build | |
| tier | integer | Block tier used for recipe speed scaling | |
| level | integer | Block level within its tier | |
| energy_consumption_per_tick | integer | Energy drawn per simulation tick | |
| energy_production_per_tick | integer | Energy produced per simulation tick | |
| energy_consumption_item | StaticItem | Resource item drawn by this block | |
| energy_production_item | StaticItem | Resource item produced by this block | |
| break_effect | Class | Effect actor class spawned when the block is destroyed | |
| lua | table? | Lua prototype table with logic_init and actor_init hooks | |
| half_cover | StaticCover | Cover mesh for the half-height variant | |
| center_cover | StaticCover | Cover mesh for the center part | |
| body_cover | StaticCover | Cover mesh for the block body | |
| export_options | LogicExportOption[] | Logic export signals published by this block type | |
| import_options | LogicImportOption[] | Logic import signals accepted by this block type | |
Standard members (5)
Every class of this kind carries these.
| StaticBlock.cast(object) | Trying to cast Object into StaticBlock |
| StaticBlock.get_class() | Return StaticBlock class object |
| StaticBlock.find(name) | Looks StaticBlock up in db, nil when there is none |
| StaticBlock.get(name) | Takes StaticBlock from db, reports a miss to the log |
| StaticBlock.reg(name) load-only | Register a new StaticBlock static object |
Inherited from StaticObject (3)
- item Item this object is built from and mined into
- mined_item read-only Item mining returns and a decor build pays; nil when the object is not minable
- mined_count read-only How many of mined_item mining returns and a decor build pays; 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
Subclasses
Used by
- BlockLogic.static_block field
- Dimension.place param
- Dimension.get_cell return
- GenContext.set_cell param
- GenContext.spawn_block param
- GhostBlockLogic.target field
- StaticItem.block field
- TallSectorData.get_block return
- TallSectorData.set_block param
- ui.thumbnail param