MCPcopy Create free account
hub / github.com/DFHack/dfhack / describeTile

Function describeTile

plugins/probe.cpp:71–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static void describeTile(color_ostream &out, df::tiletype tiletype) {
72 out.print("{}", static_cast<int>(tiletype));
73 if (tileName(tiletype))
74 out.print(" = {}", tileName(tiletype));
75 out.print(" ({})", ENUM_KEY_STR(tiletype, tiletype).c_str());
76 out.print("\n");
77
78 df::tiletype_shape shape = tileShape(tiletype);
79 df::tiletype_material material = tileMaterial(tiletype);
80 df::tiletype_special special = tileSpecial(tiletype);
81 df::tiletype_variant variant = tileVariant(tiletype);
82 out.print("{:>10}: {:4} {}\n","Class" ,static_cast<int>(shape),
83 ENUM_KEY_STR(tiletype_shape, shape));
84 out.print("{:>10}: {:4} {}\n","Material" , static_cast<int>(material),
85 ENUM_KEY_STR(tiletype_material, material));
86 out.print("{:>10}: {:4} {}\n","Special" , static_cast<int>(special),
87 ENUM_KEY_STR(tiletype_special, special));
88 out.print("{:>10}: {:4} {}\n","Variant" , static_cast<int>(variant),
89 ENUM_KEY_STR(tiletype_variant, variant));
90 out.print("{:>10}: {}\n" ,"Direction",
91 tileDirection(tiletype).getStr());
92 out.print("\n");
93}
94
95static command_result df_probe(color_ostream &out, vector<string> & parameters) {
96

Callers 1

df_probeFunction · 0.85

Calls 8

tileNameFunction · 0.85
tileShapeFunction · 0.85
tileMaterialFunction · 0.85
tileSpecialFunction · 0.85
tileVariantFunction · 0.85
tileDirectionFunction · 0.85
c_strMethod · 0.80
printMethod · 0.45

Tested by

no test coverage detected