diff options
| author | Robert Heinrich | 2012-03-22 16:30:15 +0100 |
|---|---|---|
| committer | Robert Heinrich | 2012-03-22 16:30:15 +0100 |
| commit | aa807343ccf7fbbadbd2fe59c11bf3cb47eb9b27 (patch) | |
| tree | 7636d7e784d0b6fa2e259c61efc951776e3ce332 /plugins/tweak.cpp | |
| parent | cf029e0a2e58ce1ba3f40ae6192cc0418fcca97c (diff) | |
| download | dfhack-aa807343ccf7fbbadbd2fe59c11bf3cb47eb9b27.tar.gz dfhack-aa807343ccf7fbbadbd2fe59c11bf3cb47eb9b27.tar.bz2 dfhack-aa807343ccf7fbbadbd2fe59c11bf3cb47eb9b27.tar.xz | |
vampcheck is now generic cursecheck, added tweak clear-ghostly
Diffstat (limited to 'plugins/tweak.cpp')
| -rw-r--r-- | plugins/tweak.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/tweak.cpp b/plugins/tweak.cpp index aefd3e45..f3369c38 100644 --- a/plugins/tweak.cpp +++ b/plugins/tweak.cpp @@ -46,6 +46,11 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi "tweak", "Various tweaks for minor bugs.", tweak, false, " tweak clear-missing\n" " Remove the missing status from the selected unit.\n" + " tweak clear-ghostly\n" + " Remove the ghostly status from the selected unit.\n" + " Intended to fix the case where you can't engrave memorials for ghosts.\n" + " Note that this is very dirty and possibly dangerous!\n" + " Most probably does not have the positive effect of a proper burial.\n" )); return CR_OK; } @@ -83,6 +88,25 @@ static command_result tweak(color_ostream &out, vector <string> ¶meters) crime->flags.bits.discovered = true; } } + else if (cmd == "clear-ghostly") + { + df::unit *unit = getSelectedUnit(out); + if (!unit) + return CR_FAILURE; + + // don't accidentally kill non-ghosts! + if (unit->flags3.bits.ghostly) + { + // remove ghostly, set to dead instead + unit->flags3.bits.ghostly = 0; + unit->flags1.bits.dead = 1; + } + else + { + out.print("That's not a ghost!\n"); + return CR_FAILURE; + } + } else return CR_WRONG_USAGE; return CR_OK; |
