mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-06-28 14:16:06 +02:00
[sea] Update for #445
This commit is contained in:
@ -35,7 +35,7 @@ minetest.register_node("clams:dirtalgae", {
|
||||
}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_dirt_defaults,
|
||||
sounds = default.node_sound_dirt_defaults,
|
||||
})
|
||||
|
||||
minetest.register_node("clams:sandalgaeused", {
|
||||
@ -80,9 +80,9 @@ minetest.register_entity("clams:whiteshell", {
|
||||
phase = 0,
|
||||
phasetimer = 0,
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
minetest.log("whiteshell activated!")
|
||||
end,
|
||||
-- on_activate = function(self, staticdata)
|
||||
-- minetest.log("whiteshell activated!")
|
||||
-- end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
self.phasetimer = self.phasetimer + dtime
|
||||
@ -160,8 +160,8 @@ minetest.register_ore({
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 16,
|
||||
clust_size = 4,
|
||||
y_max = -4,
|
||||
y_min = -60,
|
||||
y_max = -4,
|
||||
y_min = -60,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
@ -171,17 +171,17 @@ minetest.register_ore({
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 16,
|
||||
clust_size = 4,
|
||||
y_max = -4,
|
||||
y_min = -60,
|
||||
y_max = -4,
|
||||
y_min = -60,
|
||||
})
|
||||
|
||||
|
||||
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
||||
if maxp.y < height_min or minp.y > height_max then
|
||||
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, y_min, y_max)
|
||||
if maxp.y < y_min or minp.y > y_max then
|
||||
return
|
||||
end
|
||||
local y_min = math.max(minp.y, height_min)
|
||||
local y_max = math.min(maxp.y, height_max)
|
||||
local y_min = math.max(minp.y, y_min)
|
||||
local y_max = math.min(maxp.y, y_max)
|
||||
if chunk_size >= y_max - y_min + 1 then
|
||||
return
|
||||
end
|
||||
@ -191,7 +191,7 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
|
||||
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
|
||||
for i=1,num_chunks do
|
||||
local y0 = pr:next(y_min, y_max-chunk_size+1)
|
||||
if y0 >= height_min and y0 <= height_max then
|
||||
if y0 >= y_min and y0 <= y_max then
|
||||
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
|
||||
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
|
||||
local p0 = {x=x0, y=y0, z=z0}
|
||||
@ -389,4 +389,4 @@ minetest.register_alias("shells_dye:yellowlightglass","clams:yellowlightglass")
|
||||
minetest.register_alias("shells_dye:redlightglass","clams:redlightglass")
|
||||
minetest.register_alias("shells_dye:bluelightglass","clams:bluelightglass")
|
||||
minetest.register_alias("shells_dye:whitelightglass","clams:whitelightglass")
|
||||
minetest.register_alias("shells_dye:blacklightglass","clams:blacklightglass")
|
||||
minetest.register_alias("shells_dye:blacklightglass","clams:blacklightglass")
|
Reference in New Issue
Block a user