Cataclysm-DDA
Cataclysm-DDA copied to clipboard
Missing migration for mossberg_500_security?
trafficstars
Describe the bug
#72398 by @DoctorBoomstick removed mossberg_500_security variant of mossberg_500, but did not add any migrations. Loading save files from before the change produces an error:
DEBUG : item 'mossberg_500' has no variant 'mossberg_500_security'!
FUNCTION : void item::set_itype_variant(const string&)
FILE : src/item.cpp
LINE : 9336
VERSION : cdda-experimental-2024-03-24-0121 cf9267f
Note: I do not know whether it is possible to migrate a variant of an item
Attach save file
Steps to reproduce
- Load the attached save
- Get error
Expected behavior
No error
Screenshots
No response
Versions and configuration
- OS: Linux
- OS Version:
- OS Version:
- Game Version: cdda-experimental-2024-03-24-0121 cf9267f [64-bit]
- Graphics Version: Tiles
- Game Language: System language []
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], Translate Complex Dialogue [translate_dialogue] ]
Additional context
No response
I was informed that there is, at present, no way to migrate variants and that the game would just pick a random variant itself if the one generated before the update doesn’t exist any more. As far as I know, without testing, the gun should still exist and be converted to the 500 Field. If you could confirm or deny this, it would be of assistance.
- The game does appear to convert the shotgun to 500 Field
- The documentation for item migration describes a from_variant field. If things work as documented, it should be possible to write a migration for a removed variant. I'll submit a pull request if this works.