ruby: add MapTile.dig(:Smooth)

develop
jj 2012-09-12 01:07:19 +02:00
parent 7b86f203c3
commit cda17954c8
1 changed files with 11 additions and 2 deletions

@ -189,8 +189,17 @@ module DFHack
end end
def dig(mode=:Default) def dig(mode=:Default)
designation.dig = mode if mode == :Smooth
mapblock.flags.designated = true if tilemat != :SOIL and caption !~ /smooth|pillar/i # XXX
# need to check if already smooth, otherwise re-setting
# des.smooth will carve a fortification
designation.dig = :No
designation.smooth = 1
end
else
designation.dig = mode
end
mapblock.flags.designated = true if mode != :No
end end
def spawn_liquid(quantity, is_magma=false, flowing=true) def spawn_liquid(quantity, is_magma=false, flowing=true)