mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
Add missiles to tile data debug command
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "engine/load_cel.hpp"
|
||||
#include "engine/point.hpp"
|
||||
#include "lighting.h"
|
||||
#include "missiles.h"
|
||||
#include "monster.h"
|
||||
#include "plrmsg.h"
|
||||
#include "utils/str_case.hpp"
|
||||
@@ -208,6 +209,16 @@ bool GetDebugGridText(Point dungeonCoords, std::string &debugGridText)
|
||||
case DebugGridTextItem::dMonster:
|
||||
info = dMonster[dungeonCoords.x][dungeonCoords.y];
|
||||
break;
|
||||
case DebugGridTextItem::missiles: {
|
||||
for (auto &missile : Missiles) {
|
||||
if (missile.position.tile == dungeonCoords) {
|
||||
if (!debugGridText.empty()) debugGridText += '\n';
|
||||
debugGridText.append(std::to_string((int)missile._mitype));
|
||||
}
|
||||
}
|
||||
if (debugGridText.empty()) return false;
|
||||
return true;
|
||||
} break;
|
||||
case DebugGridTextItem::dCorpse:
|
||||
info = dCorpse[dungeonCoords.x][dungeonCoords.y];
|
||||
break;
|
||||
|
||||
@@ -43,6 +43,7 @@ enum class DebugGridTextItem : uint16_t {
|
||||
dFlags,
|
||||
dPlayer,
|
||||
dMonster,
|
||||
missiles,
|
||||
dCorpse,
|
||||
dObject,
|
||||
dItem,
|
||||
|
||||
@@ -42,7 +42,7 @@ std::string DebugCmdFullbright(std::optional<bool> on)
|
||||
|
||||
std::string DebugCmdShowTileData(std::optional<std::string_view> dataType)
|
||||
{
|
||||
static const std::array<std::string_view, 22> DataTypes {
|
||||
static const std::array<std::string_view, 23> DataTypes {
|
||||
"microTiles",
|
||||
"dPiece",
|
||||
"dTransVal",
|
||||
@@ -51,6 +51,7 @@ std::string DebugCmdShowTileData(std::optional<std::string_view> dataType)
|
||||
"dFlags",
|
||||
"dPlayer",
|
||||
"dMonster",
|
||||
"missiles",
|
||||
"dCorpse",
|
||||
"dObject",
|
||||
"dItem",
|
||||
|
||||
Reference in New Issue
Block a user