diff options
| author | jj | 2012-09-12 01:07:19 +0200 |
|---|---|---|
| committer | jj | 2012-09-12 01:07:19 +0200 |
| commit | cda17954c81973318b6214a47a463dee0024a77f (patch) | |
| tree | 76f9253e8cd9a5abf462f39c05d67ca6935e3bd3 /plugins/ruby | |
| parent | 7b86f203c3b7493c6ceddbd84d40b1766bee7015 (diff) | |
| download | dfhack-cda17954c81973318b6214a47a463dee0024a77f.tar.gz dfhack-cda17954c81973318b6214a47a463dee0024a77f.tar.bz2 dfhack-cda17954c81973318b6214a47a463dee0024a77f.tar.xz | |
ruby: add MapTile.dig(:Smooth)
Diffstat (limited to 'plugins/ruby')
| -rw-r--r-- | plugins/ruby/map.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/ruby/map.rb b/plugins/ruby/map.rb index dccea729..5b4e9421 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) |
