Skip to content

Commit

Permalink
Merge branch 'develop' into adv-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Sep 4, 2024
2 parents 4968b8d + f1df6d5 commit 27b5925
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Template for new versions:
- `regrass`: no longer add all compatible grass types when using ``--force`` without ``--new``
- `regrass`: ``--mud`` now converts muddy slade to grass, consistent with normal DF behavior
- `gui/pathable`: fix hang when showing trade depot wagon access and a trade depot is submerged under water
- `gui/pathable`: fix incorrect calculation of wagon paths over stairs and through doors

## Misc Improvements
- `sort`: can now search for stockpiles on the Places>Stockpile tab by name, number, or enabled item categories
Expand Down
4 changes: 3 additions & 1 deletion plugins/lua/preserve-rooms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ ReservedWidget.ATTRS{
'dwarfmode/Zone/Some/Tomb',
},
frame={w=44, h=15},
version=2,
}

local new_world_loaded = true
Expand Down Expand Up @@ -136,7 +137,8 @@ function ReservedWidget:init()
visible=function()
local scr = dfhack.gui.getDFViewscreen(true)
return not dfhack.gui.matchFocusString('dwarfmode/UnitSelector', scr) and
not dfhack.gui.matchFocusString('dwarfmode/LocationSelector', scr)
not dfhack.gui.matchFocusString('dwarfmode/LocationSelector', scr) and
not dfhack.gui.matchFocusString('dwarfmode/LocationDetails', scr)
end,
subviews={
widgets.Panel{
Expand Down
12 changes: 8 additions & 4 deletions plugins/pathable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,22 @@ struct FloodCtx {

static bool is_wagon_traversible(FloodCtx & ctx, const df::coord & pos, const df::coord & prev_pos) {
if (auto bld = Buildings::findAtTile(pos)) {
if (bld->getType() == df::building_type::Trap)
auto btype = bld->getType();
if (btype == df::building_type::Trap || btype == df::building_type::Door)
return false;
}

if (ctx.wgroup == Maps::getWalkableGroup(pos))
return true;

auto tt = Maps::getTileType(pos);
if (!tt)
return false;

auto shape = tileShape(*tt);
if (shape == df::tiletype_shape::STAIR_UP || shape == df::tiletype_shape::STAIR_UPDOWN)
return false;

if (ctx.wgroup == Maps::getWalkableGroup(pos))
return true;

if (shape == df::tiletype_shape::RAMP_TOP ) {
df::coord pos_below = pos + df::coord(0, 0, -1);
if (Maps::getWalkableGroup(pos_below)) {
Expand Down

0 comments on commit 27b5925

Please sign in to comment.