Merge remote-tracking branch 'jjyg/master'

Conflicts:
	NEWS
develop
Kelly Martin 2012-11-16 13:20:46 -06:00
commit fc1a1e1f0e
3 changed files with 17 additions and 2 deletions

@ -12,6 +12,7 @@ DFHack future
- removebadthoughts: add --dry-run option
New tweaks:
- tweak military-training: speed up melee squad training up to 10x (depends on unit count).
- 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.

@ -21,7 +21,7 @@ module DFHack
when :SelectTrainer
v.trainer_unit[v.trainer_cursor]
end
else
when :viewscreen_dwarfmodest
case ui.main.mode
when :ViewUnits
# nobody selected => idx == 0
@ -33,6 +33,15 @@ module DFHack
else
ui.follow_unit_tg if ui.follow_unit != -1
end
when :viewscreen_dungeonmodest
case ui_advmode.menu
when :Default
world.units.active[0]
else
unit_find(cursor) # XXX
end
when :viewscreen_dungeon_monsterstatusst
curview.unit
end
elsif what.kind_of?(Integer)
# search by id

@ -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