From abd612c15799f604e671e83dc7c410ed2b44185f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 25 Jun 2026 15:40:48 -0400 Subject: slop refactor --- internal/world/hazard.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/world/hazard.go') diff --git a/internal/world/hazard.go b/internal/world/hazard.go index 1361cff..ac2a6a6 100644 --- a/internal/world/hazard.go +++ b/internal/world/hazard.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "thehouseoficarus/internal/action" "gopkg.in/yaml.v3" + "thehouseoficarus/internal/behavior" ) // HazardDef describes an environmental threat attached to a room (a sandstorm, @@ -29,7 +29,7 @@ type HazardDef struct { MaxHit int `yaml:"max_hit"` Speed float64 `yaml:"speed"` // ticks between hazard rolls WarnMessage string `yaml:"warn_message"` - HitMessage string `yaml:"hit_message"` // accepts a single %d for damage + HitMessage string `yaml:"hit_message"` // accepts a single %d for damage MissMessage string `yaml:"miss_message"` RequiredItem string `yaml:"required_item"` // equipped item that negates the hazard } @@ -38,7 +38,7 @@ type HazardDef struct { func (w *World) LoadHazard(id string) (*HazardDef, error) { w.hazardMu.Lock() if w.hazardPathIndex == nil { - w.hazardPathIndex = action.BuildPathIndex(filepath.Join(w.dataDir, "hazards")) + w.hazardPathIndex = behavior.BuildPathIndex(filepath.Join(w.dataDir, "hazards")) } if def, ok := w.hazardDefs[id]; ok { w.hazardMu.Unlock() @@ -70,7 +70,7 @@ func (w *World) HazardIndex() map[string]bool { w.hazardMu.Lock() defer w.hazardMu.Unlock() if w.hazardPathIndex == nil { - w.hazardPathIndex = action.BuildPathIndex(filepath.Join(w.dataDir, "hazards")) + w.hazardPathIndex = behavior.BuildPathIndex(filepath.Join(w.dataDir, "hazards")) } ids := make(map[string]bool, len(w.hazardPathIndex)) for id := range w.hazardPathIndex { -- cgit v1.2.3