StaticProp
classDecoration prototype scattered by the world generator
- 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 | |
|---|---|---|---|
| project_to_terrain_power | number | How strongly the prop follows the terrain slope | |
| additive_elevation | number | Height offset added after terrain projection | |
| range_mul | number | Prop view distance as a multiple of the decoration range setting; 0 is never culled | |
| surface_height_min | number | Lowest surface height in blocks accepting this prop | |
| surface_height_max | number | Highest surface height in blocks accepting this prop | |
| top_height_max | number | Highest column top in blocks accepting this prop | |
| floating | boolean | Prop keeps its height instead of sitting on the surface | |
| is_big | boolean | Prop spans more than one cell and is placed sparsely | |
| streamed | boolean | Prop is streamed with the sector instead of being baked | |
| mesh | StaticMesh | Mesh rendered for this prop | |
| no_collision | boolean | Prop is walked through | |
| is_emitting | boolean | Prop emits light | |
| high_detail_shadow | boolean | Prop may cast high-detail shadows | |
| on_spawn | function | Called with the block position when the prop is spawned | |
| hits_to_break | integer | Number of hits to break | |
| break_effect | Class | Effect actor class spawned when the prop breaks | |
| damage_effect | Class | Effect actor class spawned on a non-fatal hit | |
| vehicle_break_speed | number | Closing speed in cm/s at which a vehicle breaks through the prop; 0 makes the prop a solid obstacle | |
| actor_class | Class | Actor class spawned instead of an instanced mesh | |
Standard members (5)
Every class of this kind carries these.
| StaticProp.cast(object) | Trying to cast Object into StaticProp |
| StaticProp.get_class() | Return StaticProp class object |
| StaticProp.find(name) | Looks StaticProp up in db, nil when there is none |
| StaticProp.get(name) | Takes StaticProp from db, reports a miss to the log |
| StaticProp.reg(name) load-only | Register a new StaticProp 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
Used by
- PropListData.props field