From 484ad2b630ea7a3d16caa4cc261dc19e3b72a04c Mon Sep 17 00:00:00 2001 From: MysticTempest Date: Sat, 9 Jul 2022 19:35:51 -0500 Subject: [PATCH] Replace all melon/pumpkin stems in woodland_cabins with unconnected variants. --- mods/MAPGEN/mcl_structures/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 0eafab584..5b6be892d 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -11,6 +11,11 @@ local rotations = { "270" } +local replacement = { + ["mcl_farming:pumpkintige_linked_t"] = "mcl_farming:pumpkintige_unconnect", + ["mcl_farming:melontige_linked_t"] = "mcl_farming:melontige_unconnect" +} + local function ecb_place(blockpos, action, calls_remaining, param) if calls_remaining >= 1 then return end minetest.place_schematic(param.pos, param.schematic, param.rotation, param.replacements, param.force_placement, param.flags) @@ -37,7 +42,7 @@ function mcl_structures.place_schematic(pos, schematic, rotation, replacements, local p1 = {x=pos.x , y=pos.y , z=pos.z } local p2 = {x=pos.x+x-1, y=pos.y+s.size.y-1, z=pos.z+z-1} minetest.log("verbose", "[mcl_structures] size=" ..minetest.pos_to_string(s.size) .. ", rotation=" .. tostring(rotation) .. ", emerge from "..minetest.pos_to_string(p1) .. " to " .. minetest.pos_to_string(p2)) - local param = {pos=vector.new(pos), schematic=s, rotation=rotation, replacements=replacements, force_placement=force_placement, flags=flags, p1=p1, p2=p2, after_placement_callback = after_placement_callback, size=vector.new(s.size), pr=pr, callback_param=callback_param} + local param = {pos=vector.new(pos), schematic=s, rotation=rotation, replacements=replacement, force_placement=force_placement, flags=flags, p1=p1, p2=p2, after_placement_callback = after_placement_callback, size=vector.new(s.size), pr=pr, callback_param=callback_param} minetest.emerge_area(p1, p2, ecb_place, param) return true end