aboutsummaryrefslogtreecommitdiff
path: root/internal/object/object.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/object/object.go')
-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"`