mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-12 05:20:31 +02:00
add location logging for debugging purposes
This commit is contained in:
@ -1,6 +1,11 @@
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local log_location
|
||||
if minetest.get_modpath("mapgen_helper") and mapgen_helper.log_location_enabled then
|
||||
log_location = mapgen_helper.log_first_location
|
||||
end
|
||||
|
||||
--stem
|
||||
minetest.register_node("df_trees:goblin_cap_stem", {
|
||||
description = S("Goblin Cap Stem"),
|
||||
@ -296,18 +301,22 @@ df_trees.spawn_goblin_cap_vm = function(vi, area, data, data_param2)
|
||||
local pos = area:position(vi)
|
||||
if math.random() < 0.5 then
|
||||
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, big_goblin_cap_schem)
|
||||
if log_location then log_location("goblin_cap_big", pos) end
|
||||
elseif math.random() < 0.9 then
|
||||
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, bigger_goblin_cap_schem)
|
||||
if log_location then log_location("goblin_cap_bigger", pos) end
|
||||
else
|
||||
-- easter egg - every once in a while (0.5%), a mapgen Goblin cap is a Smurf house
|
||||
minetest.after(5, init_hut, pos)
|
||||
if math.random() < 0.5 then
|
||||
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, big_goblin_cap_hut_schem)
|
||||
if log_location then log_location("goblin_cap_big_hut", pos) end
|
||||
else
|
||||
if init_vessels then
|
||||
minetest.after(5, init_vessels, pos)
|
||||
end
|
||||
mapgen_helper.place_schematic_on_data(data, data_param2, area, pos, bigger_goblin_cap_hut_schem)
|
||||
if log_location then log_location("goblin_cap_bigger_hut", pos) end
|
||||
end
|
||||
end
|
||||
return
|
||||
|
@ -1,4 +1,4 @@
|
||||
name = df_trees
|
||||
description = Adds various types of underground fungal "trees". Light kills their saplings, they only grow in the dark.
|
||||
depends = default
|
||||
optional_depends = doc, moreblocks, stairs, vessels, basic_materials, farming, doors, beds, df_farming
|
||||
optional_depends = doc, moreblocks, stairs, vessels, basic_materials, farming, doors, beds, df_farming, mapgen_helper
|
Reference in New Issue
Block a user