mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 11:18:08 +00:00
Changes: - Add player_state type checking before accessing encounteredNPCs - Reset player_state to empty hash if not a Hash type - Add comprehensive logging for type mismatches - Change from concat to array addition (+) to avoid in-place mutation issues - Wrap entire method in try-catch to prevent NPC tracking from breaking room loading - Add detailed error logging with stack traces Fixes: - TypeError: no implicit conversion of Array into String - Handles legacy data where player_state might be malformed - Room loading continues even if NPC tracking fails