From 2032f8e4070292d5777fb6b28d007f9c05076630 Mon Sep 17 00:00:00 2001 From: jj Date: Mon, 17 Sep 2012 21:15:20 +0200 Subject: [PATCH] scripts/drainaquifer --- scripts/drainaquifer.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/drainaquifer.rb diff --git a/scripts/drainaquifer.rb b/scripts/drainaquifer.rb new file mode 100644 index 000000000..4e2ae4ff1 --- /dev/null +++ b/scripts/drainaquifer.rb @@ -0,0 +1,11 @@ +# remove all aquifers from the map + +count = 0 +df.each_map_block { |b| + if b.designation[0][0].water_table or b.designation[15][15].water_table + count += 1 + b.designation.each { |dx| dx.each { |dy| dy.water_table = false } } + end +} + +puts "cleared #{count} map blocks"