Add burial.lua by Putnam

It's useful, and why not?
develop
Peridexis Errant 2015-05-09 17:29:03 +10:00
parent 939cab4451
commit d7717a92ab
3 changed files with 25 additions and 0 deletions

@ -9,6 +9,7 @@ DFHack Future
New scripts
view-item-info: adds information and customisable descriptions to item viewscreens
fix-ster: changes fertility/sterility of animals or dwarves
burial: sets all unowned coffins to allow burial ("-pets" to allow pets too)
New tweaks
New features
dwarfmonitor date format can be modified (see Readme)

@ -2247,6 +2247,11 @@ If the name of the patch has no extension or directory separators, the
script uses ``hack/patches/<df-version>/<name>.dif``, thus auto-selecting
the version appropriate for the currently loaded executable.
burial
======
Sets all unowned coffins to allow burial. ``burial -pets`` also allows burial
of pets.
create-items
============
Spawn arbitrary items under the cursor.

@ -0,0 +1,19 @@
-- allows burial in unowned coffins
-- by Putnam https://gist.github.com/Putnam3145/e7031588f4d9b24b9dda
local utils=require('utils')
validArgs = validArgs or utils.invert({
'pets'
})
local args = utils.processArgs({...}, validArgs)
for k,v in ipairs(df.global.world.buildings.other.COFFIN) do
if v.owner_id==-1 then
v.burial_mode.allow_burial=true
if not args.pets then
v.burial_mode.no_pets=true
end
end
end