aboutsummaryrefslogtreecommitdiff
path: root/internal/world/world.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-17 17:34:40 -0400
committerhistoria <[not public]>2026-06-17 17:34:40 -0400
commiteef5ddaa94f8cff6010d092c30fed53d2be01524 (patch)
tree3026ebb5fe34fd778c5f8f6b6d23aec337a99b99 /internal/world/world.go
parent04998e3e4eff075eee6d00850c752c3c73ab66b5 (diff)
downloadthehouseoficarus-eef5ddaa94f8cff6010d092c30fed53d2be01524.tar.gz
feat: began implementing smithing, ground item display fixes.
Diffstat (limited to 'internal/world/world.go')
-rw-r--r--internal/world/world.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/world/world.go b/internal/world/world.go
index 7768739..9bed76e 100644
--- a/internal/world/world.go
+++ b/internal/world/world.go
@@ -482,7 +482,8 @@ func (w *World) SeedGroundItems(roomID int) {
merged := false
for _, e := range w.groundItems[roomID] {
if e.quantity > 0 && strings.EqualFold(e.itemID, s.ItemID) &&
- (e.reserveTimer <= 0 || e.reservedFor == "") {
+ (e.reserveTimer <= 0 || e.reservedFor == "") &&
+ e.despawnTimer <= 0 {
e.quantity += s.Quantity
e.respawnQty += s.Quantity
e.isSpawn = true
@@ -516,7 +517,8 @@ func (w *World) Tick() {
e.quantity = e.respawnQty
for _, other := range entries {
if other != e && other.quantity > 0 && strings.EqualFold(other.itemID, e.itemID) &&
- (other.reserveTimer <= 0 || other.reservedFor == "") {
+ (other.reserveTimer <= 0 || other.reservedFor == "") &&
+ other.despawnTimer <= 0 {
e.quantity += other.quantity
other.quantity = 0
}