rename scripts/slayrace -> exterminate

develop
jj 2013-03-16 00:51:04 +01:00
parent 6a31abc60f
commit 381247dc39
2 changed files with 21 additions and 4 deletions

@ -1,6 +1,7 @@
DFHack future
Is not yet known.
Misc improvements:
- exterminate: renamed from slayrace, add help message
DFHack v0.34.11-r3

@ -1,4 +1,4 @@
# slay all creatures of a given race
# exterminate creatures
# race = name of the race to eradicate, use 'him' to target only the selected creature
# use 'undead' to target all undeads
@ -24,7 +24,7 @@ slayit = lambda { |u|
else
# it's getting hot around here
# !!WARNING!! do not call on a magma-safe creature
ouh = df.onupdate_register("slayrace ensure #{u.id}", 1) {
ouh = df.onupdate_register("exterminate ensure #{u.id}", 1) {
if u.flags1.dead
df.onupdate_unregister(ouh)
else
@ -55,7 +55,23 @@ case race
when nil
all_races.sort_by { |race, cnt| [cnt, race] }.each{ |race, cnt| puts " #{race} #{cnt}" }
when 'him'
when 'help', '?'
puts <<EOS
Kills all creatures of a given race.
With no argument, lists possible targets with their head count.
With the special argument 'him' or 'her', kill only the currently selected creature.
With the special argument 'undead', kill all undead creatures/thralls.
The targets will bleed out, or if they are immune to that, will vanish in a puff of smoke.
The special final argument 'magma' will make magma rain on the targets instead.
Ex: exterminate gob
exterminate elf magma
exterminate him
EOS
when 'him', 'her'
if him = df.unit_find
slayit[him]
else