diff --git a/NEWS b/NEWS index 342aa1bbd..331575211 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ DFHack 0.40.13-r1 - added ruby df.print_color(color, string) method for dfhack console Fixes: - no more -e after terminating + - fixed superdwarf DFHack 0.40.12-r1 Fixes: diff --git a/plugins/ruby/ruby.rb b/plugins/ruby/ruby.rb index edce8ac84..af957c76b 100644 --- a/plugins/ruby/ruby.rb +++ b/plugins/ruby/ruby.rb @@ -179,7 +179,7 @@ module DFHack if not onlylastpart out << name.first_name if name.first_name != '' 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_FIRST; out.pop end diff --git a/scripts/superdwarf.rb b/scripts/superdwarf.rb index 93e299362..4aaa08231 100644 --- a/scripts/superdwarf.rb +++ b/scripts/superdwarf.rb @@ -16,9 +16,12 @@ when 'add' $superdwarf_ids.each { |id| if u = df.unit_find(id) and not u.flags1.dead # faster walk/work - if u.counters.job_counter > 0 - u.counters.job_counter = 0 - end + u.actions.each { |a| + case a.type + when :Move, :Climb, :Job, :Job2 + a.data.send(a.type.to_s.downcase).timer = 0 + end + } # no sleep if u.counters2.sleepiness_timer > 10000