From 065767cc77870c2b1c2c6f5de7ed4e62d2719082 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 24 Jun 2022 03:09:50 +0200 Subject: [PATCH] Add Ocean Ruins - schematics by PrarieWind --- mods/MAPGEN/mcl_structures/init.lua | 1 + mods/MAPGEN/mcl_structures/ocean_ruins.lua | 104 ++++++++++++++++++ .../mcl_structures_ocean_ruins_cold_1.mts | Bin 0 -> 333 bytes .../mcl_structures_ocean_ruins_cold_2.mts | Bin 0 -> 396 bytes .../mcl_structures_ocean_ruins_cold_3.mts | Bin 0 -> 697 bytes 5 files changed, 105 insertions(+) create mode 100644 mods/MAPGEN/mcl_structures/ocean_ruins.lua create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_ruins_cold_1.mts create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_ruins_cold_2.mts create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_ruins_cold_3.mts diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index f150721653..176c09acda 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -478,6 +478,7 @@ end dofile(modpath.."/api.lua") dofile(modpath.."/desert_temple.lua") dofile(modpath.."/jungle_temple.lua") +dofile(modpath.."/ocean_ruins.lua") mcl_structures.register_structure("desert_well",{ place_on = {"group:sand"}, diff --git a/mods/MAPGEN/mcl_structures/ocean_ruins.lua b/mods/MAPGEN/mcl_structures/ocean_ruins.lua new file mode 100644 index 0000000000..53115d38f5 --- /dev/null +++ b/mods/MAPGEN/mcl_structures/ocean_ruins.lua @@ -0,0 +1,104 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) +local cold_oceans = { + "RoofedForest_ocean", + "BirchForestM_ocean", + "BirchForest_ocean", + "IcePlains_deep_ocean", + "ExtremeHillsM_deep_ocean", + "SunflowerPlains_ocean", + "MegaSpruceTaiga_deep_ocean", + "ExtremeHillsM_ocean", + "SunflowerPlains_deep_ocean", + "BirchForest_deep_ocean", + "IcePlainsSpikes_ocean", + "StoneBeach_ocean", + "ColdTaiga_deep_ocean", + "Forest_deep_ocean", + "FlowerForest_deep_ocean", + "MegaTaiga_ocean", + "StoneBeach_deep_ocean", + "IcePlainsSpikes_deep_ocean", + "ColdTaiga_ocean", + "ExtremeHills+_deep_ocean", + "ExtremeHills_ocean", + "Forest_ocean", + "MegaTaiga_deep_ocean", + "MegaSpruceTaiga_ocean", + "ExtremeHills+_ocean", + "RoofedForest_deep_ocean", + "IcePlains_ocean", + "FlowerForest_ocean", + "ExtremeHills_deep_ocean", + "Taiga_ocean", + "BirchForestM_deep_ocean", + "Taiga_deep_ocean", +} +local function ruins_placement_callback(pos, def, pr) + local hl = def.sidelen / 2 + local p1 = vector.offset(pos,-hl,-hl,-hl) + local p2 = vector.offset(pos,hl,hl,hl) + local chests = minetest.find_nodes_in_area(p1, p2, "mcl_chests:chest_small") + for c=1, #chests do + local lootitems = mcl_loot.get_multi_loot({ + { + stacks_min = 2, + stacks_max = 4, + items = { + { itemstring = "mcl_core:coal_lump", weight = 25, amount_min = 1, amount_max=4 }, + { itemstring = "mcl_farming:wheat_item", weight = 25, amount_min = 2, amount_max=3 }, + { itemstring = "mcl_core:gold_nugget", weight = 25, amount_min = 1, amount_max=3 }, + --{ itemstring = "mcl_maps:treasure_map", weight = 20, }, --FIXME Treasure map + + { itemstring = "mcl_books:book", weight = 10, func = function(stack, pr) + mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) + end }, + { itemstring = "mcl_fishing:fishing_rod_enchanted", weight = 20, func = function(stack, pr) + mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) + end }, + { itemstring = "mcl_core:emerald", weight = 15, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_armor:chestplate_leather", weight = 15, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_core:apple_gold", weight = 20, }, + { itemstring = "mcl_armor:helmet_gold", weight = 15, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_core:gold_ingot", weight = 15, amount_min = 2, amount_max = 7 }, + { itemstring = "mcl_core:iron_ingot", weight = 15, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_core:apple_gold_enchanted", weight = 2, }, + } + }}, pr) + mcl_structures.init_node_construct(chests[c]) + local meta = minetest.get_meta(chests[c]) + local inv = meta:get_inventory() + mcl_loot.fill_inventory(inv, "main", lootitems, pr) + end +end + +mcl_structures.register_structure("cold_ocean_ruins",{ + place_on = {"group:sand","mcl_core:gravel","mcl_core:dirt","mcl_core:clay","group:material_stone"}, + spawn_by = {"mcl_core:water_source"}, + num_spawn_by = 2, + noise_params = { + offset = 0, + scale = 0.0000812, + spread = {x = 250, y = 250, z = 250}, + seed = 146315, + octaves = 3, + persist = -0.2, + flags = "absvalue", + }, + flags = "place_center_x, place_center_z, force_placement", + solid_ground = true, + make_foundation = true, + y_offset = 0, + y_min = mcl_vars.mg_overworld_min, + y_max = 1, + biomes = cold_oceans, + chunk_probability = 64, + sidelen = 4, + filenames = { + modpath.."/schematics/mcl_structures_ocean_ruins_cold_1.mts", + modpath.."/schematics/mcl_structures_ocean_ruins_cold_2.mts", + modpath.."/schematics/mcl_structures_ocean_ruins_cold_3.mts", + }, + after_place = ruins_placement_callback +}) diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_ruins_cold_1.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_ruins_cold_1.mts new file mode 100644 index 0000000000000000000000000000000000000000..1b2c8d1f3e4acae6e17dab9dbaaa4f285b4bae0e GIT binary patch literal 333 zcmeYb3HD`RVPI!qWnilZ0R|2R=ETe*2L9aSocQGYqExHo{G_CuR0d(VKygWaUTRWN zW^y)z1Qx;E{NmzD1`)Unm=85X6eOCToSK+tRh*g_pOctZl3J99`!6F|7+v!EgE_B=*ceNSK8>^} z#K77zQj1H9t&%}hd~t4KP7add;)0^mWU%6jIZp!u#SSZQGb!-CQ~{7){=zAyEP>r3I|mjy>tGNUvWSLLiadE@4V z>nWAF(mh3K4`Y{_KTCUF@;*RJCV&6Ydu-v4vX?|2NSs;w=SxlLhckZaZ~pbo=<^kp z{ynuXF#OZ`>Bmy%n&?XB{jmGO@o0hK_K3r+oN8T@?mTYFmv~rnJY`D9c^h%H>eaC` SCO++6RPuLsEhEE1yFUPCvaDYK literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_ruins_cold_3.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_ruins_cold_3.mts new file mode 100644 index 0000000000000000000000000000000000000000..67cb5c9acf2f84f69df5514dcae3bc53e2f35e08 GIT binary patch literal 697 zcmeYb3HD`RVGv+oV-TnZ0|s6O=ETe*2L9aSocQGYqExH&qQtV)90p;yKygWaUTRWN zW^y)z1Qx;E{NmzD20m07B=eHU0wB@6)RK(UBCFiQ^xQ;bdkcz6 zlT*v{^HUgj;hKvR^HLbZz}$?~;*w&kWDpf!oST?~?B=Y}y!0H1UP**rxJQx`i^@_{ zD(1YM)?L=Dz~jKoBzybc%=mbYiPL{%bnDuFex^}zVL}TFivkPx1=c(NMO;KAtAn34 zKMG6xer2CDqtwxW)nfA)sus<@@9SKlpk-K~d{Kv!Gv3vjO~^Iyk8X9sL+Q8MuWUYA zZGUI;9qC4!Z(_wxg@1xw*+u#!U#a@LEjT0B85XrCyDBJU;~K59x>*5Ur#`B7?SI`J z$FbmUTh`5Yb$7*uzwcVi(Y1a_hSaK-8e6ZXci-}!%)HTNnzAglw&rhjL;MsW@3Pw( zNs0SoPIjdJv+2LNWuNbj%vZHrwlY=!+-okEv)kNxn_R{Na!eBoU6rKs3FVuz>w^6>uGEO2qU!2e3o zWpD0T_sgrhMisYC4eRf7KJfFK$ydSuGV6BU4&7UREB3kmDA)l|6j0o_dgZit^baHD*k(R8FTsV-G+tQc7HRjU9S{& mu(qEc!he)y=D+1vk0N&yy literal 0 HcmV?d00001