From 1df6c49c3b815d70e1b4bee3bafc8d80ff111364 Mon Sep 17 00:00:00 2001 From: Nicholas McDaniel Date: Sat, 15 Nov 2025 21:33:20 -0500 Subject: [PATCH] Various updates for v53 items/buildings --- docs/changelog.txt | 3 +++ docs/guides/quickfort-user-guide.rst | 2 ++ library/modules/Items.cpp | 1 + plugins/autolabor/laborstatemap.h | 6 ++++++ plugins/blueprint.cpp | 24 ++++++++++++++++++++++-- plugins/suspendmanager.cpp | 5 ++++- 6 files changed, 38 insertions(+), 3 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 9ea0853484..d235191e3e 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -59,8 +59,11 @@ Template for new versions: ## New Features ## Fixes +- `suspendmanager`: treat reinforced walls as a blocking construction and buildable platform ## Misc Improvements +- `blueprint`: support for reinforced walls and bolt throwers +- `autolabor`: support for new dying and siege-related labors ## Documentation diff --git a/docs/guides/quickfort-user-guide.rst b/docs/guides/quickfort-user-guide.rst index a5b39c529b..dae03c3aba 100644 --- a/docs/guides/quickfort-user-guide.rst +++ b/docs/guides/quickfort-user-guide.rst @@ -2298,8 +2298,10 @@ Symbol Type Properties ``ek`` kiln ``en`` magma kiln ``ib`` ballista +``it`` bolt thrower ``ic`` catapult ``Cw`` wall +``CW`` reinforced wall ``Cf`` floor ``Cr`` ramp ``Cu`` up stair diff --git a/library/modules/Items.cpp b/library/modules/Items.cpp index 5b9e781721..b3d327881e 100644 --- a/library/modules/Items.cpp +++ b/library/modules/Items.cpp @@ -1200,6 +1200,7 @@ int Items::getItemBaseValue(int16_t item_type, int16_t item_subtype, break; case CATAPULTPARTS: case BALLISTAPARTS: + case BOLT_THROWER_PARTS: case TRAPPARTS: value = 30; break; diff --git a/plugins/autolabor/laborstatemap.h b/plugins/autolabor/laborstatemap.h index a9472bcc2e..3757011d63 100644 --- a/plugins/autolabor/laborstatemap.h +++ b/plugins/autolabor/laborstatemap.h @@ -282,6 +282,12 @@ const dwarf_state dwarf_states[] = { dwarf_state::OTHER /* HeistItem */, dwarf_state::OTHER /* InterrogateSubject */, dwarf_state::OTHER /* AcceptHeistItem */, + dwarf_state::BUSY /* StoreSquadEquipmentItem */, + dwarf_state::BUSY /* MixDye */, + dwarf_state::BUSY /* DyeLeather */, + dwarf_state::BUSY /* ConstructBoltThrowerParts */, + dwarf_state::BUSY /* LoadBoltThrower */, + dwarf_state::BUSY /* FireBoltThrower */, }; #define ARRAY_COUNT(array) (sizeof(array)/sizeof((array)[0])) diff --git a/plugins/blueprint.cpp b/plugins/blueprint.cpp index 26caf25816..98b4c1c155 100644 --- a/plugins/blueprint.cpp +++ b/plugins/blueprint.cpp @@ -16,6 +16,7 @@ #include "TileTypes.h" #include "modules/Buildings.h" +#include "modules/Constructions.h" #include "modules/Filesystem.h" #include "modules/Gui.h" #include "modules/Maps.h" @@ -33,6 +34,7 @@ #include "df/building_trapst.h" #include "df/building_water_wheelst.h" #include "df/building_workshopst.h" +#include "df/construction.h" #include "df/engraving.h" #include "df/entity_position.h" #include "df/tile_bitmask.h" @@ -610,6 +612,7 @@ static const char * get_construction_str(df::building *b) { case construction_type::TrackRampNEW: return "trackrampNEW"; case construction_type::TrackRampSEW: return "trackrampSEW"; case construction_type::TrackRampNSEW: return "trackrampNSEW"; + case construction_type::ReinforcedWall: return "CW"; case construction_type::NONE: default: return "~"; @@ -632,6 +635,13 @@ static const char * get_constructed_track_str(df::tiletype *tt, return cache(str); } +static const char * get_constructed_wall_str(df::coord pos) { + df::construction *c = Constructions::findAtTile(pos); + if (!c || !(c->flags.bits.reinforced)) + return "Cw"; + return "CW"; +} + static const char * get_constructed_floor_str(df::tiletype *tt) { if (tileSpecial(*tt) != df::tiletype_special::TRACK) return "Cf"; @@ -653,7 +663,7 @@ static const char * get_tile_construct(color_ostream &out, const df::coord &pos, return NULL; switch (tileShape(*tt)) { - case tiletype_shape::WALL: return "Cw"; + case tiletype_shape::WALL: return get_constructed_wall_str(pos); case tiletype_shape::FLOOR: return get_constructed_floor_str(tt); case tiletype_shape::RAMP: return get_constructed_ramp_str(tt); case tiletype_shape::FORTIFICATION: return "CF"; @@ -732,7 +742,17 @@ static const char * get_bridge_str(df::building *b) { static const char * get_siege_str(df::building *b) { df::building_siegeenginest *se = virtual_cast(b); - return !se || se->type == df::siegeengine_type::Catapult ? "ic" : "ib"; + if (!se) + return "ic"; + + switch(se->type) { + case df::siegeengine_type::Catapult: return "ic"; + case df::siegeengine_type::Ballista: return "ib"; + case df::siegeengine_type::BoltThrower: return "it"; + default: + return "ic"; + } + } static const char * get_workshop_str(df::building *b) { diff --git a/plugins/suspendmanager.cpp b/plugins/suspendmanager.cpp index d63d6a99c9..0756e10832 100644 --- a/plugins/suspendmanager.cpp +++ b/plugins/suspendmanager.cpp @@ -113,11 +113,13 @@ using df::coord; // impassible constructions static const std::bitset<64> construction_impassible = std::bitset<64>() .set(construction_type::Wall) + .set(construction_type::ReinforcedWall) .set(construction_type::Fortification); // constructions requiring same support as walls static const std::bitset<64> construction_wall_support = std::bitset<64>() .set(construction_type::Wall) + .set(construction_type::ReinforcedWall) .set(construction_type::Fortification) .set(construction_type::UpStair) .set(construction_type::UpDownStair); @@ -395,7 +397,8 @@ class SuspendManager { // other tiles can become suitable if a wall is being constructed below auto below = Buildings::findAtTile(coord(pos.x,pos.y,pos.z-1)); if (below && below->getType() == df::building_type::Construction && - below->getSubtype() == construction_type::Wall) + (below->getSubtype() == construction_type::Wall || + below->getSubtype() == construction_type::ReinforcedWall)) return true; return false;