aboutsummaryrefslogtreecommitdiff
path: root/internal/object
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-17 21:13:07 -0400
committerhistoria <[not public]>2026-06-17 21:13:07 -0400
commitec2e94e3463654a6288464a4c070b48ef9bf7368 (patch)
tree3c5df0f9a6a5968fa4c725a7d331825883ae798c /internal/object
parenteef5ddaa94f8cff6010d092c30fed53d2be01524 (diff)
downloadthehouseoficarus-ec2e94e3463654a6288464a4c070b48ef9bf7368.tar.gz
feat: smithing added, item/object interaction reworked. recipes and menus refactored.
Diffstat (limited to 'internal/object')
-rw-r--r--internal/object/item.go6
-rw-r--r--internal/object/object.go26
2 files changed, 22 insertions, 10 deletions
diff --git a/internal/object/item.go b/internal/object/item.go
index efcb2c5..a6a06e1 100644
--- a/internal/object/item.go
+++ b/internal/object/item.go
@@ -55,11 +55,13 @@ type ItemDef struct {
HealValue int `yaml:"heal_value"`
EatMessage string `yaml:"eat_message"`
MadeFrom []MadeFromEntry `yaml:"made_from,omitempty"`
+ Ticks float64 `yaml:"ticks"`
}
type MadeFromEntry struct {
- Items []string `yaml:"items"`
- Qty int `yaml:"qty"`
+ Items []string `yaml:"items"`
+ Qty int `yaml:"qty"`
+ Byproducts []string `yaml:"byproducts"`
}
type ItemStats struct {
diff --git a/internal/object/object.go b/internal/object/object.go
index 46e460e..fe55865 100644
--- a/internal/object/object.go
+++ b/internal/object/object.go
@@ -1,12 +1,22 @@
package object
+import "thehouseoficarus/internal/action"
+
+type UseInteraction struct {
+ Item string `yaml:"item"`
+ Condition *action.Condition `yaml:"condition"`
+ Message string `yaml:"message"`
+ Action *action.NodeAction `yaml:"action"`
+}
+
type ObjectDef struct {
- ID string `yaml:"id"`
- Name string `yaml:"name"`
- Color string `yaml:"color"`
- BehaviorID string `yaml:"behavior"`
- Hidden bool `yaml:"hidden"`
- InRoomDescription string `yaml:"inroom_description"`
- RemovalItem string `yaml:"removal_item"`
- Props map[string]any `yaml:"props"`
+ ID string `yaml:"id"`
+ Name string `yaml:"name"`
+ Color string `yaml:"color"`
+ BehaviorID string `yaml:"behavior"`
+ Hidden bool `yaml:"hidden"`
+ InRoomDescription string `yaml:"inroom_description"`
+ RemovalItem string `yaml:"removal_item"`
+ Description string `yaml:"description"`
+ UseInteractions []UseInteraction `yaml:"use_interactions"`
}