dfhack/scripts/drainaquifer.rb

14 lines
331 B
Ruby

2012-09-17 13:15:20 -06:00
# remove all aquifers from the map
count = 0
df.each_map_block { |b|
2013-04-21 02:56:09 -06:00
if b.designation[0][0].water_table or b.designation[8][8].water_table
2012-09-17 13:15:20 -06:00
count += 1
2013-04-21 02:56:09 -06:00
df.each_map_block_z(b.map_pos.z) { |bz|
bz.designation.each { |dx| dx.each { |dy| dy.water_table = false } }
}
2012-09-17 13:15:20 -06:00
end
}
2013-04-21 02:56:09 -06:00
puts "cleared #{count} aquifer#{'s' if count > 1}"