enable all in quickfort mode

and simplify logic since new bool map values are already initialized to
false
develop
Myk Taylor 2020-09-23 20:00:04 -07:00
parent 323d377f63
commit 1c2761f903
1 changed files with 2 additions and 12 deletions

@ -287,12 +287,7 @@ void ViewscreenChooseMaterial::render()
//START Viewscreen Hook
static bool is_planmode_enabled(df::building_type type)
{
if (planmode_enabled.find(type) == planmode_enabled.end())
{
return false;
}
return planmode_enabled[type];
return planmode_enabled[type] || quickfort_mode;
}
struct buildingplan_hook : public df::viewscreen_dwarfmodest
@ -360,13 +355,8 @@ struct buildingplan_hook : public df::viewscreen_dwarfmodest
auto type = ui_build_selector->building_type;
if (input->count(interface_key::CUSTOM_SHIFT_P))
{
if (planmode_enabled.find(type) == planmode_enabled.end())
{
planmode_enabled[type] = false;
}
planmode_enabled[type] = !planmode_enabled[type];
if (!planmode_enabled[type])
if (!is_planmode_enabled(type))
{
Gui::refreshSidebar();
in_dummy_screen = false;