diff options
| author | jj | 2012-08-03 16:54:40 +0200 |
|---|---|---|
| committer | jj | 2012-08-03 17:00:02 +0200 |
| commit | c1bcd270e9488f668f0c38c4d8ac736f5368ee00 (patch) | |
| tree | 76df5fc57b1f7bbd04b40cb6c17c1249579dcf7a /scripts | |
| parent | f400591080b29add7b64d196b4bf3911c2803ded (diff) | |
| download | dfhack-c1bcd270e9488f668f0c38c4d8ac736f5368ee00.tar.gz dfhack-c1bcd270e9488f668f0c38c4d8ac736f5368ee00.tar.bz2 dfhack-c1bcd270e9488f668f0c38c4d8ac736f5368ee00.tar.xz | |
ruby: add spawn_water/spawn_magma methods to MapTile
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/magmasource.rb | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/scripts/magmasource.rb b/scripts/magmasource.rb index 8525d51e..e9708083 100644 --- a/scripts/magmasource.rb +++ b/scripts/magmasource.rb @@ -12,26 +12,16 @@ when 'here' end $magma_sources.each { |x, y, z| - if tile = df.map_tile_at(x, y, z) and DFHack::TiletypeShape::PassableFlow[tile.shape] + if tile = df.map_tile_at(x, y, z) and tile.shape_passableflow des = tile.designation - des.flow_size += 1 if des.flow_size < 7 - des.liquid_type = 1 - des.flow_forbid = true - - mf = tile.mapblock.flags - mf.update_liquid = true - mf.update_liquid_twice = true - - zf = df.world.map.z_level_flags[z] - zf.update = true - zf.update_twice = true + tile.spawn_magma(des.flow_size + 1) if des.flow_size < 7 end } } if df.cursor.x != -30000 if tile = df.map_tile_at(df.cursor) - if DFHack::TiletypeShape::PassableFlow[tile.shape] + if tile.shape_passableflow $magma_sources << [df.cursor.x, df.cursor.y, df.cursor.z] else puts "Impassable tile: I'm afraid I can't do that, Dave" |
