Crafting
Inherits: Resource
Resource that identifies a creation process happening in CraftStation.
Description
Crafting process is stored in its own resource and can be serialized (serialize()) and deserialized (deserialize()) for persistence and networking purposes. It also contains a process() that is called to update the time process of a crafting.
Properties
|
|
|
|
|
Methods
void |
deserialize(data: |
|
is_finished() const |
void |
process(delta: |
|
serialize() const |
Property Descriptions
int
recipe_index = 0
🔗
void set_recipe_index(value:
int
)int
get_recipe_index()
Recipe index on CraftStation.
float
time = 0.0
🔗
void set_time(value:
float
)float
get_time()
Elapsed crafting time.
Method Descriptions
void deserialize(data: Dictionary
) 🔗
Updates the data for this crafting process with a data
dictionary. Useful for game persistence and network synchronization.
bool
is_finished() const 🔗
Returns true if this crafting has finished.
void process(delta: float
) 🔗
Calls a time process for crafting to happen, this should be called by CraftStation.
Dictionary
serialize() const 🔗
Transforms crafting process data into a dictionary. Useful for game persistence and network synchronization.