diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp index 58c1a87f9..cc4af8d95 100644 --- a/library/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -73,6 +73,7 @@ using namespace DFHack; #include "df/building_water_wheelst.h" #include "df/building_wellst.h" #include "df/building_rollersst.h" +#include "df/building_floodgatest.h" using namespace df::enums; using df::global::ui; @@ -369,6 +370,12 @@ df::building *Buildings::allocInstance(df::coord pos, df::building_type type, in obj->ready_timeout = 500; break; } + case building_type::Floodgate: + { + auto obj = (df::building_floodgatest*)bld; + obj->gate_flags.bits.closed = true; + break; + } default: break; } diff --git a/plugins/ruby/building.rb b/plugins/ruby/building.rb index 492d5249d..f749d51ae 100644 --- a/plugins/ruby/building.rb +++ b/plugins/ruby/building.rb @@ -57,9 +57,10 @@ module DFHack bld.setSubtype(subtype) bld.setCustomType(custom) case type + when :Well; bld.bucket_z = bld.z 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 :Trap; bld.ready_timeout = 500 if bld.trap_type == :PressurePlate when :Floodgate; bld.gate_flags.closed = true end bld