debug commands: dropitem/dropunique

This commit is contained in:
qndel 2021-08-21 16:50:59 +02:00 committed by Anders Jenbo
commit 6fca66ad8a
3 changed files with 72 additions and 0 deletions

View file

@ -272,6 +272,16 @@ std::string DebugCmdRefillHealthMana(const std::string_view parameter)
return "Ready for more.";
}
std::string DebugCmdGenerateUniqueItem(const std::string_view parameter)
{
return DebugSpawnItem(parameter.data(), true);
}
std::string DebugCmdGenerateItem(const std::string_view parameter)
{
return DebugSpawnItem(parameter.data(), false);
}
std::vector<DebugCmdItem> DebugCmdList = {
{ "help", "Prints help overview or help for a specific command.", "({command})", &DebugCmdHelp },
{ "give gold", "Fills the inventory with gold.", "", &DebugCmdGiveGoldCheat },
@ -286,6 +296,8 @@ std::vector<DebugCmdItem> DebugCmdList = {
{ "r_drawvision", "Togggles vision debug rendering.", "", &DebugCmdVision },
{ "r_fullbright", "Toggles whether light shading is in effect.", "", &DebugCmdLighting },
{ "refill", "Refills health and mana.", "", &DebugCmdRefillHealthMana },
{ "dropunique", "Attempts to generate unique item {name}.", "{name}", &DebugCmdGenerateUniqueItem },
{ "dropitem", "Attempts to generate item {name}.", "{name}", &DebugCmdGenerateItem },
};
} // namespace