buildingplan: fix an issue preventing some numbers from being used in names

develop
lethosor 2017-06-03 18:25:49 -04:00
parent 9f18cb5bdc
commit b2f05834d9
1 changed files with 4 additions and 0 deletions

@ -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)