summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjj2012-09-17 21:15:20 +0200
committerjj2012-09-18 10:17:32 +0200
commit2032f8e4070292d5777fb6b28d007f9c05076630 (patch)
tree1deca8fd0c39e98219e500ac9f84e42bb95bb0b9
parent711a9bd9b2f6cbba96cc9fe0efa85e3835f94d2a (diff)
downloaddfhack-2032f8e4070292d5777fb6b28d007f9c05076630.tar.gz
dfhack-2032f8e4070292d5777fb6b28d007f9c05076630.tar.bz2
dfhack-2032f8e4070292d5777fb6b28d007f9c05076630.tar.xz
scripts/drainaquifer
-rw-r--r--scripts/drainaquifer.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/drainaquifer.rb b/scripts/drainaquifer.rb
new file mode 100644
index 00000000..4e2ae4ff
--- /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"