Created
June 14, 2017 13:20
-
-
Save amezick/2adebc5cd3246d23901fc976650ebafd to your computer and use it in GitHub Desktop.
Allow dwarfs to use corpses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found this or something close on the dwarf fortress forum.