diff options
| author | historia <[not public]> | 2026-06-25 21:23:34 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-25 21:23:34 -0400 |
| commit | e2d5b081f27141bb3dd89dbe595860b8a1345d55 (patch) | |
| tree | 3090f8150580fe85a872caa04165ff70613bbaa8 /internal/world | |
| parent | 84d74ca4351a97148ad8339676f9df7946bc21fb (diff) | |
| download | thehouseoficarus-e2d5b081f27141bb3dd89dbe595860b8a1345d55.tar.gz | |
feat: on_enter features ported over to triggers, cosmetic fixes with trigger messages
Diffstat (limited to 'internal/world')
| -rw-r--r-- | internal/world/room.go | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/internal/world/room.go b/internal/world/room.go index 22e7f79..aced969 100644 --- a/internal/world/room.go +++ b/internal/world/room.go @@ -103,14 +103,24 @@ type EnterStep struct { Delay int `yaml:"delay"` SetFlags map[string]any `yaml:"set_flags"` SetPlayerFlags map[string]any `yaml:"set_player_flags"` + Broadcast string `yaml:"broadcast"` + BroadcastGlobal string `yaml:"broadcast_global"` + SpawnMob *SpawnMobConfig `yaml:"spawn_mob"` + DespawnMob string `yaml:"despawn_mob"` + GiveItem string `yaml:"give_item"` + TakeItem string `yaml:"take_item"` + Teleport int `yaml:"teleport"` + Heal int `yaml:"heal"` } -// IsTimed reports whether the step carries cutscene semantics: a tick delay or -// a flag mutation. A room whose qualifying on_enter steps are all non-timed is -// printed synchronously; any timed step turns the sequence into a scheduled -// cutscene. +// IsTimed reports whether the step carries enter-sequence semantics (any +// non-zero field means it needs per-tick scheduling rather than synchronous +// printing). func (e EnterStep) IsTimed() bool { - return e.Delay > 0 || len(e.SetFlags) > 0 || len(e.SetPlayerFlags) > 0 + return e.Delay > 0 || len(e.SetFlags) > 0 || len(e.SetPlayerFlags) > 0 || + e.Message != "" || e.Broadcast != "" || e.BroadcastGlobal != "" || + e.SpawnMob != nil || e.DespawnMob != "" || e.GiveItem != "" || + e.TakeItem != "" || e.Teleport != 0 || e.Heal != 0 } type RoomObject struct { |
