DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.87k stars 475 forks source link

[0.44.10-r1 x64] Stockpile Load/Save does not inherit all settings #1294

Closed Tharn closed 6 years ago

Tharn commented 6 years ago

When saving and loading weapons and armor stockpiles, I noticed that the usable and unusable options for stockpiles are not copied along with the rest, resulting in empty stockpiles until I'd gone and fixed them by hand.

usable and unusable are only retained if you create a stockpile and later load stockpile settings of the same type, i.e. weapons -> weapons. For all other combinations, loading a stockpile setting renders the stockpile inactive.

The extra options of empty cages, empty animal traps and prepared food all transfer okay.

lethosor commented 6 years ago

Is this the only setting with an issue? Do you happen to know when DF introduced this setting? The stockpiles plugin might predate it.

Tharn commented 6 years ago

Yeah, I tried the others and this seems to be the only one. No idea when it was added, but I never noticed it before now. Must be a 0.44 thing at least?

quietust commented 6 years ago

The "usable" and "unusable" flags for the Weapon stockpile section have been in Dwarf Fortress since nearly forever - they existed back in 0.28.181.40d, and they even existed in 0.23.130.23a with slightly different names (Local/Foreign).

lethosor commented 6 years ago

Good to know. Looking at StockpileSerializer, it appears to handle these flags for weapon and armor stockpiles. I'm not sure if the issue is with loading them or saving them.

lethosor commented 6 years ago

Fix merged (#1311)