aboutsummaryrefslogtreecommitdiff
path: root/internal/world/hazard.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/world/hazard.go')
-rw-r--r--internal/world/hazard.go8
1 files changed, 4 insertions, 4 deletions
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 {