* fix: use str() instead of .value for realm i18n display Fix bug where user-facing messages displayed raw enum values like "FOUNDATION_ESTABLISHMENT" instead of translated names like "筑基". The Realm and Stage classes already have __str__ methods that return i18n translated text, but several places were incorrectly using .value which returns the raw enum string. Changed files: - src/classes/single_choice.py: item exchange messages - src/classes/kill_and_grab.py: loot messages - src/classes/fortune.py: fortune discovery messages - src/classes/avatar/inventory_mixin.py: purchase error messages Also added unit tests and integration tests to prevent regression. * test: add integration tests for all modified files Add tests covering: - kill_and_grab.py: context string realm display - fortune.py: weapon/auxiliary intro realm display - inventory_mixin.py: can_buy_item error message realm display
4.7 KiB
4.7 KiB