Files
cultivation-world-simulator/src/classes
4thfever 6185d314af refactor: remove region_names dict, use regions traversal instead (#40)
The region_names dictionary was a redundant index that needed manual
sync when HistoryManager modified region names. This caused bugs where
resolve_query couldn't find regions by their new (history-modified) names.

Instead of maintaining two data structures (regions[id] and region_names[name]),
we now only use regions[id] as the single source of truth. The _resolve_region
function iterates over regions.values() to find matches by name.

This approach:
- Eliminates the sync bug entirely
- Simplifies the codebase
- Has negligible performance impact (region count is small)

Co-authored-by: Zihao Xu <xzhseh@gmail.com>
2026-01-18 17:13:28 +08:00
..
2026-01-14 16:58:50 +08:00
2026-01-14 17:17:21 +08:00
2026-01-08 00:33:41 +08:00
2026-01-14 16:58:50 +08:00
2026-01-14 16:58:50 +08:00
2025-08-18 23:50:49 +08:00
2025-11-11 19:48:18 +08:00
2025-12-18 21:52:00 +08:00
2026-01-06 21:23:06 +08:00
2025-11-26 21:09:54 +08:00
2025-10-25 01:26:24 +08:00
2026-01-18 16:37:08 +08:00
2026-01-11 20:40:53 +08:00
2026-01-04 22:25:25 +08:00
2025-12-20 20:30:30 +08:00
2026-01-04 22:03:05 +08:00
2026-01-14 02:33:13 +08:00
2026-01-06 23:01:25 +08:00
2026-01-03 21:45:19 +08:00
2025-12-29 21:46:26 +08:00
2026-01-06 21:23:06 +08:00
2026-01-04 22:49:20 +08:00
2025-09-10 22:55:31 +08:00
2026-01-11 19:26:05 +08:00
2026-01-18 16:47:54 +08:00
2025-12-22 00:30:09 +08:00
2026-01-18 16:37:08 +08:00
2026-01-07 23:14:48 +08:00
2026-01-03 23:54:47 +08:00
2025-12-29 22:02:44 +08:00
2025-10-31 00:35:05 +08:00
2026-01-07 23:14:48 +08:00
2026-01-03 22:05:45 +08:00
2026-01-12 23:25:53 +08:00
2025-11-26 15:22:48 +08:00
2026-01-03 21:25:24 +08:00
2026-01-06 22:13:47 +08:00
2025-10-23 00:19:35 +08:00
2026-01-04 22:03:05 +08:00
2026-01-08 00:42:40 +08:00
2025-11-17 23:24:37 +08:00
2026-01-12 23:25:53 +08:00
2026-01-14 16:58:50 +08:00
2025-12-29 21:46:26 +08:00
2025-11-26 15:06:41 +08:00
2026-01-04 22:03:05 +08:00
2025-11-08 02:42:28 +08:00
2025-12-11 00:49:39 +08:00
2026-01-18 16:37:08 +08:00
2026-01-04 22:03:05 +08:00
2026-01-11 23:12:48 +08:00
2026-01-14 02:33:13 +08:00
2026-01-18 16:37:08 +08:00
2025-12-20 19:26:53 +08:00
2025-11-08 02:53:12 +08:00
2025-09-13 22:45:46 +08:00
2026-01-18 16:37:08 +08:00
2026-01-18 16:47:54 +08:00