scripts/superdwarf: advmode support

develop
jj 2012-11-16 17:46:41 +01:00
parent 423c122424
commit 342badac98
2 changed files with 7 additions and 1 deletions

@ -10,6 +10,7 @@ DFHack future
- fastdwarf: new mode using debug flags, and some internal consistency fixes.
- added a small stand-alone utility for applying and removing binary patches.
- removebadthoughts: add --dry-run option
- superdwarf: work in adventure mode too
New scripts:
- binpatch: the same as the stand-alone binpatch.exe, but works at runtime.
- region-pops: displays animal populations of the region and allows tweaking them.

@ -8,7 +8,12 @@ when 'add'
if u = df.unit_find
$superdwarf_ids |= [u.id]
$superdwarf_onupdate ||= df.onupdate_register(1) {
if df.gamemode == :ADVENTURE
onupdate_delay = nil
else
onupdate_delay = 1
end
$superdwarf_onupdate ||= df.onupdate_register(onupdate_delay) {
if $superdwarf_ids.empty?
df.onupdate_unregister($superdwarf_onupdate)
$superdwarf_onupdate = nil