Add Putnam's remove-stress script

develop
PeridexisErrant 2014-11-30 22:30:13 +11:00
parent 9dbe639919
commit 5dcec6f683
3 changed files with 19 additions and 0 deletions

@ -8,6 +8,7 @@ DFHack Future
stockpile settings to a file. They can be used to migrate stockpile
settings between worlds and saves.
New scripts:
- remove-stress [all]: set selected or all units unit to -1,000,000 stress
Misc improvements:
- cmd-prompt can now access selected items, units, and buildings

@ -2422,6 +2422,10 @@ but in the short term your dwarves will get much more joyful.
Internals: the thoughts are set to be very old, so that the game remove them
quickly after you unpause.
remove-stress
=============
Sets stress to -1,000,000; the normal range is 0 to 500,000 with very stable or very stressed dwarves taking on negative or greater values respectively. Applies to the selected unit, or use "remove-stress all" to apply to all units.
setfps
======

@ -0,0 +1,14 @@
-- Sets stress to negative one million
-- With unit selected, affects that unit. Use "remove-stress all" to affect all units.
--By Putnam; http://www.bay12forums.com/smf/index.php?topic=139553.msg5820486#msg5820486
local args = {...}
if args[1]=='all' then
for k,v in ipairs(df.global.world.units.active) do
v.status.current_soul.personality.stress_level=-1000000
end
else
dfhack.gui.getSelectedUnit().status.current_soul.personality.stress_level=-1000000
end