aboutsummaryrefslogtreecommitdiff
path: root/internal/game/utils.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-12 23:52:06 -0400
committerhistoria <[not public]>2026-06-12 23:52:06 -0400
commita19e6b6ab01670a5932308c7bd0e0e5eed8cbcad (patch)
tree80a2e46c3e6cc98bb8b4f708cc403949b14742eb /internal/game/utils.go
parentf3a6ae488bbd2128af8356b0da016699c5abb70e (diff)
downloadthehouseoficarus-a19e6b6ab01670a5932308c7bd0e0e5eed8cbcad.tar.gz
feat: firemaking skill implemented. overhauled how ground items and despawn are handled.
Diffstat (limited to 'internal/game/utils.go')
-rw-r--r--internal/game/utils.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/game/utils.go b/internal/game/utils.go
index c78889d..969eba4 100644
--- a/internal/game/utils.go
+++ b/internal/game/utils.go
@@ -121,6 +121,19 @@ func actionDesc(p *player.Player) string {
return "talking to " + target
case "use":
return "using a " + target
+ case "burn":
+ return "trying to start a fire"
+ case "stoke":
+ return "tending to a fire"
}
return ""
}
+
+func (g *Game) newInvSlot(itemID string, qty int) *player.InventorySlot {
+ slot := &player.InventorySlot{ItemID: itemID, Quantity: qty}
+ if def, err := g.ItemStore.Load(itemID); err == nil && def.MaxQuality > 0 {
+ slot.Quality = def.Quality
+ slot.MaxQuality = def.MaxQuality
+ }
+ return slot
+}