From 0b886399fe71402ef3ff95a00774f38e6da60f02 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sun, 15 Nov 2020 22:18:54 -0500 Subject: [PATCH] zone: stop enumnick from taking priority over assign/unassign/slaughter Fixes #1709 Ref #1652 --- docs/changelog.txt | 1 + plugins/zone.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 0a5909ae3..8ca5fa316 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -39,6 +39,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `buildingplan`: no longer erroneously matches items to buildings while the game is paused - `dwarfmonitor`: fixed a crash when opening the ``prefs`` screen if units have vague preferences - `embark-assistant`: fixed an issue causing incursion resource matching (e.g. sand/clay) to skip some tiles if those resources were provided only through incursions +- `zone`: fixed an issue causing the ``enumnick`` subcommand to run when attempting to run ``assign``, ``unassign``, or ``slaughter`` ## Misc Improvements - `buildingplan`: all buildings, furniture, and constructions are now supported (except for instruments) diff --git a/plugins/zone.cpp b/plugins/zone.cpp index c32122241..25b4be950 100644 --- a/plugins/zone.cpp +++ b/plugins/zone.cpp @@ -449,7 +449,7 @@ void unitInfo(color_ostream & out, df::unit* unit, bool verbose = false) out << ", milkable"; if(unit->flags2.bits.slaughter) out << ", slaughter"; - + if(verbose) { out << ". Pos: ("<pos.x << "/"<< unit->pos.y << "/" << unit->pos.z << ") " << endl; @@ -1493,7 +1493,7 @@ command_result df_zone (color_ostream &out, vector & parameters) bool cagezone_assign = false; bool nick_set = false; string target_nick; - bool enum_nick = true; + bool enum_nick = false; string enum_prefix; bool verbose = false; @@ -1552,8 +1552,7 @@ command_result df_zone (color_ostream &out, vector & parameters) return CR_OK; } else { out.color(COLOR_BLUE); - out << "Current building unset (no building under" - "cursor)." << endl; + out << "Current building unset (no building under cursor)." << endl; out.reset_color(); return CR_OK; @@ -2127,7 +2126,7 @@ command_result df_zone (color_ostream &out, vector & parameters) } continue; } - + matchedCount++; if(unit_info)