DFHack / dfhack

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

createitem and gui/create-item don't set plant growth subtypes properly #898

Open lethosor opened 8 years ago

lethosor commented 8 years ago

Reported by @kane-t at http://www.bay12forums.com/smf/index.php?topic=139553.msg6939738#msg6939738 :

Noticed a problem with the gui/create-item plugin: it doesn't correctly set the subtype for plant growths. If you try to create an apple, for instance (plant growth -> plants -> apple tree -> fruit) it'll leave the subtype as -1, which results in a glitched item with no name or properties. The correct subtype for fruits should be 2.

quietust commented 8 years ago

The "createitem" plugin similarly needs special logic to treat the material as a plant ID and growth ID.

lethosor commented 4 years ago

Confirmed in 0.47.04-r2. In addition, the wrong tile is used for created growths, so setting item_plant_growthst.growth_print may be necessary. Relevant forum discussion: http://www.bay12forums.com/smf/index.php?topic=164123.msg8137432#msg8137432 (https://github.com/DFHack/df-structures/issues/403 is somewhat related)

lethosor commented 4 years ago

createitem supports this as of #1659, and ItemTypeInfo has slightly-improved support with c9609ad5.

Leaving this open until gui/create-item and Items::createItem also have support.