StaticItem
classItem prototype
- read-only Assigning to the field raises an error.
- 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 | |
|---|---|---|---|
| image | Texture2D | Item image in UI | |
| image_path | string | Icon path relative to the owning mod folder | |
| stack_size | integer | Size of item stack | |
| tier | integer | Item unlock tier | |
| type | read-only | string | What the item is: "solid", "fluid" or "abstract" |
| unit_mul | number | multiplier for UI | |
| mesh | StaticMesh | Mesh for item rendering in world | |
| block | StaticBlock | Buildable object pointer for this item | |
| custom_data | boolean | Is item instance contains CustomData | |
| logic | Class | Class for item while in hand | |
| lua | table? | Lua prototype table | |
| tags | string | Space separated search tags | |
| category | string | In-game database category | |
| equipment_slot | string | Equipment slot this item fits (Jetpack, Light) | |
| label | Loc | Localized item name | |
| description_parts | Loc[] | Localized description paragraphs | |
Standard members (5)
Every class of this kind carries these.
| StaticItem.cast(object) | Trying to cast Object into StaticItem |
| StaticItem.get_class() | Return StaticItem class object |
| StaticItem.find(name) | Looks StaticItem up in db, nil when there is none |
| StaticItem.get(name) | Takes StaticItem from db, reports a miss to the log |
| StaticItem.reg(name) load-only | Register a new StaticItem static object |
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
- AbstractCrafter.select_recipe_by_output param
- Dimension.get_produced param
- Dimension.get_consumed param
- ExtractionData.item field
- InventoryAccess.add param
- InventoryAccess.sub param
- InventoryReader.find param
- ItemData.item field
- ItemData.new param
- ItemData.new_zero param
- ItemGroup.members field
- ItemGroup.matches param
- LogicExportOption.signal field
- LogicImportOption.signal field
- Player.hotbar_has param
- RecipeDictionary.used_in param
- RecipeInventory.add param
- ResourceInventory.item field
- SingleSlotInventory.set_simple_filter param
- SourceData.item field
- StaticBlock.energy_consumption_item field
- StaticBlock.energy_production_item field
- StaticItemPanel.items field
- StaticItemPanel.add_context param
- StaticObject.item field
- StaticObject.mined_item field
- StaticQuest.add_context param
- StaticResearchDecorationUnlock.decorations field
- StaticResearchToolUnlock.tool field
- StaticTip.add_context param