From 6af362db399a84fe0598da71de81d0df8d344205 Mon Sep 17 00:00:00 2001 From: jj Date: Sat, 4 Jan 2014 01:55:48 +0100 Subject: [PATCH] add scripts/devel/spawn-unit-helper.rb --- scripts/devel/spawn-unit-helper.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/devel/spawn-unit-helper.rb diff --git a/scripts/devel/spawn-unit-helper.rb b/scripts/devel/spawn-unit-helper.rb new file mode 100644 index 000000000..999fe7e45 --- /dev/null +++ b/scripts/devel/spawn-unit-helper.rb @@ -0,0 +1,29 @@ +# setup stuff to allow arena creature spawn after a mode change + +df.world.arena_spawn.race.clear +df.world.arena_spawn.caste.clear + +df.world.raws.creatures.all.length.times { |r_idx| + df.world.raws.creatures.all[r_idx].caste.length.times { |c_idx| + df.world.arena_spawn.race << r_idx + df.world.arena_spawn.caste << c_idx + } +} + +df.world.arena_spawn.creature_cnt[df.world.arena_spawn.race.length-1] = 0 + +puts <