From a226d72e51eecb768b13600303f73483118d9104 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 10 Jun 2026 01:48:28 -0400 Subject: feat: implemented janky object interaction model --- internal/object/item.go | 8 +++++--- internal/object/object.go | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'internal/object') diff --git a/internal/object/item.go b/internal/object/item.go index 84e43b1..170e07f 100644 --- a/internal/object/item.go +++ b/internal/object/item.go @@ -31,13 +31,15 @@ type ItemDef struct { Name string `yaml:"name"` Aliases []string `yaml:"aliases"` Description string `yaml:"description"` - Value int `yaml:"value"` // credits + Value int `yaml:"value"` Stackable bool `yaml:"stackable"` EquipSlot EquipSlot `yaml:"equip_slot"` WeaponType WeaponType `yaml:"weapon_type"` Stats ItemStats `yaml:"stats"` - Speed int `yaml:"speed"` // ticks between attacks - Toolbelt bool `yaml:"toolbelt"` // can go on toolbelt + Speed int `yaml:"speed"` + Toolbelt bool `yaml:"toolbelt"` + ToolType string `yaml:"tool_type"` + ToolSpeed int `yaml:"tool_speed"` } type ItemStats struct { diff --git a/internal/object/object.go b/internal/object/object.go index 3b8741a..edee3ab 100644 --- a/internal/object/object.go +++ b/internal/object/object.go @@ -1,8 +1,8 @@ package object type ObjectDef struct { - ID string `yaml:"id"` - Name string `yaml:"name"` - Behavior string `yaml:"behavior"` - Props map[string]any `yaml:"props"` + ID string `yaml:"id"` + Name string `yaml:"name"` + BehaviorID string `yaml:"behavior"` + Props map[string]any `yaml:"props"` } -- cgit v1.2.3