From 6a21b5aa45c9fcfe69ef549eaa91323471144d26 Mon Sep 17 00:00:00 2001 From: numzero Date: Fri, 11 Sep 2020 01:39:45 +0300 Subject: [PATCH] Replace mergetable internally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It can’t be removed yet as mods might depend on it. --- mesecons/internal.lua | 4 ++-- mesecons/presets.lua | 4 ++-- mesecons/util.lua | 4 ++-- mesecons_extrawires/mesewire.lua | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mesecons/internal.lua b/mesecons/internal.lua index 6fdc3f9..044e3bf 100644 --- a/mesecons/internal.lua +++ b/mesecons/internal.lua @@ -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 diff --git a/mesecons/presets.lua b/mesecons/presets.lua index a2062d9..e10dd36 100644 --- a/mesecons/presets.lua +++ b/mesecons/presets.lua @@ -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}, diff --git a/mesecons/util.lua b/mesecons/util.lua index 1fb33e3..e5ec234 100644 --- a/mesecons/util.lua +++ b/mesecons/util.lua @@ -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) diff --git a/mesecons_extrawires/mesewire.lua b/mesecons_extrawires/mesewire.lua index 455f75f..1b987d0 100644 --- a/mesecons_extrawires/mesewire.lua +++ b/mesecons_extrawires/mesewire.lua @@ -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 = {