diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index d2b16fa47..9c323fac2 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -27,7 +27,6 @@ mcl_structures.register_structure = function(name, def, nospawn) vl_structures.register_structure(name, def) end -dofile(modpath.."/campsite.lua") dofile(modpath.."/desert_temple.lua") dofile(modpath.."/desert_well.lua") dofile(modpath.."/end_city.lua") @@ -41,7 +40,6 @@ dofile(modpath.."/ocean_temple.lua") dofile(modpath.."/pillager_outpost.lua") dofile(modpath.."/ruined_portal.lua") dofile(modpath.."/shipwrecks.lua") -dofile(modpath.."/spider_cocoon.lua") dofile(modpath.."/witch_hut.lua") dofile(modpath.."/woodland_mansion.lua") diff --git a/mods/MAPGEN/mcl_structures/campsite.lua b/mods/MAPGEN/vl_extra_structures/campsite.lua similarity index 96% rename from mods/MAPGEN/mcl_structures/campsite.lua rename to mods/MAPGEN/vl_extra_structures/campsite.lua index 35a61e591..ff6db2ca8 100644 --- a/mods/MAPGEN/mcl_structures/campsite.lua +++ b/mods/MAPGEN/vl_extra_structures/campsite.lua @@ -8,6 +8,7 @@ vl_structures.register_structure("campsite",{ y_max = mcl_vars.mg_overworld_max, y_min = 1, prepare = { tolerance = 1, foundation = -2, clear_top = 1, padding = 1, corners = 1 }, -- low tolerance, perform little terraforming + biomes = { "Forest", "FlowerForest", "Plains", "SunflowerPlains", "Savanna", "SavannaM", "Taiga", "ColdTaiga" }, filenames = { modpath.."/schematics/campsite_1.mts" }, @@ -67,5 +68,6 @@ vl_structures.register_structure("campsite",{ }, } } + -- TODO: spawn a band of pillagers? }) diff --git a/mods/MAPGEN/vl_extra_structures/init.lua b/mods/MAPGEN/vl_extra_structures/init.lua new file mode 100644 index 000000000..85eec6a52 --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/init.lua @@ -0,0 +1,7 @@ +local modname = minetest.get_current_modname() +local modpath = minetest.get_modpath(modname) + +dofile(modpath.."/campsite.lua") +dofile(modpath.."/obelisks.lua") +dofile(modpath.."/spider_cocoon.lua") +dofile(modpath.."/witches_circle.lua") diff --git a/mods/MAPGEN/vl_extra_structures/mod.conf b/mods/MAPGEN/vl_extra_structures/mod.conf new file mode 100644 index 000000000..c06abb85c --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/mod.conf @@ -0,0 +1,4 @@ +name = vl_extra_structures +author = kno10 +description = Some additional decorative structures +depends = mcl_init, mcl_util, mcl_loot, vl_terraforming, vl_structures diff --git a/mods/MAPGEN/vl_extra_structures/obelisks.lua b/mods/MAPGEN/vl_extra_structures/obelisks.lua new file mode 100644 index 000000000..11787c4b4 --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/obelisks.lua @@ -0,0 +1,52 @@ +local modname = minetest.get_current_modname() +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, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + y_offset = -3, + prepare = { tolerance=3, padding = 0, clear=false }, + biomes = { "Desert" }, + filenames = { + modpath.."/schematics/obelisk_sand_1.mts", + modpath.."/schematics/obelisk_sand_2.mts", + }, +}) + +vl_structures.register_structure("obelisk_light",{ + place_on = {"group:sand"}, + flags = "place_center_x, place_center_z", + chunk_probability = 25, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + y_offset = -2, + prepare = { tolerance=2, padding = 0, clear=false }, + biomes = { "Desert" }, + filenames = { + modpath.."/schematics/obelisk_fire.mts", + }, + after_place = function(p,_,pr,p1,p2) + for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do + mcl_walls.update_wall(n) + end + end, +}) + +vl_structures.register_structure("obelisk_cobble",{ + place_on = {"group:grass_block", "group:dirt"}, + flags = "place_center_x, place_center_z", + chunk_probability = 25, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + y_offset = -2, + prepare = { tolerance=2, padding=0, clear=false }, + biomes = { "Plains", "SunflowerPlains", "Forest", "FlowerForest", "BrichForest", "Taiga", "RoofedForest", "MegaTaiga", "MegaSpruceTaiga", }, + filenames = { + modpath.."/schematics/obelisk_cobble.mts", + modpath.."/schematics/obelisk_cobble_broken.mts", + }, +}) + diff --git a/mods/MAPGEN/mcl_structures/schematics/campsite_1.mts b/mods/MAPGEN/vl_extra_structures/schematics/campsite_1.mts similarity index 100% rename from mods/MAPGEN/mcl_structures/schematics/campsite_1.mts rename to mods/MAPGEN/vl_extra_structures/schematics/campsite_1.mts diff --git a/mods/MAPGEN/mcl_structures/schematics/cocoon_1.mts b/mods/MAPGEN/vl_extra_structures/schematics/cocoon_1.mts similarity index 100% rename from mods/MAPGEN/mcl_structures/schematics/cocoon_1.mts rename to mods/MAPGEN/vl_extra_structures/schematics/cocoon_1.mts diff --git a/mods/MAPGEN/vl_extra_structures/schematics/obelisk_cobble.mts b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_cobble.mts new file mode 100644 index 000000000..4c0b566b0 Binary files /dev/null and b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_cobble.mts differ diff --git a/mods/MAPGEN/vl_extra_structures/schematics/obelisk_cobble_broken.mts b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_cobble_broken.mts new file mode 100644 index 000000000..8a61521a0 Binary files /dev/null and b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_cobble_broken.mts differ diff --git a/mods/MAPGEN/vl_extra_structures/schematics/obelisk_fire.mts b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_fire.mts new file mode 100644 index 000000000..f05312826 Binary files /dev/null and b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_fire.mts differ diff --git a/mods/MAPGEN/vl_extra_structures/schematics/obelisk_sand_1.mts b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_sand_1.mts new file mode 100644 index 000000000..816e16293 Binary files /dev/null and b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_sand_1.mts differ diff --git a/mods/MAPGEN/vl_extra_structures/schematics/obelisk_sand_2.mts b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_sand_2.mts new file mode 100644 index 000000000..56e50c857 Binary files /dev/null and b/mods/MAPGEN/vl_extra_structures/schematics/obelisk_sand_2.mts differ diff --git a/mods/MAPGEN/vl_extra_structures/schematics/witch_circle.mts b/mods/MAPGEN/vl_extra_structures/schematics/witch_circle.mts new file mode 100644 index 000000000..e1d6d085e Binary files /dev/null and b/mods/MAPGEN/vl_extra_structures/schematics/witch_circle.mts differ diff --git a/mods/MAPGEN/mcl_structures/spider_cocoon.lua b/mods/MAPGEN/vl_extra_structures/spider_cocoon.lua similarity index 100% rename from mods/MAPGEN/mcl_structures/spider_cocoon.lua rename to mods/MAPGEN/vl_extra_structures/spider_cocoon.lua diff --git a/mods/MAPGEN/vl_extra_structures/witches_circle.lua b/mods/MAPGEN/vl_extra_structures/witches_circle.lua new file mode 100644 index 000000000..b074e73eb --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/witches_circle.lua @@ -0,0 +1,43 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) + +local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false) + +local function spawn_witch(pos,def,pr,p1,p2) + local c = minetest.find_node_near(p1,15,{"mcl_cauldrons:cauldron"}) + if c then + local nn = minetest.find_nodes_in_area_under_air(vector.new(p1.x,c.y-1,p1.z),vector.new(p2.x,c.y-1,p2.z),{"group:stone"}) + local witch + if not peaceful then + witch = minetest.add_entity(vector.offset(nn[math.random(#nn)],0,1,0),"mobs_mc:witch"):get_luaentity() + witch._home = c + witch.can_despawn = false + end + local catobject = minetest.add_entity(vector.offset(nn[math.random(#nn)],0,1,0),"mobs_mc:cat") + if catobject and catobject:get_pos() then + local cat=catobject:get_luaentity() + cat.object:set_properties({textures = {"mobs_mc_cat_black.png"}}) + cat.owner = "!witch!" --so it's not claimable by player + cat._home = c + cat.can_despawn = false + end + return + end +end + +vl_structures.register_structure("witches_circle",{ + place_on = {"group:grass_block", "group:dirt", "mclx_core:river_water_source"}, + flags = "place_center_x, place_center_z, all_surfaces", + chunk_probability = 14, + prepare = { tolerance=4, clear_bottom=1, clear_top=-1, padding=0, corners=3, foundation=-2 }, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + y_offset = -1, + force_placement = false, + biomes = { "Swampland", "Swampland_shore", "RoofedForest", }, + filenames = { modpath.."/schematics/witch_circle.mts" }, + construct_nodes = {"group:wall"}, -- fix wall orientation + after_place = spawn_witch, +}) +