From 9d4b799db4868bcab291b83599ff088763cd4ed6 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 24 Jun 2026 20:58:25 -0400 Subject: feat: new type of non-violent 'combat': work --- internal/object/object.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/object') diff --git a/internal/object/object.go b/internal/object/object.go index 12e5585..f7a0e7b 100644 --- a/internal/object/object.go +++ b/internal/object/object.go @@ -12,11 +12,13 @@ type UseInteraction struct { type ObjectDef struct { ID string `yaml:"id"` Name string `yaml:"name"` + Aliases []string `yaml:"aliases"` Color string `yaml:"color"` Hidden bool `yaml:"hidden"` InRoomDescription string `yaml:"inroom_description"` RemovalItem string `yaml:"removal_item"` Description string `yaml:"description"` + Descriptions []ConditionalDesc `yaml:"descriptions,omitempty"` UseInteractions []UseInteraction `yaml:"use_interactions"` StealTable string `yaml:"steal_table"` StealLevel int `yaml:"steal_level"` @@ -30,6 +32,15 @@ type ObjectDef struct { Safespot *SafespotConfig `yaml:"safespot,omitempty"` } +// ConditionalDesc is a description variant gated by a condition. They are +// evaluated in order per-looker; the first whose condition passes (or has no +// condition) wins. If a def has Descriptions but none match for a given player, +// the object is treated as absent for that player. +type ConditionalDesc struct { + Text string `yaml:"text"` + Condition *action.Condition `yaml:"condition"` +} + type SafespotConfig struct { Tier int `yaml:"tier"` MaxBlockSize string `yaml:"max_block_size"` -- cgit v1.2.3