From 196d0dcb4c2464e6357c694fe013dea667a902d0 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 3 Jun 2021 12:26:24 +0200 Subject: [PATCH] refactored default_land_structure --- menus.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/menus.cpp b/menus.cpp index f48bf649..bde4367e 100644 --- a/menus.cpp +++ b/menus.cpp @@ -702,16 +702,19 @@ EX void mode_higlights() { dialog::display(); } -EX void menuitem_land_structure(char key) { - eLandStructure ls = +EX bool default_land_structure() { + return bounded ? lsSingle : (tactic::on || princess::challenge) ? lsSingle : yendor::on ? yendor::get_land_structure() : specialland == laCanvas ? lsSingle : nice_walls_available() ? lsNiceWalls : lsNoWalls; + } - if(ls == land_structure && !ineligible_starting_land) +EX void menuitem_land_structure(char key) { + + if(default_land_structure() == land_structure && !ineligible_starting_land) dialog::addBoolItem(XLAT("land structure"), false, key); else dialog::addSelItem(XLAT("land structure"), land_structure_name(true), key);