From 97052d1579398e8f41239d8fbd7be6a6ae947dd1 Mon Sep 17 00:00:00 2001 From: cheapie Date: Thu, 30 Apr 2020 01:09:06 -0500 Subject: Add support for digistuff's channel copier --- infrastructure/advanced_automatic_warning_device.lua | 2 ++ infrastructure/advanced_boom_barrier.lua | 1 + infrastructure/advanced_lane_control_lights.lua | 1 + 3 files changed, 4 insertions(+) (limited to 'infrastructure') diff --git a/infrastructure/advanced_automatic_warning_device.lua b/infrastructure/advanced_automatic_warning_device.lua index 0545e6e..1049c56 100644 --- a/infrastructure/advanced_automatic_warning_device.lua +++ b/infrastructure/advanced_automatic_warning_device.lua @@ -141,6 +141,7 @@ minetest.register_node("infrastructure:ebell",{ {-0.12,-0.35,-0.12,0.12,0.2,0.12,}, }, }, + _digistuff_channelcopier_fieldname = "channel", groups = {cracky = 3,}, on_destruct = infrastructure.stop_bell, after_place_node = ebell_updateformspec, @@ -481,6 +482,7 @@ minetest.register_node("infrastructure:automatic_warning_device_bottom", { {-1/16, 0, -1/16, 1/16, 3, 1/16} } }, + _digistuff_channelcopier_fieldname = "channel", on_construct = function(pos) local node = minetest.get_node(pos) diff --git a/infrastructure/advanced_boom_barrier.lua b/infrastructure/advanced_boom_barrier.lua index 67a9b8b..ffc04a6 100644 --- a/infrastructure/advanced_boom_barrier.lua +++ b/infrastructure/advanced_boom_barrier.lua @@ -336,6 +336,7 @@ minetest.register_node("infrastructure:boom_barrier_bottom", { {-1/8, -1/2, -1/8, 1/8, 0, 1/8} } }, + _digistuff_channelcopier_fieldname = "channel", after_dig_node = function(pos) pos.y = pos.y + 1 diff --git a/infrastructure/advanced_lane_control_lights.lua b/infrastructure/advanced_lane_control_lights.lua index 94d7ce1..4c75a06 100644 --- a/infrastructure/advanced_lane_control_lights.lua +++ b/infrastructure/advanced_lane_control_lights.lua @@ -25,6 +25,7 @@ for i = 1, 6 do local meta = minetest.get_meta(pos) meta:set_string("formspec", "field[channel;Channel;${channel}]") end, + _digistuff_channelcopier_fieldname = "channel", groups = {cracky = 3, not_in_creative_inventory = (i == 1 and 0 or 1)}, light_source = TRAFFIC_LIGHTS_LIGHT_RANGE, drop = "infrastructure:lane_control_lights_1", -- cgit v1.2.3