mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
make schematic selection deterministic
This commit is contained in:
parent
befe493ff0
commit
063e17bc0a
2 changed files with 4 additions and 3 deletions
|
@ -52,8 +52,9 @@ function mcl_structures.place_structure(pos, def, pr)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if def.filenames then
|
if def.filenames then
|
||||||
table.shuffle(def.filenames)
|
if #def.filenames <= 0 then return false end
|
||||||
local file = def.filenames[1]
|
local r = pr:next(1,#def.filenames)
|
||||||
|
local file = def.filenames[r]
|
||||||
if file then
|
if file then
|
||||||
local ap = function(pos,def,pr) end
|
local ap = function(pos,def,pr) end
|
||||||
if def.after_place then ap = def.after_place end
|
if def.after_place then ap = def.after_place end
|
||||||
|
|
|
@ -91,7 +91,7 @@ local cold = {
|
||||||
y_max = -2,
|
y_max = -2,
|
||||||
biomes = cold_oceans,
|
biomes = cold_oceans,
|
||||||
chunk_probability = 64,
|
chunk_probability = 64,
|
||||||
sidelen = 4,
|
sidelen = 8,
|
||||||
filenames = {
|
filenames = {
|
||||||
modpath.."/schematics/mcl_structures_ocean_ruins_cold_1.mts",
|
modpath.."/schematics/mcl_structures_ocean_ruins_cold_1.mts",
|
||||||
modpath.."/schematics/mcl_structures_ocean_ruins_cold_2.mts",
|
modpath.."/schematics/mcl_structures_ocean_ruins_cold_2.mts",
|
||||||
|
|
Loading…
Reference in a new issue