mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
All settings: Fix missing flags checkbox caused by 'possible flags' order (#8997)
Previously, the 'rivers' checkbox was missing for mgcarpathian, caused by the 'possible flags' order: 'caverns,nocaverns,rivers,norivers'. Also reorder mgcarpathian 'possible flags', but only for consistency.
This commit is contained in:
parent
5fde69798c
commit
b79741c90f
@ -688,14 +688,16 @@ local function create_change_setting_formspec(dialogdata)
|
|||||||
height = height - 1
|
height = height - 1
|
||||||
|
|
||||||
local fields = {} -- To build formspec
|
local fields = {} -- To build formspec
|
||||||
for i, name in ipairs(setting.possible) do
|
local j = 1
|
||||||
|
for _, name in ipairs(setting.possible) do
|
||||||
if name:sub(1, 2) ~= "no" then
|
if name:sub(1, 2) ~= "no" then
|
||||||
local x = 0.5
|
local x = 0.5
|
||||||
local y = height + i / 2 - 0.75
|
local y = height + j / 2 - 0.75
|
||||||
if i - 1 >= flags_count / 2 then -- 2nd column
|
if j - 1 >= flags_count / 2 then -- 2nd column
|
||||||
x = 5
|
x = 5
|
||||||
y = y - max_height
|
y = y - max_height
|
||||||
end
|
end
|
||||||
|
j = j + 1;
|
||||||
local checkbox_name = "cb_" .. name
|
local checkbox_name = "cb_" .. name
|
||||||
local is_enabled = flags[name] == true -- to get false if nil
|
local is_enabled = flags[name] == true -- to get false if nil
|
||||||
checkboxes[checkbox_name] = is_enabled
|
checkboxes[checkbox_name] = is_enabled
|
||||||
|
@ -1615,7 +1615,7 @@ mgv7_np_dungeons (Dungeon noise) noise_params_3d 0.9, 0.5, (500, 500, 500), 0, 2
|
|||||||
[*Mapgen Carpathian]
|
[*Mapgen Carpathian]
|
||||||
|
|
||||||
# Map generation attributes specific to Mapgen Carpathian.
|
# Map generation attributes specific to Mapgen Carpathian.
|
||||||
mgcarpathian_spflags (Mapgen Carpathian specific flags) flags caverns,norivers caverns,nocaverns,rivers,norivers
|
mgcarpathian_spflags (Mapgen Carpathian specific flags) flags caverns,norivers caverns,rivers,nocaverns,norivers
|
||||||
|
|
||||||
# Defines the base ground level.
|
# Defines the base ground level.
|
||||||
mgcarpathian_base_level (Base ground level) float 12.0
|
mgcarpathian_base_level (Base ground level) float 12.0
|
||||||
|
Loading…
Reference in New Issue
Block a user