You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
918 B
42 lines
918 B
|
2 years ago
|
#ifdef _DEBUG
|
||
|
|
#include "lua/modules/dev/level/map.hpp"
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
#include <sol/sol.hpp>
|
||
|
|
|
||
|
|
#include "automap.h"
|
||
|
|
#include "lua/metadoc.hpp"
|
||
|
|
|
||
|
|
namespace devilution {
|
||
|
|
namespace {
|
||
|
|
|
||
|
|
std::string DebugCmdMapReveal()
|
||
|
|
{
|
||
|
|
for (int x = 0; x < DMAXX; x++)
|
||
|
|
for (int y = 0; y < DMAXY; y++)
|
||
|
|
UpdateAutomapExplorer({ x, y }, MAP_EXP_SHRINE);
|
||
|
|
return "Automap fully explored.";
|
||
|
|
}
|
||
|
|
|
||
|
|
std::string DebugCmdMapHide()
|
||
|
|
{
|
||
|
|
for (int x = 0; x < DMAXX; x++)
|
||
|
|
for (int y = 0; y < DMAXY; y++)
|
||
|
|
AutomapView[x][y] = MAP_EXP_NONE;
|
||
|
|
return "Automap exploration removed.";
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace
|
||
|
|
|
||
|
|
sol::table LuaDevLevelMapModule(sol::state_view &lua)
|
||
|
|
{
|
||
|
|
sol::table table = lua.create_table();
|
||
|
|
SetDocumented(table, "hide", "()", "Hide the map.", &DebugCmdMapHide);
|
||
|
|
SetDocumented(table, "reveal", "()", "Reveal the map.", &DebugCmdMapReveal);
|
||
|
|
return table;
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace devilution
|
||
|
|
#endif // _DEBUG
|