🐛 fix Nisse stuck idle after stockpile deposit; rename Villager → Nisse in UI
This commit is contained in:
@@ -176,9 +176,9 @@ class StateManager {
|
||||
if (!p.world.crops) p.world.crops = {}
|
||||
if (!p.world.villagers) p.world.villagers = {}
|
||||
if (!p.world.stockpile) p.world.stockpile = {}
|
||||
// Reset walking villagers to idle on load
|
||||
// Reset in-flight AI states to idle on load so runtime timers start fresh
|
||||
for (const v of Object.values(p.world.villagers)) {
|
||||
if (v.aiState === 'walking') v.aiState = 'idle'
|
||||
if (v.aiState === 'walking' || v.aiState === 'working') v.aiState = 'idle'
|
||||
}
|
||||
return p
|
||||
} catch (_) { return null }
|
||||
|
||||
Reference in New Issue
Block a user