CraftingInteraction ​
Inherits: Interaction < Resource
Crafting interaction that opens the crafting interface when activated Can be attached to NPCs, Crafting Tables, or other interactive objects Updated to use CraftingJob's existing timer system instead of redundant timers
Properties ​
int | craft_school_id | 0 |
bool | requires_personal_materials | true |
SFXSelection | craft_open_sfx | |
AnimationSelectionSocial | craft_interaction_animation |
Variables ​
bool | crafting_is_active | false |
Player | current_crafter | |
Array[CraftingJob] | active_jobs | [] |
CraftingRecipeDefinition | last_selected_recipe | null |
Methods ​
bool | can_interact( player: Player ) |
void | start_interaction( player: Player ) |
void | end_interaction() |
bool | start_craft( recipe: CraftingRecipeDefinition, player: Player, quantity: int = 1 ) |
bool | cancel_craft( recipe: CraftingRecipeDefinition, player: Player ) |
Array[CraftingJob] | get_active_crafts() |
CraftSchoolDefinition | get_craft_school() |
Array[CraftingRecipeDefinition] | get_available_recipes_for_player( player: Player ) |
Dictionary | get_station_summary() |
bool | is_station_in_use() |
void | cleanup() |
Property descriptions ​
int craft_school_id = 0 ​
Which craft school is available at this crafting station
bool requires_personal_materials = true ​
If true, player must have materials in their inventory, if false can access storage
SFXSelection craft_open_sfx ​
Optional audio to play when opening crafting interface
AnimationSelectionSocial craft_interaction_animation ​
Optional animation to play when crafting interface opens
Variable descriptions ​
bool crafting_is_active = false ​
Whether the crafting interface is currently active
Player current_crafter ​
Reference to the player currently crafting (if any)
Array[CraftingJob] active_jobs = [] ​
Currently active crafting jobs at this station
CraftingRecipeDefinition last_selected_recipe = null ​
Remember the last selected recipe for this station
Method descriptions ​
bool can_interact( player: Player ) ​
Check if the player can interact with this crafting station
void start_interaction( player: Player ) ​
Start the crafting interaction - opens the crafting UI
void end_interaction() ​
End the crafting interaction - closes the crafting UI
bool start_craft( recipe: CraftingRecipeDefinition, player: Player, quantity: int = 1 ) ​
Start a craft at this station
bool cancel_craft( recipe: CraftingRecipeDefinition, player: Player ) ​
Cancel a craft at this station
Array[CraftingJob] get_active_crafts() ​
Get all active crafts at this station
CraftSchoolDefinition get_craft_school() ​
Get the craft school for this station
Array[CraftingRecipeDefinition] get_available_recipes_for_player( player: Player ) ​
Get all recipes available at this station for a player
Dictionary get_station_summary() ​
Get crafting station summary for UI display
bool is_station_in_use() ​
Check if station is currently in use
void cleanup() ​
Give the timer back (the object is going away)