Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ Template for new versions:

## Fixes
- `buildingplan`: Bolt throwers will no longer be constructed using populated bins.
- `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

Expand Down
2 changes: 2 additions & 0 deletions docs/guides/quickfort-user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions library/modules/Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions plugins/autolabor/laborstatemap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down
24 changes: 22 additions & 2 deletions plugins/blueprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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 "~";
Expand All @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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<df::building_siegeenginest>(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) {
Expand Down
5 changes: 4 additions & 1 deletion plugins/suspendmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down