Skip to content

Instantly share code, notes, and snippets.

@amezick
Created June 14, 2017 13:20
Show Gist options
  • Save amezick/2adebc5cd3246d23901fc976650ebafd to your computer and use it in GitHub Desktop.
Save amezick/2adebc5cd3246d23901fc976650ebafd to your computer and use it in GitHub Desktop.
Allow dwarfs to use corpses
function fixcorpestockpile()
local building = stockpile or dfhack.gui.getSelectedBuilding(true)
if building ~= nil and building:getType() ~= 29 then building = nil end
if building == nil then
error("Select a stockpile")
else
local rootItems = dfhack.buildings.getStockpileContents(building);
if #rootItems == 0 then
error("Select a non-empty stockpile")
else
for i,d in ipairs(rootItems) do
print(i ..":"..dfhack.items.getDescription(d, d:getType())..":")
print(d.flags.dead_dwarf)
d.flags.dead_dwarf = false
end
end
end
end
fixcorpestockpile()
@amezick
Copy link
Author

amezick commented Jun 14, 2017

Found this or something close on the dwarf fortress forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment