Replace mergetable internally

It can’t be removed yet as mods might depend on it.
This commit is contained in:
numzero 2020-09-11 01:39:45 +03:00
parent b19fbc321e
commit 6a21b5aa45
4 changed files with 7 additions and 7 deletions

View File

@ -92,8 +92,8 @@ function mesecon.get_any_inputrules(node)
end
function mesecon.get_any_rules(node)
return mesecon.mergetable(mesecon.get_any_inputrules(node) or {},
mesecon.get_any_outputrules(node) or {})
return mesecon.merge_rule_sets(mesecon.get_any_inputrules(node),
mesecon.get_any_outputrules(node))
end
-- Receptors

View File

@ -16,9 +16,9 @@ mesecon.rules.default = {
{x = 0, y = -1, z = -1},
}
mesecon.rules.floor = mesecon.mergetable(mesecon.rules.default, {{x = 0, y = -1, z = 0}})
mesecon.rules.floor = mesecon.merge_rule_sets(mesecon.rules.default, {{x = 0, y = -1, z = 0}})
mesecon.rules.pplate = mesecon.mergetable(mesecon.rules.floor, {{x = 0, y = -2, z = 0}})
mesecon.rules.pplate = mesecon.merge_rule_sets(mesecon.rules.floor, {{x = 0, y = -2, z = 0}})
mesecon.rules.buttonlike = {
{x = 1, y = 0, z = 0},

View File

@ -251,8 +251,8 @@ function mesecon.register_node(name, spec_common, spec_off, spec_on)
spec_on.__mesecon_state = "on"
spec_off.__mesecon_state = "off"
spec_on = mesecon.mergetable(spec_common, spec_on);
spec_off = mesecon.mergetable(spec_common, spec_off);
spec_on = mesecon.merge_replace(spec_common, spec_on);
spec_off = mesecon.merge_replace(spec_common, spec_off);
minetest.register_node(name .. "_on", spec_on)
minetest.register_node(name .. "_off", spec_off)

View File

@ -18,7 +18,7 @@ minetest.override_item("default:mese", {
-- Copy node definition of powered mese from normal mese
-- and brighten texture tiles to indicate mese is powered
local powered_def = mesecon.mergetable(minetest.registered_nodes["default:mese"], {
local powered_def = mesecon.merge_replace(minetest.registered_nodes["default:mese"], {
drop = "default:mese",
light_source = 5,
mesecons = {conductor = {