Graveyards

This commit is contained in:
PrairieWind 2022-08-18 13:13:28 -06:00
parent 48d6f0ba5e
commit 2b2d44cc19
6 changed files with 58 additions and 3 deletions

View File

@ -9,4 +9,5 @@ Schematics
----------
* Birch Forest Ruins - PrairieWind
* Desert Oasis - PrairieWind
* Brick Pyramid - PrairieWind
* Brick Pyramid - PrairieWind
* Graveyard - PrairieWind

View File

@ -6,4 +6,5 @@ Structure List
--------------
* Oasis
* Birch Forest Temple Ruins
* Brick Pyramid
* Brick Pyramid
* Graveyard

52
graveyard.lua Normal file
View File

@ -0,0 +1,52 @@
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
local modpath = minetest.get_modpath(modname)
mcl_structures.register_structure("graveyard",{
place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"},
fill_ratio = 0.01,
flags = "place_center_x, place_center_z",
solid_ground = true,
make_foundation = true,
y_offset = function(pr) return -(pr:next(3,3)) end,
chunk_probability = 400,
y_max = mcl_vars.mg_overworld_max,
y_min = 1,
biomes = { "BirchForest", "Forest", "Plains", "Taiga" },
sidelen = 10,
filenames = {
modpath.."/schematics/mcl_extra_structures_graveyard_1.mts",
modpath.."/schematics/mcl_extra_structures_graveyard_2.mts",
},
loot = {
["mcl_barrels:barrel_closed"] ={{
stacks_min = 2,
stacks_max = 6,
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 = 7 },
{ itemstring = "mcl_core:iron_ingot", weight = 5, amount_min = 1, amount_max = 5 },
{ itemstring = "mcl_core:diamond", weight = 1, amount_min = 1, amount_max = 3 },
{ itemstring = "mcl_tools:sword_diamond", weight = 15, },
{ itemstring = "mcl_tools:pick_diamond", weight = 15, },
{ itemstring = "mcl_tools:shovel_iron", weight = 15, },
{ itemstring = "mcl_torches:torch", weight = 15, amount_min = 3, amount_max=7 },
{ itemstring = "mcl_armor:chestplate_diamond", weight = 1 },
{ itemstring = "mcl_armor:leggings_iron", weight = 2 },
}
}}
},
after_place = function(pos, def, pr)
local p1 = vector.offset(pos,-5,-3,-5)
local p2 = vector.offset(pos,5,4,5)
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)
for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do
local def = minetest.registered_nodes[minetest.get_node(n).name:gsub("_%d+$","")]
if def and def.on_construct then
def.on_construct(n)
end
end
end
})

View File

@ -7,4 +7,5 @@ local mod = minetest.get_modpath("mcl_extra_structures")
-- Load Structure Files
dofile(mod .. "/desert_oasis.lua") -- Load Desert Oasis
dofile(mod .. "/birch_forest_ruins.lua") -- Load Birch Forest Ruins
dofile(mod .. "/brick_pyramid.lua") -- Load Brick Pyramid
dofile(mod .. "/brick_pyramid.lua") -- Load Brick Pyramid
dofile(mod .. "/graveyard.lua") -- Load Graveyards

Binary file not shown.

Binary file not shown.