diff options
| author | Petr Mrázek | 2012-03-11 22:25:30 +0100 |
|---|---|---|
| committer | Petr Mrázek | 2012-03-11 22:25:30 +0100 |
| commit | 3b87f7bd3ad0d948211865cb2608ba75c35514bb (patch) | |
| tree | 7c14d85f10632495147fc05f987dfdae9fd8d594 /plugins/tweak.cpp | |
| parent | 32cc4c892889110644ebfeb5e4a2e5859bd057cf (diff) | |
| download | dfhack-3b87f7bd3ad0d948211865cb2608ba75c35514bb.tar.gz dfhack-3b87f7bd3ad0d948211865cb2608ba75c35514bb.tar.bz2 dfhack-3b87f7bd3ad0d948211865cb2608ba75c35514bb.tar.xz | |
Add revforget command, lair plugin
revforget throws away data reveal keeps in order to be able to hide
the revealed parts of the map
lair allows marking the map as monster lair (or the opposite while
using the 'reset' option)
Diffstat (limited to 'plugins/tweak.cpp')
| -rw-r--r-- | plugins/tweak.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/plugins/tweak.cpp b/plugins/tweak.cpp index 92689552..aefd3e45 100644 --- a/plugins/tweak.cpp +++ b/plugins/tweak.cpp @@ -46,8 +46,6 @@ 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 lair\n" - " Mark the map as monster lair, preventing item scatter on reclaim.\n" )); return CR_OK; } @@ -85,37 +83,7 @@ static command_result tweak(color_ostream &out, vector <string> ¶meters) crime->flags.bits.discovered = true; } } - else if(cmd == "lair") - { - return lair(out,parameters); - } else return CR_WRONG_USAGE; return CR_OK; } - -#include "modules/Maps.h" - -command_result lair(color_ostream &out, std::vector<std::string> & params) -{ - if (!Maps::IsValid()) - { - out.printerr("Map is not available!\n"); - return CR_FAILURE; - } - uint32_t x_max,y_max,z_max; - Maps::getSize(x_max,y_max,z_max); - for (size_t i = 0; i < world->map.map_blocks.size(); i++) - { - df::map_block *block = world->map.map_blocks[i]; - DFHack::occupancies40d & occupancies = block->occupancy; - // for each tile in block - for (uint32_t x = 0; x < 16; x++) for (uint32_t y = 0; y < 16; y++) - { - // set to revealed - occupancies[x][y].bits.monster_lair = true; - } - } - out.print("Map monsterized.\n"); - return CR_OK; -}
\ No newline at end of file |
