From b2f05834d9ce6fa43bf78d45da9a306f3d4d9b9d Mon Sep 17 00:00:00 2001 From: lethosor Date: Sat, 3 Jun 2017 18:25:49 -0400 Subject: [PATCH] buildingplan: fix an issue preventing some numbers from being used in names --- plugins/buildingplan.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/buildingplan.cpp b/plugins/buildingplan.cpp index 6f833ba6d..f72888d00 100644 --- a/plugins/buildingplan.cpp +++ b/plugins/buildingplan.cpp @@ -1,9 +1,11 @@ #include "buildingplan-lib.h" +#include "df/ui_sidebar_menus.h" DFHACK_PLUGIN("buildingplan"); #define PLUGIN_VERSION 0.14 REQUIRE_GLOBAL(ui); REQUIRE_GLOBAL(ui_build_selector); +REQUIRE_GLOBAL(ui_sidebar_menus); REQUIRE_GLOBAL(world); DFhackCExport command_result plugin_shutdown ( color_ostream &out ) @@ -188,6 +190,8 @@ struct buildingplan_hook : public df::viewscreen_dwarfmodest } else if (isInNobleRoomQueryMode()) { + if (ui_sidebar_menus->barracks.in_rename) + return false; auto np = getNoblePositionOfSelectedBuildingOwner(); df::interface_key last_token = get_string_key(input); if (last_token >= interface_key::STRING_A048 && last_token <= interface_key::STRING_A058)