fix superdwarf

develop
jj 2014-09-25 22:02:31 +02:00
parent 0766538ecd
commit eed684a8df
3 changed files with 8 additions and 4 deletions

@ -6,6 +6,7 @@ DFHack 0.40.13-r1
- added ruby df.print_color(color, string) method for dfhack console - added ruby df.print_color(color, string) method for dfhack console
Fixes: Fixes:
- no more -e after terminating - no more -e after terminating
- fixed superdwarf
DFHack 0.40.12-r1 DFHack 0.40.12-r1
Fixes: Fixes:

@ -179,7 +179,7 @@ module DFHack
if not onlylastpart if not onlylastpart
out << name.first_name if name.first_name != '' out << name.first_name if name.first_name != ''
if name.nickname != '' if name.nickname != ''
case respond_to?(:d_init) && d_init.nickname_dwarf case respond_to?(:d_init) && d_init.nickname[gametype]
when :REPLACE_ALL; return "`#{name.nickname}'" when :REPLACE_ALL; return "`#{name.nickname}'"
when :REPLACE_FIRST; out.pop when :REPLACE_FIRST; out.pop
end end

@ -16,9 +16,12 @@ when 'add'
$superdwarf_ids.each { |id| $superdwarf_ids.each { |id|
if u = df.unit_find(id) and not u.flags1.dead if u = df.unit_find(id) and not u.flags1.dead
# faster walk/work # faster walk/work
if u.counters.job_counter > 0 u.actions.each { |a|
u.counters.job_counter = 0 case a.type
end when :Move, :Climb, :Job, :Job2
a.data.send(a.type.to_s.downcase).timer = 0
end
}
# no sleep # no sleep
if u.counters2.sleepiness_timer > 10000 if u.counters2.sleepiness_timer > 10000