fix reading numbers from settings
This commit is contained in:
parent
aac48ccc68
commit
94e9446ae9
@ -1,12 +1,12 @@
|
||||
local goblin_enabled = minetest.settings:get_bool("commoditymarket_enable_goblin_market")
|
||||
local under_enabled = minetest.settings:get_bool("commoditymarket_enable_under_market")
|
||||
local goblin_prob = minetest.settings:get("commoditymarket_goblin_market_dungeon_prob") or 0.25
|
||||
local under_prob = minetest.settings:get("commoditymarket_under_market_dungeon_prob") or 0.1
|
||||
local goblin_prob = tonumber(minetest.settings:get("commoditymarket_goblin_market_dungeon_prob")) or 0.25
|
||||
local under_prob = tonumber(minetest.settings:get("commoditymarket_under_market_dungeon_prob")) or 0.1
|
||||
|
||||
local goblin_max = minetest.settings:get("commoditymarket_goblin_market_dungeon_max") or -100
|
||||
local goblin_min = minetest.settings:get("commoditymarket_goblin_market_dungeon_min") or -300
|
||||
local under_max = minetest.settings:get("commoditymarket_under_market_dungeon_max") or -500
|
||||
local under_min = minetest.settings:get("commoditymarket_under_market_dungeon_min") or -31000
|
||||
local goblin_max = tonumber(minetest.settings:get("commoditymarket_goblin_market_dungeon_max")) or 100
|
||||
local goblin_min = tonumber(minetest.settings:get("commoditymarket_goblin_market_dungeon_min")) or -400
|
||||
local under_max = tonumber(minetest.settings:get("commoditymarket_under_market_dungeon_max")) or -500
|
||||
local under_min = tonumber(minetest.settings:get("commoditymarket_under_market_dungeon_min")) or -31000
|
||||
|
||||
local bad_goblin_range = goblin_min >= goblin_max
|
||||
local bad_under_range = under_min >= under_max
|
||||
|
@ -14,8 +14,8 @@ commoditymarket_protect_under_market (Protect Undermarket node) bool true
|
||||
|
||||
[Dungeon market generation]
|
||||
commoditymarket_goblin_market_dungeon_prob (Goblin market probability per dungeon mapblock) float 0.25 0 1
|
||||
commoditymarket_goblin_market_dungeon_max (Upper y limit of goblin markets) int -100
|
||||
commoditymarket_goblin_market_dungeon_min (Lower y limit of goblin markets) int -300
|
||||
commoditymarket_goblin_market_dungeon_max (Upper y limit of goblin markets) int 100
|
||||
commoditymarket_goblin_market_dungeon_min (Lower y limit of goblin markets) int -400
|
||||
commoditymarket_under_market_dungeon_prob (Undermarket probability per dungeon mapblock) float 0.1 0 1
|
||||
commoditymarket_under_market_dungeon_max (Upper y limit of undermarkets) int -500
|
||||
commoditymarket_under_market_dungeon_min (Lower y limit of undermarkets) int -31000
|
||||
|
Loading…
x
Reference in New Issue
Block a user