mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-25 02:10:37 +01:00
mapgen torchspine wasn't having its timer set
This commit is contained in:
parent
cdaeb36b14
commit
a1e837f9c0
@ -473,10 +473,10 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
minetest.after(math.random()*10, function()
|
||||
-- not all of these locations will get a lamp, but it's easier to just set four
|
||||
-- timers than to worry about testing first.
|
||||
minetest.get_node_timer({x=lamp_pos.x+1, y=lamp_pos.y, z=lamp_pos.z}):start(math.random()*60)
|
||||
minetest.get_node_timer({x=lamp_pos.x-1, y=lamp_pos.y, z=lamp_pos.z}):start(math.random()*60)
|
||||
minetest.get_node_timer({x=lamp_pos.x, y=lamp_pos.y, z=lamp_pos.z+1}):start(math.random()*60)
|
||||
minetest.get_node_timer({x=lamp_pos.x, y=lamp_pos.y, z=lamp_pos.z-1}):start(math.random()*60)
|
||||
minetest.get_node_timer({x=lamp_pos.x+1, y=lamp_pos.y, z=lamp_pos.z}):start(math.random()*30)
|
||||
minetest.get_node_timer({x=lamp_pos.x-1, y=lamp_pos.y, z=lamp_pos.z}):start(math.random()*30)
|
||||
minetest.get_node_timer({x=lamp_pos.x, y=lamp_pos.y, z=lamp_pos.z+1}):start(math.random()*30)
|
||||
minetest.get_node_timer({x=lamp_pos.x, y=lamp_pos.y, z=lamp_pos.z-1}):start(math.random()*30)
|
||||
end)
|
||||
elseif building.building_type == "small building" then
|
||||
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, small_building_schematic, building.rotation)
|
||||
|
@ -109,6 +109,8 @@ if minetest.get_modpath("mcl_mapgen") then -- Mineclone 5
|
||||
mcl_mapgen.overworld.bedrock_min = mcl_mapgen.overworld.min
|
||||
mcl_mapgen.overworld.bedrock_max = mcl_mapgen.overworld.bedrock_min + (mcl_mapgen.bedrock_is_rough and 4 or 0)
|
||||
mcl_mapgen.overworld.lava_max = mcl_mapgen.overworld.min+6
|
||||
mcl_mapgen.overworld.railcorridors_height_min = -50
|
||||
mcl_mapgen.overworld.railcorridors_height_max = -2
|
||||
|
||||
mcl_mapgen.end_.max = mcl_mapgen.overworld.min - 2000
|
||||
mcl_mapgen.realm_barrier_overworld_end_max = mcl_mapgen.end_.max
|
||||
|
@ -35,7 +35,7 @@ minetest.register_node("df_primordial_items:mushroom_gills", {
|
||||
tiles = {"dfcaverns_mush_gills.png"},
|
||||
inventory_image = "dfcaverns_mush_gills.png",
|
||||
wield_image = "dfcaverns_mush_gills.png",
|
||||
groups = {snappy = 3, flora = 1, flammable = 1, leaves = 1, leafdecay = 5},
|
||||
groups = {snappy = 3, flora = 1, flammable = 1, leaves = 1, leafdecay = 8},
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
waving = 2,
|
||||
@ -71,7 +71,7 @@ minetest.register_node("df_primordial_items:mushroom_gills_glowing", {
|
||||
tiles = {"dfcaverns_mush_gills_glow.png"},
|
||||
inventory_image = "dfcaverns_mush_gills_glow.png",
|
||||
wield_image = "dfcaverns_mush_gills_glow.png",
|
||||
groups = {snappy = 3, flora = 1, flammable = 1, leaves = 1, leafdecay = 5},
|
||||
groups = {snappy = 3, flora = 1, flammable = 1, leaves = 1, leafdecay = 8},
|
||||
paramtype = "light",
|
||||
drawtype = "plantlike",
|
||||
waving = 2,
|
||||
|
@ -68,7 +68,7 @@ local grow_torchspine = function(pos)
|
||||
local node_above_def = minetest.registered_nodes[node_above.name]
|
||||
if not node_above_def.buildable_to then
|
||||
-- don't grow, but do continue cycling the torch state
|
||||
minetest.swap_node(pos, {name = "df_trees:torchspine_1", param2 = node.param2})
|
||||
minetest.swap_node(pos, {name = "df_trees:torchspine_1", param2 = param2})
|
||||
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
|
||||
return
|
||||
end
|
||||
@ -85,7 +85,7 @@ local grow_torchspine = function(pos)
|
||||
end
|
||||
if height >= 4 then
|
||||
-- don't grow, but do continue cycling the torch state
|
||||
minetest.swap_node(pos, {name = "df_trees:torchspine_1", param2 = node.param2})
|
||||
minetest.swap_node(pos, {name = "df_trees:torchspine_1", param2 = param2})
|
||||
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
|
||||
return
|
||||
end
|
||||
@ -94,7 +94,7 @@ local grow_torchspine = function(pos)
|
||||
pos.y = pos.y + 1
|
||||
minetest.get_node_timer(pos):start(math.random(torchspine_min_delay, torchspine_max_delay))
|
||||
for i = 1, height+1 do
|
||||
minetest.swap_node(pos, {name=torchspine_list[i], param2=param2})
|
||||
minetest.swap_node(pos, {name=torchspine_list[i], param2 = param2})
|
||||
pos.y = pos.y - 1
|
||||
end
|
||||
end
|
||||
@ -356,6 +356,13 @@ df_trees.spawn_torchspine_vm = function(vi, area, data, data_param2, height, lit
|
||||
data[index] = list[height-i]
|
||||
data_param2[index] = param2
|
||||
end
|
||||
|
||||
local pos = area:position(vi)
|
||||
pos.y = pos.y+height-1
|
||||
minetest.after(10, function()
|
||||
local node = minetest.get_node(pos)
|
||||
minetest.get_node_timer(pos):start(math.random()*3000)
|
||||
end)
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
|
Loading…
Reference in New Issue
Block a user