Show infotext for unknown nodes
authorPerttu Ahola <celeron55@gmail.com>
Sat, 3 Dec 2011 11:51:16 +0000 (13:51 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 3 Dec 2011 11:51:16 +0000 (13:51 +0200)
src/game.cpp

index abeceae0b443e88e4e5150932c81dd31b5d0fa31..a90d1e0c1c362d7c1dd06d96f4f7aef483c3e204 100644 (file)
@@ -1814,6 +1814,14 @@ void the_game(
                        {
                                infotext = narrow_to_wide(meta->infoText());
                        }
+                       else
+                       {
+                               MapNode n = client.getNode(nodepos);
+                               if(nodedef->get(n).tname_tiles[0] == "unknown_block.png"){
+                                       infotext = L"Unknown node: ";
+                                       infotext += narrow_to_wide(nodedef->get(n).name);
+                               }
+                       }
                        
                        /*
                                Handle digging