Show unknown node in debug screen (#12230)

This commit is contained in:
Wuzzy 2022-04-28 16:51:46 +00:00 committed by GitHub
parent a2f13e479b
commit 7f4fc6f8a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -151,9 +151,13 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
const NodeDefManager *nodedef = client->getNodeDefManager();
MapNode n = map.getNode(pointed_old.node_undersurface);
if (n.getContent() != CONTENT_IGNORE && nodedef->get(n).name != "unknown") {
os << ", pointed: " << nodedef->get(n).name
<< ", param2: " << (u64) n.getParam2();
if (n.getContent() != CONTENT_IGNORE) {
if (nodedef->get(n).name == "unknown") {
os << ", pointed: <unknown node>";
} else {
os << ", pointed: " << nodedef->get(n).name;
}
os << ", param2: " << (u64) n.getParam2();
}
}