refactored default_land_structure

This commit is contained in:
Zeno Rogue 2021-06-03 12:26:24 +02:00
parent 168fc5705f
commit 196d0dcb4c
1 changed files with 6 additions and 3 deletions

View File

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