diff options
| author | historia <[not public]> | 2026-07-01 03:21:52 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-01 03:21:52 -0400 |
| commit | fbe5090ac3325ff8ea6989cdf4515c7f077c975b (patch) | |
| tree | 1811ad9c6a596e7177bb2c42944c389c0a120066 /internal/behavior | |
| parent | 5f37dc9b6f6b79da04da70ae0c33ec8d02998587 (diff) | |
| download | thehouseoficarus-fbe5090ac3325ff8ea6989cdf4515c7f077c975b.tar.gz | |
feat: item messaging standardized, custom messages for production paths implemented
Diffstat (limited to 'internal/behavior')
| -rw-r--r-- | internal/behavior/behavior.go | 26 | ||||
| -rw-r--r-- | internal/behavior/store.go | 8 | ||||
| -rw-r--r-- | internal/behavior/types.go | 47 |
3 files changed, 50 insertions, 31 deletions
diff --git a/internal/behavior/behavior.go b/internal/behavior/behavior.go index 8333a05..c0a714c 100644 --- a/internal/behavior/behavior.go +++ b/internal/behavior/behavior.go @@ -5,15 +5,16 @@ type GatherConfig struct { Tools []string `yaml:"tools"` Bait string `yaml:"bait"` Success SuccessFormula `yaml:"success"` - GatherMsg string `yaml:"gather_message"` + GatherMessage string `yaml:"gather_message"` DepletedMessage string `yaml:"depleted_message"` ExhaustedMessage string `yaml:"exhausted_message"` - FailMsg string `yaml:"fail_message"` + FailMessage string `yaml:"fail_message"` Drops []DropEntry `yaml:"drops"` RespawnTimer float64 `yaml:"respawn_timer"` RespawnBroadcast string `yaml:"respawn_broadcast"` DepleteTimer float64 `yaml:"deplete_timer"` NestChance int `yaml:"nest_chance"` + BroadcastMessage string `yaml:"broadcast_message"` } type SuccessFormula struct { @@ -82,13 +83,16 @@ type Condition struct { } type UseConfig struct { - Message string `yaml:"message"` - Wait float64 `yaml:"wait"` - Consume map[string]int `yaml:"consume"` - Reward DropEntry `yaml:"reward"` - FailMsg string `yaml:"fail_message"` - Success *SuccessFormula `yaml:"success"` - Skill string `yaml:"skill"` - Level int `yaml:"level"` - XP int `yaml:"xp"` + StartMessage string `yaml:"start_message"` + Wait float64 `yaml:"wait"` + Consume map[string]int `yaml:"consume"` + Reward DropEntry `yaml:"reward"` + FailMessage string `yaml:"fail_message"` + Success *SuccessFormula `yaml:"success"` + Skill string `yaml:"skill"` + Level int `yaml:"level"` + XP int `yaml:"xp"` + SuccessMessage string `yaml:"success_message"` + EndMessage string `yaml:"end_message"` + BroadcastMessage string `yaml:"broadcast_message"` } diff --git a/internal/behavior/store.go b/internal/behavior/store.go index 710506e..38cc72b 100644 --- a/internal/behavior/store.go +++ b/internal/behavior/store.go @@ -154,10 +154,10 @@ func ResolveDrop(dataDir string, drops []DropEntry) *DropEntry { qty = 1 } return &DropEntry{ - ItemID: resolved.ItemID, - Quantity: qty, - Depletes: drops[i].Depletes, - Message: drops[i].Message, + ItemID: resolved.ItemID, + Quantity: qty, + Depletes: drops[i].Depletes, + SuccessMessage: drops[i].SuccessMessage, } } } diff --git a/internal/behavior/types.go b/internal/behavior/types.go index c061742..571f2c4 100644 --- a/internal/behavior/types.go +++ b/internal/behavior/types.go @@ -55,6 +55,7 @@ const ( TypeMix ActionType = "mix" TypeConstruct ActionType = "construct" TypeTriggerModule ActionType = "trigger_module" + TypeUseInteraction ActionType = "use_interaction" ) type Action struct { @@ -85,14 +86,12 @@ type GatherData struct { } type ProductionData struct { - ItemID string - Phase int - Wait float64 - StartMsg string - EndMsg string - Remaining int - NextStepIndex int - StepsAccumulatedTicks float64 + ItemID string + Phase int + Wait float64 + StartMessage string + EndMessage string + Remaining int } type StealData struct { @@ -126,6 +125,12 @@ type UseData struct { Step int } +type UseInteractionData struct { + Message string + Action *NodeAction + ObjName string +} + type BurnData struct { ItemID string ToolSpeed float64 @@ -172,6 +177,16 @@ type SearchData struct { Started bool } +type CombineData struct { + ItemID string + Phase int + StepIndex int + Remaining int + StartMessage string + EndMessage string + Wait float64 +} + type FletchData struct { ItemID string Phase int @@ -196,14 +211,14 @@ type TriggerModuleData struct { } type DropEntry struct { - ItemID string `yaml:"item_id"` - Table string `yaml:"table"` - Weight int `yaml:"weight"` - Quantity int `yaml:"quantity"` - Depletes bool `yaml:"depletes"` - Message string `yaml:"message"` - Level int `yaml:"level"` - XP int `yaml:"xp"` + ItemID string `yaml:"item_id"` + Table string `yaml:"table"` + Weight int `yaml:"weight"` + Quantity int `yaml:"quantity"` + Depletes bool `yaml:"depletes"` + SuccessMessage string `yaml:"success_message"` + Level int `yaml:"level"` + XP int `yaml:"xp"` } type DropTableDef struct { |
