aboutsummaryrefslogtreecommitdiff
path: root/internal/world/trigger_store.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-08 19:59:14 -0400
committerhistoria <[not public]>2026-07-08 19:59:14 -0400
commit09d325dcf5e779eab5550d3fd3377bde50101428 (patch)
treea433be903aabbf1d2eadce2aacdac12a9eb8dde0 /internal/world/trigger_store.go
parent9184377301c2604e003f36426788c032fb0ca524 (diff)
downloadthehouseoficarus-09d325dcf5e779eab5550d3fd3377bde50101428.tar.gz
feat: unify on use, on look, and on kill. all support same conditions/actions now.
Diffstat (limited to 'internal/world/trigger_store.go')
-rw-r--r--internal/world/trigger_store.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/world/trigger_store.go b/internal/world/trigger_store.go
index e18ae80..04d77f4 100644
--- a/internal/world/trigger_store.go
+++ b/internal/world/trigger_store.go
@@ -8,6 +8,7 @@ import (
"sync"
"gopkg.in/yaml.v3"
+ "thehouseoficarus/internal/behavior"
)
type TriggerStore struct {
@@ -26,7 +27,7 @@ type PlayerTriggerSeq struct {
PlayerName string
TriggerID string
RoomID int
- Steps []TriggerStep
+ Steps []behavior.StepAction
Wait int
Started bool
FlagValue any
@@ -35,7 +36,7 @@ type PlayerTriggerSeq struct {
type GlobalTriggerSeq struct {
TriggerID string
RoomID int
- Steps []TriggerStep
+ Steps []behavior.StepAction
Wait int
FlagValue any
}
@@ -227,7 +228,7 @@ func (ts *TriggerStore) startPlayerSeqLocked(playerName string, t *TriggerDef, r
PlayerName: playerName,
TriggerID: t.ID,
RoomID: roomID,
- Steps: make([]TriggerStep, len(t.Steps)),
+ Steps: make([]behavior.StepAction, len(t.Steps)),
FlagValue: flagValue,
}
copy(seq.Steps, t.Steps)
@@ -246,7 +247,7 @@ func (ts *TriggerStore) startGlobalSeqLocked(t *TriggerDef, flagValue any) *Glob
seq := &GlobalTriggerSeq{
TriggerID: t.ID,
RoomID: t.Room,
- Steps: make([]TriggerStep, len(t.Steps)),
+ Steps: make([]behavior.StepAction, len(t.Steps)),
FlagValue: flagValue,
}
copy(seq.Steps, t.Steps)