diff options
| author | Quietust | 2012-03-18 14:42:13 -0500 |
|---|---|---|
| committer | Quietust | 2012-03-18 14:42:13 -0500 |
| commit | a40c386cef2b5797ec1677f39f4125700fc6f083 (patch) | |
| tree | c8ca8f4aafd1e0023413378e9cc23d8028d5309d /plugins/probe.cpp | |
| parent | a8a540eeb8c5ee31cb7372d0823e9928fabe31d4 (diff) | |
| download | dfhack-a40c386cef2b5797ec1677f39f4125700fc6f083.tar.gz dfhack-a40c386cef2b5797ec1677f39f4125700fc6f083.tar.bz2 dfhack-a40c386cef2b5797ec1677f39f4125700fc6f083.tar.xz | |
Update bprobe to always display ID numbers (and put them in parentheses after the name)
Diffstat (limited to 'plugins/probe.cpp')
| -rw-r--r-- | plugins/probe.cpp | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/plugins/probe.cpp b/plugins/probe.cpp index cc3cbb0f..aa207518 100644 --- a/plugins/probe.cpp +++ b/plugins/probe.cpp @@ -300,38 +300,56 @@ command_result df_bprobe (color_ostream &out, vector <string> & parameters) continue; string name; building.origin->getName(&name); - out.print("Building %i - \"%s\" - type %s", - building.origin->id, name.c_str(), - ENUM_KEY_STR(building_type, building.type).c_str()); + out.print("Building %i - \"%s\" - type %s (%i)", + building.origin->id, + name.c_str(), + ENUM_KEY_STR(building_type, building.type).c_str(), + building.type); switch (building.type) { case building_type::Civzone: - out.print(", subtype %s", ENUM_KEY_STR(civzone_type, building.civzone_type).c_str()); + out.print(", subtype %s (%i)", + ENUM_KEY_STR(civzone_type, building.civzone_type).c_str(), + building.civzone_type); break; case building_type::Furnace: - out.print(", subtype %s", ENUM_KEY_STR(furnace_type, building.furnace_type).c_str()); + out.print(", subtype %s (%i)", + ENUM_KEY_STR(furnace_type, building.furnace_type).c_str(), + building.furnace_type); if (building.furnace_type == furnace_type::Custom) - out.print(", custom type %i (%s)", building.custom_type, - world->raws.buildings.all[building.custom_type]->code.c_str()); + out.print(", custom type %s (%i)", + world->raws.buildings.all[building.custom_type]->code.c_str(), + building.custom_type); break; case building_type::Workshop: - out.print(", subtype %s", ENUM_KEY_STR(workshop_type, building.workshop_type).c_str()); + out.print(", subtype %s (%i)", + ENUM_KEY_STR(workshop_type, building.workshop_type).c_str(), + building.workshop_type); if (building.workshop_type == workshop_type::Custom) - out.print(", custom type %i (%s)", building.custom_type, - world->raws.buildings.all[building.custom_type]->code.c_str()); + out.print(", custom type %s (%i)", + world->raws.buildings.all[building.custom_type]->code.c_str(), + building.custom_type); break; case building_type::Construction: - out.print(", subtype %s", ENUM_KEY_STR(construction_type, building.construction_type).c_str()); + out.print(", subtype %s (%i)", + ENUM_KEY_STR(construction_type, building.construction_type).c_str(), + building.construction_type); break; case building_type::Shop: - out.print(", subtype %s", ENUM_KEY_STR(shop_type, building.shop_type).c_str()); + out.print(", subtype %s (%i)", + ENUM_KEY_STR(shop_type, building.shop_type).c_str(), + building.shop_type); break; case building_type::SiegeEngine: - out.print(", subtype %s", ENUM_KEY_STR(siegeengine_type, building.siegeengine_type).c_str()); + out.print(", subtype %s (%i)", + ENUM_KEY_STR(siegeengine_type, building.siegeengine_type).c_str(), + building.siegeengine_type); break; case building_type::Trap: - out.print(", subtype %s", ENUM_KEY_STR(trap_type, building.trap_type).c_str()); + out.print(", subtype %s (%i)", + ENUM_KEY_STR(trap_type, building.trap_type).c_str(), + building.trap_type); break; default: if (building.subtype != -1) |
