Merge pull request 'Replace all melon/pumpkin stems in woodland_cabins with unconnected variants.' (#2409) from melonpumpkin_stem_patch into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2409
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
cora 2022-07-10 09:41:13 +00:00
commit c900c04194

View file

@ -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