additional structures

This commit is contained in:
kno10 2024-12-14 01:28:30 +01:00
parent edbd2c57e7
commit 8d8307baa8
15 changed files with 120 additions and 7 deletions

@ -10,3 +10,7 @@ Schematics
* Obelisks - kno10
* Cocoon - kno10
* Witches Circle - kno10
* Statues - kno10
* Forest Hideout - kno10
* Forest Well - kno10
* Forest Grave - kno10

@ -0,0 +1,17 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
vl_structures.register_structure("forest_grave",{
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
flags = "place_center_x, place_center_z",
prepare = { tolerance = 3, clear_bottom = 0, padding = 0, corners = 0, foundation = -2 },
chunk_probability = 20,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
biomes = { "Forest", "RoofedForest", "BirchForest", "FlowerForest", "CherryGrove", "ExtremeHills+" }, -- TODO: also add to some other biomes?
filenames = {
modpath.."/schematics/forest_grave.mts",
},
})

@ -0,0 +1,18 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
vl_structures.register_structure("forest_well",{
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
flags = "place_center_x, place_center_z",
prepare = { tolerance = 3, clear_bottom = 1, clear_top = 0, padding = 0, corners = 1, foundation = -2 },
chunk_probability = 20,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
biomes = { "Forest", "FlowerForest", "BirchForest", "CherryGrove", "RoofedForest", "MesaPlateauF", "ExtremeHills+", "Taiga", "MegaTaiga", "MegaSpruceTaiga" },
filenames = {
modpath.."/schematics/forest_well_1.mts",
modpath.."/schematics/forest_well_2.mts",
},
})

@ -2,12 +2,13 @@ local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
-- TODO: the schematics could use ignore/air to ensure a nice headroom and open entranceway, then we could reduce terraforming?
vl_structures.register_structure("graveyard",{
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
flags = "place_center_x, place_center_z",
prepare = { tolerance = 3, clear_bottom = 1, clear_top = 0, padding = 0, corners = 1, foundation = -2 },
y_offset = function(pr) return -(pr:next(3,3)) end,
prepare = { tolerance = 2, clear_bottom = 0, clear_top = -2, padding = 1, corners = 2, foundation = -2 },
chunk_probability = 40,
y_offset = -3,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
biomes = { "BirchForest", "Forest", "Plains", "Taiga" },
@ -37,8 +38,9 @@ vl_structures.register_structure("graveyard",{
for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do
mcl_walls.update_wall(n)
end
local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,3,0),{"mcl_mobspawners:spawner"})
if not sp[1] then return end
mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:zombie", 0, minetest.LIGHT_MAX+1, 10, 3, -1)
local sp = minetest.find_nodes_in_area(p1,p2,{"mcl_mobspawners:spawner"})
if #sp > 0 then
mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:zombie", 0, 10, 10, 10, 2)
end
end
})

@ -8,3 +8,7 @@ dofile(modpath.."/graveyard.lua")
dofile(modpath.."/obelisks.lua")
dofile(modpath.."/spider_cocoon.lua")
dofile(modpath.."/witches_circle.lua")
dofile(modpath.."/statue.lua")
dofile(modpath.."/tree_hideout.lua")
dofile(modpath.."/forest_well.lua")
dofile(modpath.."/forest_grave.lua")

@ -4,7 +4,7 @@ local modpath = minetest.get_modpath(modname)
vl_structures.register_structure("obelisk_sand",{
place_on = {"group:sand"},
flags = "place_center_x, place_center_z",
chunk_probability = 12,
chunk_probability = 20,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
y_offset = -3,
@ -38,7 +38,7 @@ vl_structures.register_structure("obelisk_light",{
vl_structures.register_structure("obelisk_cobble",{
place_on = {"group:grass_block", "group:dirt"},
flags = "place_center_x, place_center_z",
chunk_probability = 25,
chunk_probability = 35,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
y_offset = -2,

@ -0,0 +1,33 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
vl_structures.register_structure("statue",{
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
flags = "place_center_x, place_center_z",
prepare = { tolerance = 3, clear_bottom = 0, clear_top = 0, padding = -2, corners = 0, foundation = -2 },
chunk_probability = 20,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
biomes = { "MegaTaiga", "MegaSpruceTaiga", "CherryGrove", "Swampland", "ExtremeHills+", "MesaPlateauF" }, -- TODO: also add to some other biomes?
filenames = {
modpath.."/schematics/statue_1.mts",
modpath.."/schematics/statue_2.mts",
},
loot = {
["mcl_chests:chest_small" ] ={{
stacks_min = 1,
stacks_max = 2,
items = {
{ itemstring = "mcl_core:iron_nugget", weight = 15, amount_min = 1, amount_max = 10 },
{ itemstring = "mcl_core:iron_ingot", weight = 5, amount_min = 1, amount_max = 5 },
{ itemstring = "mcl_core:gold_nugget", weight = 4, amount_min = 1, amount_max = 8 },
{ itemstring = "mcl_core:gold_ingot", weight = 3, amount_min = 2, amount_max = 7 },
{ itemstring = "mcl_core:diamond", weight = 1, amount_min = 2, amount_max = 5 },
{ itemstring = "mcl_core:emerald", weight = 1, amount_min = 2, amount_max = 5 },
{ itemstring = "mcl_core:lapis", weight = 3, amount_min = 2, amount_max = 10 },
}
}}
}
})

@ -0,0 +1,35 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
vl_structures.register_structure("tree_hideout",{
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
flags = "place_center_x, place_center_z",
prepare = { tolerance = 6, clear = false, clear_bottom = 10, padding = -3, corners = 5, foundation = 2 },
chunk_probability = 20,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
biomes = { "Forest", "ExtremeHills+", "MesaPlateauF" }, -- TODO: also add to some other biomes, with biome adaptation?
filenames = {
modpath.."/schematics/tree_hideout.mts",
},
loot = {
["mcl_chests:chest_small" ] ={{
stacks_min = 2,
stacks_max = 4,
items = {
{ itemstring = "mcl_mobitems:rotten_flesh", weight = 16, amount_min = 3, amount_max = 7 },
{ itemstring = "mcl_core:gold_ingot", weight = 3, amount_min = 2, amount_max = 6 },
{ itemstring = "mcl_core:gold_nugget", weight = 3, amount_min = 1, amount_max = 8 },
{ itemstring = "mcl_core:iron_ingot", weight = 5, amount_min = 1, amount_max = 5 },
{ itemstring = "mcl_core:iron_nugget", weight = 5, amount_min = 1, amount_max = 6 },
{ itemstring = "mcl_core:diamond", weight = 1, amount_min = 1, amount_max = 3 },
{ itemstring = "mcl_tools:sword_stone", weight = 15, },
{ itemstring = "mcl_tools:pick_stone", weight = 15, },
{ itemstring = "mcl_tools:shovel_stone", weight = 15, },
{ itemstring = "mcl_torches:torch", weight = 15, amount_min = 3, amount_max = 7 },
}}
}
}
})