From a1e837f9c0e2333afda629e86b360f93f00c4305 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 7 Aug 2022 17:52:55 -0600 Subject: [PATCH] mapgen torchspine wasn't having its timer set --- df_caverns/underworld.lua | 8 ++++---- df_dependencies/misc.lua | 4 +++- df_primordial_items/primordial_mushroom.lua | 4 ++-- df_trees/torchspine.lua | 15 +++++++++++---- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/df_caverns/underworld.lua b/df_caverns/underworld.lua index 960da37..af6cf32 100644 --- a/df_caverns/underworld.lua +++ b/df_caverns/underworld.lua @@ -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) diff --git a/df_dependencies/misc.lua b/df_dependencies/misc.lua index 92c2379..5379d60 100644 --- a/df_dependencies/misc.lua +++ b/df_dependencies/misc.lua @@ -109,11 +109,13 @@ 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 mcl_mapgen.realm_barrier_overworld_end_min = mcl_mapgen.end_.max - 11 - + if mcl_mapgen.on_settings_changed then mcl_mapgen.on_settings_changed() end diff --git a/df_primordial_items/primordial_mushroom.lua b/df_primordial_items/primordial_mushroom.lua index 97a88c8..b9fc6e9 100644 --- a/df_primordial_items/primordial_mushroom.lua +++ b/df_primordial_items/primordial_mushroom.lua @@ -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, diff --git a/df_trees/torchspine.lua b/df_trees/torchspine.lua index 2d29e38..23ec8c8 100644 --- a/df_trees/torchspine.lua +++ b/df_trees/torchspine.lua @@ -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 @@ -355,7 +355,14 @@ df_trees.spawn_torchspine_vm = function(vi, area, data, data_param2, height, lit local index = vi + area.ystride*i data[index] = list[height-i] data_param2[index] = param2 - end + 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({