Skip to content

Commit 1df6c49

Browse files
committed
Various updates for v53 items/buildings
1 parent 004b4dd commit 1df6c49

File tree

6 files changed

+38
-3
lines changed

6 files changed

+38
-3
lines changed

docs/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ Template for new versions:
5959
## New Features
6060

6161
## Fixes
62+
- `suspendmanager`: treat reinforced walls as a blocking construction and buildable platform
6263

6364
## Misc Improvements
65+
- `blueprint`: support for reinforced walls and bolt throwers
66+
- `autolabor`: support for new dying and siege-related labors
6467

6568
## Documentation
6669

docs/guides/quickfort-user-guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,8 +2298,10 @@ Symbol Type Properties
22982298
``ek`` kiln
22992299
``en`` magma kiln
23002300
``ib`` ballista
2301+
``it`` bolt thrower
23012302
``ic`` catapult
23022303
``Cw`` wall
2304+
``CW`` reinforced wall
23032305
``Cf`` floor
23042306
``Cr`` ramp
23052307
``Cu`` up stair

library/modules/Items.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,7 @@ int Items::getItemBaseValue(int16_t item_type, int16_t item_subtype,
12001200
break;
12011201
case CATAPULTPARTS:
12021202
case BALLISTAPARTS:
1203+
case BOLT_THROWER_PARTS:
12031204
case TRAPPARTS:
12041205
value = 30;
12051206
break;

plugins/autolabor/laborstatemap.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@ const dwarf_state dwarf_states[] = {
282282
dwarf_state::OTHER /* HeistItem */,
283283
dwarf_state::OTHER /* InterrogateSubject */,
284284
dwarf_state::OTHER /* AcceptHeistItem */,
285+
dwarf_state::BUSY /* StoreSquadEquipmentItem */,
286+
dwarf_state::BUSY /* MixDye */,
287+
dwarf_state::BUSY /* DyeLeather */,
288+
dwarf_state::BUSY /* ConstructBoltThrowerParts */,
289+
dwarf_state::BUSY /* LoadBoltThrower */,
290+
dwarf_state::BUSY /* FireBoltThrower */,
285291
};
286292

287293
#define ARRAY_COUNT(array) (sizeof(array)/sizeof((array)[0]))

plugins/blueprint.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "TileTypes.h"
1717

1818
#include "modules/Buildings.h"
19+
#include "modules/Constructions.h"
1920
#include "modules/Filesystem.h"
2021
#include "modules/Gui.h"
2122
#include "modules/Maps.h"
@@ -33,6 +34,7 @@
3334
#include "df/building_trapst.h"
3435
#include "df/building_water_wheelst.h"
3536
#include "df/building_workshopst.h"
37+
#include "df/construction.h"
3638
#include "df/engraving.h"
3739
#include "df/entity_position.h"
3840
#include "df/tile_bitmask.h"
@@ -610,6 +612,7 @@ static const char * get_construction_str(df::building *b) {
610612
case construction_type::TrackRampNEW: return "trackrampNEW";
611613
case construction_type::TrackRampSEW: return "trackrampSEW";
612614
case construction_type::TrackRampNSEW: return "trackrampNSEW";
615+
case construction_type::ReinforcedWall: return "CW";
613616
case construction_type::NONE:
614617
default:
615618
return "~";
@@ -632,6 +635,13 @@ static const char * get_constructed_track_str(df::tiletype *tt,
632635
return cache(str);
633636
}
634637

638+
static const char * get_constructed_wall_str(df::coord pos) {
639+
df::construction *c = Constructions::findAtTile(pos);
640+
if (!c || !(c->flags.bits.reinforced))
641+
return "Cw";
642+
return "CW";
643+
}
644+
635645
static const char * get_constructed_floor_str(df::tiletype *tt) {
636646
if (tileSpecial(*tt) != df::tiletype_special::TRACK)
637647
return "Cf";
@@ -653,7 +663,7 @@ static const char * get_tile_construct(color_ostream &out, const df::coord &pos,
653663
return NULL;
654664

655665
switch (tileShape(*tt)) {
656-
case tiletype_shape::WALL: return "Cw";
666+
case tiletype_shape::WALL: return get_constructed_wall_str(pos);
657667
case tiletype_shape::FLOOR: return get_constructed_floor_str(tt);
658668
case tiletype_shape::RAMP: return get_constructed_ramp_str(tt);
659669
case tiletype_shape::FORTIFICATION: return "CF";
@@ -732,7 +742,17 @@ static const char * get_bridge_str(df::building *b) {
732742
static const char * get_siege_str(df::building *b) {
733743
df::building_siegeenginest *se =
734744
virtual_cast<df::building_siegeenginest>(b);
735-
return !se || se->type == df::siegeengine_type::Catapult ? "ic" : "ib";
745+
if (!se)
746+
return "ic";
747+
748+
switch(se->type) {
749+
case df::siegeengine_type::Catapult: return "ic";
750+
case df::siegeengine_type::Ballista: return "ib";
751+
case df::siegeengine_type::BoltThrower: return "it";
752+
default:
753+
return "ic";
754+
}
755+
736756
}
737757

738758
static const char * get_workshop_str(df::building *b) {

plugins/suspendmanager.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ using df::coord;
113113
// impassible constructions
114114
static const std::bitset<64> construction_impassible = std::bitset<64>()
115115
.set(construction_type::Wall)
116+
.set(construction_type::ReinforcedWall)
116117
.set(construction_type::Fortification);
117118

118119
// constructions requiring same support as walls
119120
static const std::bitset<64> construction_wall_support = std::bitset<64>()
120121
.set(construction_type::Wall)
122+
.set(construction_type::ReinforcedWall)
121123
.set(construction_type::Fortification)
122124
.set(construction_type::UpStair)
123125
.set(construction_type::UpDownStair);
@@ -395,7 +397,8 @@ class SuspendManager {
395397
// other tiles can become suitable if a wall is being constructed below
396398
auto below = Buildings::findAtTile(coord(pos.x,pos.y,pos.z-1));
397399
if (below && below->getType() == df::building_type::Construction &&
398-
below->getSubtype() == construction_type::Wall)
400+
(below->getSubtype() == construction_type::Wall ||
401+
below->getSubtype() == construction_type::ReinforcedWall))
399402
return true;
400403

401404
return false;

0 commit comments

Comments
 (0)