summaryrefslogtreecommitdiff
path: root/plugins/ruby
diff options
context:
space:
mode:
authorjj2012-09-24 19:11:42 +0200
committerjj2012-09-24 19:11:42 +0200
commita622ee52e9e7063303ca04cc2b8ed1ae81d28a2d (patch)
treebaaca6098fcb3ba30f29e97fe4838de7a978ee6f /plugins/ruby
parenta2bb3223440a0c50768a53e6cd01a2ac450cc175 (diff)
downloaddfhack-a622ee52e9e7063303ca04cc2b8ed1ae81d28a2d.tar.gz
dfhack-a622ee52e9e7063303ca04cc2b8ed1ae81d28a2d.tar.bz2
dfhack-a622ee52e9e7063303ca04cc2b8ed1ae81d28a2d.tar.xz
ruby: fix building_alloc Trap, and init Floodgates as closed
Diffstat (limited to 'plugins/ruby')
-rw-r--r--plugins/ruby/building.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/ruby/building.rb b/plugins/ruby/building.rb
index 3f8842b4..59f71551 100644
--- a/plugins/ruby/building.rb
+++ b/plugins/ruby/building.rb
@@ -51,12 +51,14 @@ module DFHack
subtype = WorkshopType.int(subtype) if subtype.kind_of?(::Symbol) and type == :Workshop
subtype = FurnaceType.int(subtype) if subtype.kind_of?(::Symbol) and type == :Furnace
subtype = CivzoneType.int(subtype) if subtype.kind_of?(::Symbol) and type == :Civzone
+ subtype = TrapType.int(subtype) if subtype.kind_of?(::Symbol) and type == :Trap
bld.setSubtype(subtype)
bld.setCustomType(custom)
case type
when :Furnace; bld.melt_remainder[world.raws.inorganics.length] = 0
when :Coffin; bld.initBurialFlags
when :Trap; bld.unk_cc = 500 if bld.trap_type == :PressurePlate
+ when :Floodgate; bld.gate_flags.closed = true
end
bld
end