diff options
| author | Robert Heinrich | 2012-04-17 16:57:41 +0200 |
|---|---|---|
| committer | Robert Heinrich | 2012-04-17 16:57:41 +0200 |
| commit | 40f36c19128f2daa7e40c5a1d882ffd1f5b5f47f (patch) | |
| tree | 8d0755ca672f1e596ddb9a2763db8023ebbe2de8 /plugins/tweak.cpp | |
| parent | 6d180d61c483350d19f08c5cdb74edd4aaff21da (diff) | |
| download | dfhack-40f36c19128f2daa7e40c5a1d882ffd1f5b5f47f.tar.gz dfhack-40f36c19128f2daa7e40c5a1d882ffd1f5b5f47f.tar.bz2 dfhack-40f36c19128f2daa7e40c5a1d882ffd1f5b5f47f.tar.xz | |
minor stuff, use building->is_room instead of building->isRoom() which returns unexpected values
Diffstat (limited to 'plugins/tweak.cpp')
| -rw-r--r-- | plugins/tweak.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/tweak.cpp b/plugins/tweak.cpp index 31969bde..43b557fe 100644 --- a/plugins/tweak.cpp +++ b/plugins/tweak.cpp @@ -140,7 +140,7 @@ static command_result tweak(color_ostream &out, vector <string> ¶meters) if (cmd == "clear-missing") { - df::unit *unit = getSelectedUnit(out); + df::unit *unit = getSelectedUnit(out, true); if (!unit) return CR_FAILURE; @@ -157,7 +157,7 @@ static command_result tweak(color_ostream &out, vector <string> ¶meters) } else if (cmd == "clear-ghostly") { - df::unit *unit = getSelectedUnit(out); + df::unit *unit = getSelectedUnit(out, true); if (!unit) return CR_FAILURE; @@ -176,13 +176,9 @@ static command_result tweak(color_ostream &out, vector <string> ¶meters) } else if (cmd == "fixmigrant") { - df::unit *unit = getSelectedUnit(out); - + df::unit *unit = getSelectedUnit(out, true); if (!unit) - { - out << "No unit selected!" << endl; return CR_FAILURE; - } if(unit->race != df::global::ui->race_id) { @@ -213,12 +209,10 @@ static command_result tweak(color_ostream &out, vector <string> ¶meters) { // force a unit into your fort, regardless of civ or race // allows to "steal" caravan guards etc - df::unit *unit = getSelectedUnit(out); + df::unit *unit = getSelectedUnit(out, true); if (!unit) - { - out << "No unit selected!" << endl; return CR_FAILURE; - } + if (unit->flags2.bits.resident) unit->flags2.bits.resident = 0; if(unit->flags1.bits.merchant) |
