From 60a2f615c001e46072747f3296e2da19cbdde76d Mon Sep 17 00:00:00 2001 From: Rose Date: Sat, 7 Jan 2023 21:06:47 -0800 Subject: [PATCH] Enabled probe, and fixed the one thing preventing it from compiling. Before this can be considered updated, it would need to be able to find the currently selected building or creature from the game, but it does work as-is when the keyboard cursor is enabled in the game. --- plugins/CMakeLists.txt | 2 +- plugins/probe.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 2b2f3aad5..6e0dc7e00 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -144,7 +144,7 @@ dfhack_plugin(overlay overlay.cpp LINK_LIBRARIES lua) dfhack_plugin(pathable pathable.cpp LINK_LIBRARIES lua) #dfhack_plugin(petcapRemover petcapRemover.cpp) #dfhack_plugin(plants plants.cpp) -#dfhack_plugin(probe probe.cpp) +dfhack_plugin(probe probe.cpp) #dfhack_plugin(prospector prospector.cpp LINK_LIBRARIES lua) #dfhack_plugin(power-meter power-meter.cpp LINK_LIBRARIES lua) #dfhack_plugin(regrass regrass.cpp) diff --git a/plugins/probe.cpp b/plugins/probe.cpp index 7781812b9..d55e4e135 100644 --- a/plugins/probe.cpp +++ b/plugins/probe.cpp @@ -477,8 +477,8 @@ command_result df_bprobe (color_ostream &out, vector & parameters) out.print(", subtype %i", building.subtype); break; } - if(building.origin->is_room) //isRoom()) - out << ", room"; + if(building.origin->relations.size()) //Connected to rooms. + out << ", " << building.origin->relations.size() << " rooms"; if(building.origin->getBuildStage()!=building.origin->getMaxBuildStage()) out << ", in construction"; out.print("\n");