aboutsummaryrefslogtreecommitdiff
path: root/internal/object
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-24 20:58:25 -0400
committerhistoria <[not public]>2026-06-24 20:58:25 -0400
commit9d4b799db4868bcab291b83599ff088763cd4ed6 (patch)
tree252f0fcc779acf35243983d643d6399ee2e0cd0b /internal/object
parentd25638d98fe63efdeab570ef77e6a6a97f2d7a60 (diff)
downloadthehouseoficarus-9d4b799db4868bcab291b83599ff088763cd4ed6.tar.gz
feat: new type of non-violent 'combat': work
Diffstat (limited to 'internal/object')
-rw-r--r--internal/object/object.go11
1 files changed, 11 insertions, 0 deletions
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"`