Enforce minimum stats size
This commit is contained in:
parent
1e9b3c2d07
commit
888897e107
6
init.lua
6
init.lua
@ -1725,6 +1725,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
show_error_formspec(player, S("Sorry, but Perlin Explorer doesn’t support calculating statistics if the spread of any axis is larger than @1.", STATISTICS_MAX_SPREAD), false)
|
||||
return
|
||||
end
|
||||
-- Enforce a minimum size as well to at least 1 million values are in the area
|
||||
if dimensions == 2 and ssize < 1000 then
|
||||
ssize = 1000
|
||||
elseif dimensions == 3 and ssize < 100 then
|
||||
ssize = 100
|
||||
end
|
||||
local start = -math.floor(ssize/2)
|
||||
|
||||
local pos = vector.new(start, start, start)
|
||||
|
Loading…
x
Reference in New Issue
Block a user