mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-22 08:34:50 +00:00
Merge pull request #454 from josephcsible/noenableunlisted
Fix "disable/enable all" affecting lands not in the list
This commit is contained in:
@@ -1046,10 +1046,11 @@ EX void customize_land_list() {
|
|||||||
|
|
||||||
if(use_custom_land_list) {
|
if(use_custom_land_list) {
|
||||||
dialog::addItem("disable/enable all", 'D');
|
dialog::addItem("disable/enable all", 'D');
|
||||||
dialog::add_action([] {
|
std::vector<eLand> ll(landlist);
|
||||||
|
dialog::add_action([ll] {
|
||||||
int qty = 0;
|
int qty = 0;
|
||||||
for(int i=0; i<landtypes; i++) if(custom_land_list[i]) qty++;
|
for(eLand l: ll) if(custom_land_list[l]) qty++;
|
||||||
for(int i=0; i<landtypes; i++) custom_land_list[i] = !qty;
|
for(eLand l: ll) custom_land_list[l] = !qty;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else dialog::addBreak(100);
|
else dialog::addBreak(100);
|
||||||
|
|||||||
Reference in New Issue
Block a user