FB2Action_PlantSeed
Overview
- PlantSeed action. Override the OnPlay/OnFinish/OnPaused/OnCanceled/OnTick timing hooks in Lua.
Metadata
| Field | Value |
|---|---|
| Kind | action |
| Environment | B2 - Simulation |
| Category | actions |
| Extends | FB2Action_PlayAnim |
| Require | require('Actions.B2Action_PlantSeed') |
Properties (6)
| Name | Type | Description |
|---|---|---|
CropId | string | Crop id resolved from the seed, passed through to soil planting |
ObjectCategoryId | string | Object category id resolved from the seed, passed through to soil planting |
OwnershipData | FB1OwnershipData | Ownership data resolved from the seed, passed through to soil planting |
SeedObjectEntityId | FB1EntityId | Entity id of the seed object currently grabbed in the character's hand |
SeedObjectId | string | Seed table id resolved from the grabbed seed object, used to plant and to consume the seed on finish |
SeedPlantingMode | EB1SeedPlantingMode | Planting mode resolved from the seed table row, validated before the action is allowed to proceed |
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_PlantSeed.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) |