FB2Action_AutoCraftByCategory
Overview
- Action that automatically crafts a random recipe from a given crafting category. S1: CraftingId (e.g. "BakingPastry"). S2: CategoryFilter (e.g. "Cake") - a category name in Crafting.Categories.
Metadata
| Field | Value |
|---|---|
| Kind | action |
| Environment | B2 - Simulation |
| Category | actions |
| Extends | FB2Action_Base |
| Require | require('Actions.B2Action_AutoCraftByCategory') |
Properties (3)
| Name | Type | Description |
|---|---|---|
CategoryFilter | string | Recipe category to filter by within CraftingId, parsed from Action.S2 |
CraftingId | string | Crafting table id to auto-craft from, parsed from Action.S1 |
bIsCraftingStarted | boolean | Set once a random recipe has been submitted to the crafting component, used by OnTick to finish the action |
Functions (5)
| Function | Parameters | Returns | Description |
|---|---|---|---|
OnCanceled | - | - | Callback invoked on Canceled. |
OnFinish | - | - | Callback invoked on Finish. |
OnPaused | - | - | Callback invoked on Paused. |
OnPlay | - | - | Callback invoked on Play. |
OnTick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | Callback invoked on Tick. |
Override points (5)
Implement these in Lua as FB2Action_AutoCraftByCategory.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_OnCanceled | - | - | Timing hook called when the action is canceled. |
Override_OnFinish | - | - | Timing hook called when the action finishes. |
Override_OnPaused | - | - | Timing hook called when the action is paused. |
Override_OnPlay | - | - | Timing hook called when the action starts (play). Override in Lua to replace the start behavior. |
Override_OnTick | DeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number | - | Timing hook called every tick while the action runs. (performance-sensitive) |