Evospace  0.19.0
Modding API
 
Loading...
Searching...
No Matches
StaticItem Class Reference

Static part of every item. More...

Inheritance diagram for StaticItem:
Prototype

Public Attributes

float unit_mul = 1.f
 Property. Multiplier for internal item count units.
 
Texture2Dimage = nullptr
 Property. Item ico for drawing in inventory.
 
StaticMeshmesh
 Property. Mesh for rendering item in world (on ground or at conveyor)
 
int64 max_count = 0
 Property. Max count that can be stored in one slot of default inventory.
 
bool craftable = true
 Set visibility for non creative game.
 
- Public Attributes inherited from Prototype

Additional Inherited Members

- Public Member Functions inherited from Prototype
- Static Public Member Functions inherited from Prototype
static Prototypelua_codegen_cast (Object *parent_inst)
 Object name in database.
 
- Protected Member Functions inherited from Prototype

Detailed Description

Static part of every item.

ItemData { count: per instance data, item: static part pointer }

Not modifiable in game part of item

Definition at line 38 of file StaticItem.h.

Member Data Documentation

◆ image

Texture2D* StaticItem::image = nullptr

Property. Item ico for drawing in inventory.

Default value: nil

local coal = StaticItem.find("Coal")
image = coal.image
coal.image = image

Definition at line 91 of file StaticItem.h.

◆ max_count

int64 StaticItem::max_count = 0

Property. Max count that can be stored in one slot of default inventory.

Default value: 0

local coal = StaticItem.find("Coal")
count = coal.max_count
coal.max_count = 64

Definition at line 119 of file StaticItem.h.

◆ unit_mul

float StaticItem::unit_mul = 1.f

Property. Multiplier for internal item count units.

When drawing in inventory this multiplier is applying. Showing number = count * multiplier

Default value: 1.0

local coal = StaticItem.find("Coal")
mul = coal.unit_mul
coal.unit_mul = 1.0

Definition at line 77 of file StaticItem.h.