From cda17954c81973318b6214a47a463dee0024a77f Mon Sep 17 00:00:00 2001 From: jj Date: Wed, 12 Sep 2012 01:07:19 +0200 Subject: [PATCH] ruby: add MapTile.dig(:Smooth) --- plugins/ruby/map.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/ruby/map.rb b/plugins/ruby/map.rb index dccea7291..5b4e94218 100644 --- a/plugins/ruby/map.rb +++ b/plugins/ruby/map.rb @@ -189,8 +189,17 @@ module DFHack end def dig(mode=:Default) - designation.dig = mode - mapblock.flags.designated = true + 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 + end + mapblock.flags.designated = true if mode != :No end def spawn_liquid(quantity, is_magma=false, flowing=true)