Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit edd7d2f

Browse files
committed
fix planned buildings getting bumped to the front of the line on load
1 parent b82f394 commit edd7d2f

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

docs/changelog.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ Template for new versions:
6666
- When passing map movement keys through to the map from DFHack tool windows, also pass fast z movements (shift-scroll by default)
6767
- `getplants`: fix crash when processing mod-added plants with invalid materials
6868
- Dreamfort: fix holes in the "Inside+" burrow on the farming level (burrow autoexpand is interrupted by the pre-dug miasma vents to the surface)
69-
- DFHack tabs (e.g. in `gui/control-panel`) are now rendered correctly when there is a vanilla tab behind them
69+
- DFHack tabs (e.g. in `gui/control-panel`) are now rendered correctly when there are certain vanilla screen elements behind them
70+
- `buildingplan`: when you save a game and load it again, newly planned buildings are now correctly placed in line after existing planned buildings of the same type
7071

7172
## Misc Improvements
7273
- `autochop`: better error output when target burrows are not specified on the commandline

plugins/buildingplan/plannedbuilding.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ static set<string> get_specials(color_ostream &out, PersistentDataItem &bld_conf
7777
return ret;
7878
vector<string> specials;
7979
split_string(&specials, rawstrs[2], ",");
80-
for (auto & special : specials)
81-
ret.emplace(special);
80+
for (auto & special : specials) {
81+
if (special.size())
82+
ret.emplace(special);
83+
}
8284
return ret;
8385
}
8486

0 commit comments

Comments
 (0)