diff --git a/init.lua b/init.lua index 5bdd9fa..4cb3f0c 100644 --- a/init.lua +++ b/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) diff --git a/textures/perlin_explorer_new_chunk_particle.png b/textures/perlin_explorer_new_noisechunk.png similarity index 100% rename from textures/perlin_explorer_new_chunk_particle.png rename to textures/perlin_explorer_new_noisechunk.png