ruby: fix building_alloc Trap, and init Floodgates as closed

develop
jj 2012-09-24 19:11:42 +02:00
parent a2bb322344
commit a622ee52e9
1 changed files with 2 additions and 0 deletions

@ -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