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
2 changes: 1 addition & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Template for new versions:
- `dig-now`: fix cases where boulders/rough gems of incorrect material were being generated when digging through walls
- `dig-now`: properly generate ice boulders when digging through ice walls
- `gui/teleport`: now properly handles teleporting units that are currently falling or being flung
- ``Core.cpp``: now properly handles "load", "unload", and "reload" plugin commands given to Core::runCommand()
- `unload`: fix recent regression where `unload` would immediately `reload` the target

## Misc Improvements
- `spectate`: show dwarves' activities (like prayer)
Expand Down
23 changes: 13 additions & 10 deletions library/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,19 +818,22 @@ command_result Core::runCommand(color_ostream &con, const std::string &first_, s
ret = CR_FAILURE;
else if (unload && !plug_mgr->unloadAll())
ret = CR_FAILURE;
else if (!plug_mgr->reloadAll())
else if (reload && !plug_mgr->reloadAll())
ret = CR_FAILURE;
}
for (auto p = parts.begin(); p != parts.end(); p++)
else
{
if (!p->size() || (*p)[0] == '-')
continue;
if (load && !plug_mgr->load(*p))
ret = CR_FAILURE;
else if (unload && !plug_mgr->unload(*p))
ret = CR_FAILURE;
else if (reload && !plug_mgr->reload(*p))
ret = CR_FAILURE;
for (auto p = parts.begin(); p != parts.end(); p++)
{
if (!p->size() || (*p)[0] == '-')
continue;
if (load && !plug_mgr->load(*p))
ret = CR_FAILURE;
else if (unload && !plug_mgr->unload(*p))
ret = CR_FAILURE;
else if (reload && !plug_mgr->reload(*p))
ret = CR_FAILURE;
}
}
if (ret != CR_OK)
con.printerr("%s failed\n", first.c_str());
Expand Down