Rename chunk to noisechunk for clarity
This commit is contained in:
parent
1af265c845
commit
6d966daaba
25
init.lua
25
init.lua
@ -16,9 +16,10 @@ local COLOR_PRECISION = 4
|
||||
-- Time to wait in seconds before checking and generating new nodes in autobuild mode.
|
||||
local AUTOBUILD_UPDATE_TIME = 0.1
|
||||
|
||||
-- x/y/z size of chunks to generate in autobuild mode.
|
||||
-- x/y/z size of "noisechunks" (like chunks in the Minetest mapgen, but specific to this
|
||||
-- mod) to generate in autobuild mode.
|
||||
local AUTOBUILD_SIZE = 24
|
||||
-- Amount of chunks to generate around player
|
||||
-- Amount of noisechunks to generate around player
|
||||
local AUTOBUILD_CHUNKDIST = 2
|
||||
|
||||
|
||||
@ -474,7 +475,7 @@ local create_perlin = function(pos, options)
|
||||
pos = center,
|
||||
expirationtime = 4,
|
||||
size = 16,
|
||||
texture = "perlin_explorer_new_chunk_particle.png",
|
||||
texture = "perlin_explorer_new_noisechunk.png",
|
||||
glow = minetest.LIGHT_MAX,
|
||||
})
|
||||
if stats then
|
||||
@ -1045,25 +1046,25 @@ minetest.register_globalstep(function(dtime)
|
||||
end
|
||||
end
|
||||
end
|
||||
local chunks = {}
|
||||
local noisechunks = {}
|
||||
for n=1, #neighbors do
|
||||
local offset = vector.multiply(neighbors[n], AUTOBUILD_SIZE)
|
||||
local npos = vector.add(pos, offset)
|
||||
local hash = minetest.hash_node_position(npos)
|
||||
if not loaded_areas[hash] then
|
||||
table.insert(chunks, {npos, hash})
|
||||
table.insert(noisechunks, {npos, hash})
|
||||
end
|
||||
end
|
||||
if #chunks > 0 then
|
||||
minetest.log("verbose", "[perlin_explorer] Started building "..#chunks.." chunk(s)")
|
||||
if #noisechunks > 0 then
|
||||
minetest.log("verbose", "[perlin_explorer] Started building "..#noisechunks.." noisechunk(s)")
|
||||
end
|
||||
for c=1, #chunks do
|
||||
local npos = chunks[c][1]
|
||||
local nhash = chunks[c][2]
|
||||
for c=1, #noisechunks do
|
||||
local npos = noisechunks[c][1]
|
||||
local nhash = noisechunks[c][2]
|
||||
build(npos, nhash, player:get_player_name())
|
||||
end
|
||||
if #chunks > 0 then
|
||||
minetest.log("verbose", "[perlin_explorer] Done building "..#chunks.." chunk(s)")
|
||||
if #noisechunks > 0 then
|
||||
minetest.log("verbose", "[perlin_explorer] Done building "..#noisechunks.." noisechunk(s)")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Loading…
x
Reference in New Issue
Block a user