diff options
Diffstat (limited to 'internal/game/utils.go')
| -rw-r--r-- | internal/game/utils.go | 13 |
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 +} |
