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
def dig(mode=:Default)
if mode == :Smooth
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
mapblock.flags.designated = true
end
mapblock.flags.designated = true if mode != :No
end
def spawn_liquid(quantity, is_magma=false, flowing=true)