From 4a3a3f40beabcae10d634e085fc2788a4f402915 Mon Sep 17 00:00:00 2001 From: cheapie Date: Tue, 12 Jan 2016 22:01:46 -0600 Subject: [PATCH] Move automatic warning device to animated textures and fix a bunch of bugs in it --- .../advanced_automatic_warning_device.lua | 828 ++++++++++-------- infrastructure/init.lua | 2 + ...tomatic_warning_device_middle_center_2.png | Bin 2670 -> 0 bytes ...tomatic_warning_device_middle_center_3.png | Bin 2635 -> 0 bytes ...atic_warning_device_middle_center_anim.png | Bin 0 -> 3429 bytes ...atic_warning_device_middle_center_off.png} | Bin ...automatic_warning_device_middle_left_2.png | Bin 501 -> 0 bytes ...omatic_warning_device_middle_left_anim.png | Bin 0 -> 795 bytes ...omatic_warning_device_middle_left_off.png} | Bin ...utomatic_warning_device_middle_right_2.png | Bin 567 -> 0 bytes ...matic_warning_device_middle_right_anim.png | Bin 0 -> 822 bytes ...matic_warning_device_middle_right_off.png} | Bin 12 files changed, 443 insertions(+), 387 deletions(-) delete mode 100644 infrastructure/textures/infrastructure_automatic_warning_device_middle_center_2.png delete mode 100644 infrastructure/textures/infrastructure_automatic_warning_device_middle_center_3.png create mode 100644 infrastructure/textures/infrastructure_automatic_warning_device_middle_center_anim.png rename infrastructure/textures/{infrastructure_automatic_warning_device_middle_center_1.png => infrastructure_automatic_warning_device_middle_center_off.png} (100%) delete mode 100644 infrastructure/textures/infrastructure_automatic_warning_device_middle_left_2.png create mode 100644 infrastructure/textures/infrastructure_automatic_warning_device_middle_left_anim.png rename infrastructure/textures/{infrastructure_automatic_warning_device_middle_left_1.png => infrastructure_automatic_warning_device_middle_left_off.png} (100%) delete mode 100644 infrastructure/textures/infrastructure_automatic_warning_device_middle_right_2.png create mode 100644 infrastructure/textures/infrastructure_automatic_warning_device_middle_right_anim.png rename infrastructure/textures/{infrastructure_automatic_warning_device_middle_right_1.png => infrastructure_automatic_warning_device_middle_right_off.png} (100%) diff --git a/infrastructure/advanced_automatic_warning_device.lua b/infrastructure/advanced_automatic_warning_device.lua index 3e2f7a2..b938c07 100644 --- a/infrastructure/advanced_automatic_warning_device.lua +++ b/infrastructure/advanced_automatic_warning_device.lua @@ -1,410 +1,464 @@ -- Automatic warning device -local sound_handles = {} -local function play_bell(pos) - local pos_hash = minetest.hash_node_position(pos) - sound_handles[pos_hash] = minetest.sound_play("infrastructure_ebell", - {pos = pos, gain = AUTOMATIC_WARNING_DEVICE_VOLUME, loop = true, max_hear_distance = 30,}) +infrastructure.sound_handles = {} + +function infrastructure.play_bell(pos) + local pos_hash = minetest.hash_node_position(pos) + if not infrastructure.sound_handles[pos_hash] then + infrastructure.sound_handles[pos_hash] = minetest.sound_play("infrastructure_ebell", + {pos = pos, gain = AUTOMATIC_WARNING_DEVICE_VOLUME, loop = true, max_hear_distance = 30,}) + end end -local function stop_bell(pos, node) +function infrastructure.stop_bell(pos) local pos_hash = minetest.hash_node_position(pos) - local sound_handle = sound_handles[pos_hash] + local sound_handle = infrastructure.sound_handles[pos_hash] if sound_handle then minetest.sound_stop(sound_handle) - sound_handles[pos_hash] = nil + infrastructure.sound_handles[pos_hash] = nil end end - function left_light_direction(pos, param2) - if param2 == 0 then - pos.x = pos.x - 1 - elseif param2 == 1 then - pos.z = pos.z + 1 - elseif param2 == 2 then - pos.x = pos.x + 1 - elseif param2 == 3 then - pos.z = pos.z - 1 - end +function infrastructure.left_light_direction(pos, param2) + if param2 == 0 then + pos.x = pos.x - 1 + elseif param2 == 1 then + pos.z = pos.z + 1 + elseif param2 == 2 then + pos.x = pos.x + 1 + elseif param2 == 3 then + pos.z = pos.z - 1 end +end - function right_light_direction(pos, param2) - if param2 == 0 then - pos.x = pos.x + 2 - elseif param2 == 1 then - pos.z = pos.z - 2 - elseif param2 == 2 then - pos.x = pos.x - 2 - elseif param2 == 3 then - pos.z = pos.z + 2 - end +function infrastructure.right_light_direction(pos, param2) + if param2 == 0 then + pos.x = pos.x + 2 + elseif param2 == 1 then + pos.z = pos.z - 2 + elseif param2 == 2 then + pos.x = pos.x - 2 + elseif param2 == 3 then + pos.z = pos.z + 2 end +end - function lights_enabled(pos, node) - local node = minetest.env:get_node(pos) +function infrastructure.lights_enabled(pos) + local node = minetest.get_node(pos) + local param2 = node.param2 + minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_center_on", param2 = node.param2}) + infrastructure.left_light_direction(pos, param2) + minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_left_on", param2 = node.param2}) + infrastructure.right_light_direction(pos, param2) + minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_right_on", param2 = node.param2}) +end + +function infrastructure.lights_disabled(pos) + local node = minetest.get_node(pos) + local param2 = node.param2 + minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_center_off", param2 = node.param2}) + infrastructure.left_light_direction(pos, param2) + minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_left_off", param2 = node.param2}) + infrastructure.right_light_direction(pos, param2) + minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_right_off", param2 = node.param2}) +end + +function infrastructure.activate_lights(pos) + pos.y = pos.y + 2 + local node = minetest.get_node(pos) + if node.name == "infrastructure:automatic_warning_device_middle_center_off" then + infrastructure.play_bell(pos) + infrastructure.lights_enabled(pos) + elseif (node.name == "infrastructure:automatic_warning_device_middle_center_on") then + infrastructure.stop_bell(pos,node) + infrastructure.lights_disabled(pos, node) + end +end + +minetest.register_node("infrastructure:automatic_warning_device_top", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_top_side.png", + "infrastructure_automatic_warning_device_top_side.png", + "infrastructure_automatic_warning_device_top_side.png", + "infrastructure_automatic_warning_device_top.png" + }, + on_destruct = stop_bell, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3, not_in_creative_inventory = 1}, + node_box = { + type = "fixed", + fixed = { + {-1/16, -1/2, -1/16, 1/16, 0, 1/16}, + {-1/8, 0, -1/8, 1/8, 3/8, 1/8}, + {-1/4, 1/8, -1/4, 1/4, 1/4, 1/4}, + {-1/2, -1/2, -1/16, 1/2, 0, -1/16}, + {-1/8, -1/2, -1/16, 1/8, -1/4, 1/8} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + +minetest.register_node("infrastructure:automatic_warning_device_middle_right_on", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_middle_right_side.png", + {name="infrastructure_automatic_warning_device_middle_right_anim.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.5}} + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = AUTOMATIC_WARNING_DEVICE_LIGHT_RANGE, + node_box = { + type = "fixed", + fixed = { + {-1/2, -1/2, -1/16, -1/4, 1/2, -1/16}, + {-1/2, -5/16, -1/16, -7/16, 1/16, 3/16}, + {-1/2, 1/32, -5/16, -15/32, 3/32, -1/16}, + {-15/32, -1/8, -3/16, -13/32, 1/32, -1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + +minetest.register_node("infrastructure:automatic_warning_device_middle_right_off", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_middle_right_side.png", + "infrastructure_automatic_warning_device_middle_right_off.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-1/2, -1/2, -1/16, -1/4, 1/2, -1/16}, + {-1/2, -5/16, -1/16, -7/16, 1/16, 3/16}, + {-1/2, 1/32, -5/16, -15/32, 3/32, -1/16}, + {-15/32, -1/8, -3/16, -13/32, 1/32, -1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + +minetest.register_node("infrastructure:automatic_warning_device_middle_left_on", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_middle_left_side.png", + {name="infrastructure_automatic_warning_device_middle_left_anim.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.5}} + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = AUTOMATIC_WARNING_DEVICE_LIGHT_RANGE, + node_box = { + type = "fixed", + fixed = { + {1/4, -1/2, -1/16, 1/2, 1/2, -1/16}, + {7/16, -5/16, -1/16, 1/2, 1/16, 3/16}, + {15/32, 1/32, -5/16, 1/2, 3/32, -1/16}, + {13/32, -1/8, -3/16, 15/32, 1/32, -1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + +minetest.register_node("infrastructure:automatic_warning_device_middle_left_off", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_middle_left_side.png", + "infrastructure_automatic_warning_device_middle_left_off.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {1/4, -1/2, -1/16, 1/2, 1/2, -1/16}, + {7/16, -5/16, -1/16, 1/2, 1/16, 3/16}, + {15/32, 1/32, -5/16, 1/2, 3/32, -1/16}, + {13/32, -1/8, -3/16, 15/32, 1/32, -1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + +minetest.register_node("infrastructure:automatic_warning_device_middle_center_on", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_middle_center_side.png", + "infrastructure_automatic_warning_device_middle_center_side.png", + "infrastructure_automatic_warning_device_middle_center_side.png", + {name="infrastructure_automatic_warning_device_middle_center_anim.png",animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.5}} + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = LIGHT_SOURCE, + node_box = { + type = "fixed", + fixed = { + {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}, + {-1/2, -1/2, -1/16, 1/2, 1/2, -1/16}, + {-1/2, -5/16, -1/16, -3/16, 1/16, 3/16}, + {3/16, -5/16, -1/16, 1/2, 1/16, 3/16}, + {-3/16, -3/16, -1/16, 3/16, -1/16, 1/8}, + {-1/2, 1/32, -5/16, -7/32, 3/32, -1/16}, + {-7/32, -1/8, -3/16, -5/32, 1/32, -1/16}, + {7/32, 1/32, -5/16, 1/2, 3/32, -1/16}, + {5/32, -1/8, -3/16, 7/32, 1/32, -1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + + +minetest.register_node("infrastructure:automatic_warning_device_middle_center_off", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_middle_center_side.png", + "infrastructure_automatic_warning_device_middle_center_side.png", + "infrastructure_automatic_warning_device_middle_center_side.png", + "infrastructure_automatic_warning_device_middle_center_off.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + light_source = LIGHT_SOURCE, + node_box = { + type = "fixed", + fixed = { + {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}, + {-1/2, -1/2, -1/16, 1/2, 1/2, -1/16}, + {-1/2, -5/16, -1/16, -3/16, 1/16, 3/16}, + {3/16, -5/16, -1/16, 1/2, 1/16, 3/16}, + {-3/16, -3/16, -1/16, 3/16, -1/16, 1/8}, + {-1/2, 1/32, -5/16, -7/32, 3/32, -1/16}, + {-7/32, -1/8, -3/16, -5/32, 1/32, -1/16}, + {7/32, 1/32, -5/16, 1/2, 3/32, -1/16}, + {5/32, -1/8, -3/16, 7/32, 1/32, -1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + + +minetest.register_node("infrastructure:automatic_warning_device_middle", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_middle_side.png", + "infrastructure_automatic_warning_device_middle_side.png", + "infrastructure_automatic_warning_device_middle_side.png", + "infrastructure_automatic_warning_device_middle.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3, not_in_creative_inventory = 1}, + node_box = { + type = "fixed", + fixed = { + {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}, + {-3/8, -3/8, -1/8, 3/8, 3/8, -1/16}, + {-1/8, -1/8, -1/16, 1/8, 1/8, 1/8} + } + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0} + } +}) + +minetest.register_node("infrastructure:automatic_warning_device_bottom", { + description = "Automatic warning device", + inventory_image = "infrastructure_automatic_warning_device.png", + wield_image = "infrastructure_automatic_warning_device.png", + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_automatic_warning_device_bottom.png", + "infrastructure_automatic_warning_device_bottom.png", + "infrastructure_automatic_warning_device_bottom.png", + "infrastructure_automatic_warning_device_bottom.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3}, + node_box = { + type = "fixed", + fixed = { + {-1/16, 0, -1/16, 1/16, 1/2, 1/16}, + {-1/2, -1/2, -1/4, 1/2, -3/8, 1/4}, + {-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}, + {-1/8, -3/8, -1/8, 1/8, 0, 1/8} + } + }, + selection_box = { + type = "fixed", + fixed = { + -- top + {-1/8, 0 + 3, -1/8, 1/8, 3/8 + 3, 1/8}, + {-1/4, 1/8 + 3, -1/4, 1/4, 1/4 + 3, 1/4}, + {-1/8, -1/2 + 3, -1/16 + 0.01, 1/8, -1/4 + 3, 1/8}, + -- middle center, left and right + {-9/16, -5/16 + 2, -1/16, -3/16, 1/16 + 2, 3/16}, + {3/16, -5/16 + 2, -1/16, 9/16, 1/16 + 2, 3/16}, + + {-3/16, -3/16 + 2, -1/16 + 0.01, 3/16, -1/16 + 2, 1/8}, + + {-1/2, 1/32 + 2, -5/16, -7/32, 3/32 + 2, -1/16 - 0.01}, + {-7/32, -1/8 + 2, -3/16, -5/32, 1/32 + 2, -1/16 - 0.01}, + {13/32 - 1, -1/8 + 2, -3/16, 15/32 - 1, 1/32 + 2, -1/16 - 0.01}, + + {7/32, 1/32 + 2, -5/16, 1/2, 3/32 + 2, -1/16 - 0.01}, + {5/32, -1/8 + 2, -3/16, 7/32, 1/32 + 2, -1/16 - 0.01}, + {-15/32 + 1, -1/8 + 2, -3/16, -13/32 + 1, 1/32 + 2, -1/16 - 0.01}, + -- middle + {-3/8, -3/8 + 1, -1/8, 3/8, 3/8 + 1, -1/16}, + {-1/8, -1/8 + 1, -1/16, 1/8, 1/8 + 1, 1/8}, + -- bottom + {-1/2, -1/2, -1/4, 1/2, -3/8, 1/4}, + {-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}, + {-1/8, -3/8, -1/8, 1/8, 0, 1/8}, + -- post + {-1/16, 0, -1/16, 1/16, 3, 1/16} + } + }, + + on_construct = function(pos) + local node = minetest.get_node(pos) local param2 = node.param2 - if (node.name == "infrastructure:automatic_warning_device_middle_center_3") then - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_center_2", param2 = node.param2}) - left_light_direction(pos, param2) - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_left_2", param2 = node.param2}) - right_light_direction(pos, param2) - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_right_1", param2 = node.param2}) - elseif node.name == "infrastructure:automatic_warning_device_middle_center_2" then - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_center_3", param2 = node.param2}) - left_light_direction(pos, param2) - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_left_1", param2 = node.param2}) - right_light_direction(pos, param2) - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_right_2", param2 = node.param2}) - end - end - function lights_disabled(pos, node) - local node = minetest.env:get_node(pos) - local param2 = node.param2 - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_center_1", param2 = node.param2}) - left_light_direction(pos, param2) - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_left_1", param2 = node.param2}) - right_light_direction(pos, param2) - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_right_1", param2 = node.param2}) - end + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + + pos.y = pos.y + 1 + node.name = "infrastructure:automatic_warning_device_middle" + minetest.set_node(pos, node) - function activate_lights(pos, node) pos.y = pos.y + 2 - local node = minetest.env:get_node(pos) - if node.name == "infrastructure:automatic_warning_device_middle_center_1" then - play_bell(pos) - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_center_2", param2 = node.param2}) - elseif (node.name == "infrastructure:automatic_warning_device_middle_center_2" or node.name == "infrastructure:automatic_warning_device_middle_center_3") then - stop_bell(pos,node) - lights_disabled(pos, node) - end - end + node.name = "infrastructure:automatic_warning_device_top" + minetest.set_node(pos, node) - minetest.register_abm( { - nodenames = {"infrastructure:automatic_warning_device_middle_center_2", "infrastructure:automatic_warning_device_middle_center_3"}, - interval = 1, - chance = 1, - action = function(pos, node) - lights_enabled(pos,node) + pos.y = pos.y - 1 + node.name = "infrastructure:automatic_warning_device_middle_center_1" + minetest.set_node(pos, node) + + infrastructure.left_light_direction(pos, param2) + node.name = "infrastructure:automatic_warning_device_middle_left_1" + minetest.set_node(pos, node) + + infrastructure.right_light_direction(pos, param2) + node.name = "infrastructure:automatic_warning_device_middle_right_1" + minetest.set_node(pos, node) + end, + + on_destruct = function(pos) + local node = minetest.get_node(pos) + local param2 = node.param2 + pos.y=pos.y+2 + infrastructure.stop_bell(pos, node) + pos.y=pos.y-2 + + for i = 1, 3 do + pos.y = pos.y + 1 + minetest.remove_node(pos) + end + + pos.y = pos.y - 1 + + infrastructure.left_light_direction(pos, param2) + minetest.remove_node(pos) + + infrastructure.right_light_direction(pos, param2) + minetest.remove_node(pos) + end, + + on_punch = function(pos, node) + infrastructure.activate_lights(pos, node) + end, + + on_receive_fields = function(pos, formname, fields, sender) + if (fields.channel) then + minetest.get_meta(pos):set_string("channel", fields.channel) + minetest.get_meta(pos):set_string("state", "Off") + end + end, + + digiline = { + receptor = {}, + effector = { + action = function(pos, node, channel, msg) + local setchan = minetest.get_meta(pos):get_string("channel") + if setchan ~= channel then + return + end + if (msg=="bell_on") then + infrastructure.play_bell(pos) + elseif (msg=="bell_off") then + infrastructure.stop_bell(pos) + elseif (msg=="lights_on") then + pos.y = pos.y+2 + infrastructure.lights_enabled(pos) + elseif (msg=="lights_off") then + pos.y = pos.y+2 + infrastructure.lights_disabled(pos) + end end - }) - - minetest.register_node("infrastructure:automatic_warning_device_top", { - tiles = { - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_automatic_warning_device_top_side.png", - "infrastructure_automatic_warning_device_top_side.png", - "infrastructure_automatic_warning_device_top_side.png", - "infrastructure_automatic_warning_device_top.png" - }, - on_destruct = stop_bell, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - groups = {cracky = 3, not_in_creative_inventory = 1}, - node_box = { - type = "fixed", - fixed = { - {-1/16, -1/2, -1/16, 1/16, 0, 1/16}, - {-1/8, 0, -1/8, 1/8, 3/8, 1/8}, - {-1/4, 1/8, -1/4, 1/4, 1/4, 1/4}, - {-1/2, -1/2, -1/16, 1/2, 0, -1/16}, - {-1/8, -1/2, -1/16, 1/8, -1/4, 1/8} - } - }, - selection_box = { - type = "fixed", - fixed = {0, 0, 0, 0, 0, 0} - } - }) - - for i = 1, 2 do - local groups = {} - groups = {cracky = 3, not_in_creative_inventory = 1} - - if (i == 1) then - LIGHT_SOURCE = 0 - else - LIGHT_SOURCE = AUTOMATIC_WARNING_DEVICE_LIGHT_RANGE - end - - minetest.register_node("infrastructure:automatic_warning_device_middle_right_"..tostring(i), { - tiles = { - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_automatic_warning_device_middle_right_side.png", - "infrastructure_automatic_warning_device_middle_right_"..tostring(i)..".png" - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - light_source = LIGHT_SOURCE, - node_box = { - type = "fixed", - fixed = { - {-1/2, -1/2, -1/16, -1/4, 1/2, -1/16}, - {-1/2, -5/16, -1/16, -7/16, 1/16, 3/16}, - {-1/2, 1/32, -5/16, -15/32, 3/32, -1/16}, - {-15/32, -1/8, -3/16, -13/32, 1/32, -1/16} - } - }, - selection_box = { - type = "fixed", - fixed = {0, 0, 0, 0, 0, 0} - } - }) - - minetest.register_node("infrastructure:automatic_warning_device_middle_left_"..tostring(i), { - tiles = { - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_automatic_warning_device_middle_left_side.png", - "infrastructure_automatic_warning_device_middle_left_"..tostring(i)..".png" - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - light_source = LIGHT_SOURCE, - node_box = { - type = "fixed", - fixed = { - {1/4, -1/2, -1/16, 1/2, 1/2, -1/16}, - {7/16, -5/16, -1/16, 1/2, 1/16, 3/16}, - {15/32, 1/32, -5/16, 1/2, 3/32, -1/16}, - {13/32, -1/8, -3/16, 15/32, 1/32, -1/16} - } - }, - selection_box = { - type = "fixed", - fixed = {0, 0, 0, 0, 0, 0} - } - }) - end - - for i = 1, 3 do - local groups = {} - groups = {cracky = 3, not_in_creative_inventory = 1} - - if (i == 1) then - LIGHT_SOURCE = 0 - else - LIGHT_SOURCE = AUTOMATIC_WARNING_DEVICE_LIGHT_RANGE - end - - minetest.register_node("infrastructure:automatic_warning_device_middle_center_"..tostring(i), { - tiles = { - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_automatic_warning_device_middle_center_side.png", - "infrastructure_automatic_warning_device_middle_center_side.png", - "infrastructure_automatic_warning_device_middle_center_side.png", - "infrastructure_automatic_warning_device_middle_center_"..tostring(i)..".png" - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - light_source = LIGHT_SOURCE, - node_box = { - type = "fixed", - fixed = { - {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}, - {-1/2, -1/2, -1/16, 1/2, 1/2, -1/16}, - {-1/2, -5/16, -1/16, -3/16, 1/16, 3/16}, - {3/16, -5/16, -1/16, 1/2, 1/16, 3/16}, - {-3/16, -3/16, -1/16, 3/16, -1/16, 1/8}, - {-1/2, 1/32, -5/16, -7/32, 3/32, -1/16}, - {-7/32, -1/8, -3/16, -5/32, 1/32, -1/16}, - {7/32, 1/32, -5/16, 1/2, 3/32, -1/16}, - {5/32, -1/8, -3/16, 7/32, 1/32, -1/16} - } - }, - selection_box = { - type = "fixed", - fixed = {0, 0, 0, 0, 0, 0} - } - }) - end - - minetest.register_node("infrastructure:automatic_warning_device_middle", { - tiles = { - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_automatic_warning_device_middle_side.png", - "infrastructure_automatic_warning_device_middle_side.png", - "infrastructure_automatic_warning_device_middle_side.png", - "infrastructure_automatic_warning_device_middle.png" - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - groups = {cracky = 3, not_in_creative_inventory = 1}, - node_box = { - type = "fixed", - fixed = { - {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}, - {-3/8, -3/8, -1/8, 3/8, 3/8, -1/16}, - {-1/8, -1/8, -1/16, 1/8, 1/8, 1/8} - } - }, - selection_box = { - type = "fixed", - fixed = {0, 0, 0, 0, 0, 0} - } - }) - - minetest.register_node("infrastructure:automatic_warning_device_bottom", { - description = "Automatic warning device", - inventory_image = "infrastructure_automatic_warning_device.png", - wield_image = "infrastructure_automatic_warning_device.png", - tiles = { - "infrastructure_traffic_lights_side.png", - "infrastructure_traffic_lights_side.png", - "infrastructure_automatic_warning_device_bottom.png", - "infrastructure_automatic_warning_device_bottom.png", - "infrastructure_automatic_warning_device_bottom.png", - "infrastructure_automatic_warning_device_bottom.png" - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - groups = {cracky = 3}, - node_box = { - type = "fixed", - fixed = { - {-1/16, 0, -1/16, 1/16, 1/2, 1/16}, - {-1/2, -1/2, -1/4, 1/2, -3/8, 1/4}, - {-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}, - {-1/8, -3/8, -1/8, 1/8, 0, 1/8} - } - }, - selection_box = { - type = "fixed", - fixed = { - -- top - {-1/8, 0 + 3, -1/8, 1/8, 3/8 + 3, 1/8}, - {-1/4, 1/8 + 3, -1/4, 1/4, 1/4 + 3, 1/4}, - {-1/8, -1/2 + 3, -1/16 + 0.01, 1/8, -1/4 + 3, 1/8}, - -- middle center, left and right - {-9/16, -5/16 + 2, -1/16, -3/16, 1/16 + 2, 3/16}, - {3/16, -5/16 + 2, -1/16, 9/16, 1/16 + 2, 3/16}, - - {-3/16, -3/16 + 2, -1/16 + 0.01, 3/16, -1/16 + 2, 1/8}, - - {-1/2, 1/32 + 2, -5/16, -7/32, 3/32 + 2, -1/16 - 0.01}, - {-7/32, -1/8 + 2, -3/16, -5/32, 1/32 + 2, -1/16 - 0.01}, - {13/32 - 1, -1/8 + 2, -3/16, 15/32 - 1, 1/32 + 2, -1/16 - 0.01}, - - {7/32, 1/32 + 2, -5/16, 1/2, 3/32 + 2, -1/16 - 0.01}, - {5/32, -1/8 + 2, -3/16, 7/32, 1/32 + 2, -1/16 - 0.01}, - {-15/32 + 1, -1/8 + 2, -3/16, -13/32 + 1, 1/32 + 2, -1/16 - 0.01}, - -- middle - {-3/8, -3/8 + 1, -1/8, 3/8, 3/8 + 1, -1/16}, - {-1/8, -1/8 + 1, -1/16, 1/8, 1/8 + 1, 1/8}, - -- bottom - {-1/2, -1/2, -1/4, 1/2, -3/8, 1/4}, - {-1/4, -1/2, -1/2, 1/4, -3/8, 1/2}, - {-1/8, -3/8, -1/8, 1/8, 0, 1/8}, - -- post - {-1/16, 0, -1/16, 1/16, 3, 1/16} - } - }, - - on_construct = function(pos) - local node = minetest.env:get_node(pos) - local param2 = node.param2 - - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "field[channel;Channel;${channel}]") - - pos.y = pos.y + 1 - node.name = "infrastructure:automatic_warning_device_middle" - minetest.env:add_node(pos, node) - - pos.y = pos.y + 2 - node.name = "infrastructure:automatic_warning_device_top" - minetest.env:add_node(pos, node) - - pos.y = pos.y - 1 - node.name = "infrastructure:automatic_warning_device_middle_center_1" - minetest.env:add_node(pos, node) - - left_light_direction(pos, param2) - node.name = "infrastructure:automatic_warning_device_middle_left_1" - minetest.env:add_node(pos, node) - - right_light_direction(pos, param2) - node.name = "infrastructure:automatic_warning_device_middle_right_1" - minetest.env:add_node(pos, node) - end, - - on_destruct = function(pos) - local node = minetest.env:get_node(pos) - local param2 = node.param2 - pos.y=pos.y+2 - stop_bell(pos, node) - pos.y=pos.y-2 - - for i = 1, 3 do - pos.y = pos.y + 1 - minetest.env:remove_node(pos) - end - - pos.y = pos.y - 1 - - left_light_direction(pos, param2) - minetest.env:remove_node(pos) - - right_light_direction(pos, param2) - minetest.env:remove_node(pos) - end, - - on_punch = function(pos, node) - activate_lights(pos, node) - end, - - on_receive_fields = function(pos, formname, fields, sender) - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - minetest.get_meta(pos):set_string("state", "Off") - end - end, - - digiline = { - receptor = {}, - effector = { - action = function(pos, node, channel, msg) - local setchan = minetest.get_meta(pos):get_string("channel") - if setchan ~= channel then - return - end - if (msg=="bell_on") then - play_bell(pos) - elseif (msg=="bell_off") then - stop_bell(pos,node) - elseif (msg=="lights_on") then - pos.y = pos.y + 2 - local node = minetest.env:get_node(pos) - if node.name == "infrastructure:automatic_warning_device_middle_center_1" then - minetest.swap_node(pos, {name = "infrastructure:automatic_warning_device_middle_center_2", param2 = node.param2}) - end - elseif (msg=="lights_off") then - pos.y = pos.y + 2 - local node = minetest.env:get_node(pos) - if (node.name == "infrastructure:automatic_warning_device_middle_center_2" or node.name == "infrastructure:automatic_warning_device_middle_center_3") then - lights_disabled(pos, node) - end - end - end - } - } - }) + } + } +}) - minetest.register_alias("infrastructure:automatic_warning_device", "infrastructure:automatic_warning_device_bottom") - minetest.register_alias("awd", "infrastructure:automatic_warning_device_bottom") +minetest.register_alias("infrastructure:automatic_warning_device", "infrastructure:automatic_warning_device_bottom") +minetest.register_alias("awd", "infrastructure:automatic_warning_device_bottom") +minetest.register_alias("infrastructure:automatic_warning_device_middle_left_1","infrastructure:automatic_warning_device_middle_left_off") +minetest.register_alias("infrastructure:automatic_warning_device_middle_left_2","infrastructure:automatic_warning_device_middle_left_off") +minetest.register_alias("infrastructure:automatic_warning_device_middle_right_1","infrastructure:automatic_warning_device_middle_right_off") +minetest.register_alias("infrastructure:automatic_warning_device_middle_right_2","infrastructure:automatic_warning_device_middle_right_off") +minetest.register_alias("infrastructure:automatic_warning_device_middle_center_1","infrastructure:automatic_warning_device_middle_center_off") +minetest.register_alias("infrastructure:automatic_warning_device_middle_center_2","infrastructure:automatic_warning_device_middle_center_off") +minetest.register_alias("infrastructure:automatic_warning_device_middle_center_3","infrastructure:automatic_warning_device_middle_center_off") diff --git a/infrastructure/init.lua b/infrastructure/init.lua index 8b79b00..76d94f3 100644 --- a/infrastructure/init.lua +++ b/infrastructure/init.lua @@ -1,3 +1,5 @@ +infrastructure = {} + -- Load settings dofile(minetest.get_modpath("infrastructure").."/settings.lua") diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_center_2.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_center_2.png deleted file mode 100644 index 9e3883405306a434d6ad6ab39acb7d26878b41eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2670 zcmV-!3X%1RP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_000UBNklkEHQ#E+8O{DvvtaSfn(r{{ec$JK z59?b4q-b8RmtL=ze!t)BZ{EBi00Q9d-MeWR1~+cp$dxNs(l87fhQUxM#P#dfo7Vwg zO-&7>(I`D04+{$m%|19dNW(CgpPz4bpU=m=d-t-bsfjml-Xs84R#vjLwUvW|gIvCR zIgcJa%5XT$a5&6;`}Pq4ySln)7zUp_c|woJWA^#;=X3u2`9!8o3ZAHd;o)Jk@87?l z6%`e1Z*S+aWy?$BA`t@M zy?ghl>pBk}Jjlw*N>li7ILx(c*K+61oiq%C&!0ah0IpiKiiTm(?RJ|A$Vd_S`S}*% zFJ8RJ^XJd=;lqcf0u008qD6}=7A`C-v>-rsUDqwbO9e>b6BQtpAcgmOz4ZBfyn6L2 zbzNsyR~G@Wp`pPP{>+&(EG{mlVHoV{>f)L;YY2cPB_)i<&mLA)RS^Jp?b>BgKp+rcAP}$!4*-e6s|qj-g8-0- zf?zPnU@%Bs*STraCIaBPb?f-z#S1!}PPVkPu&%C-09a5^V9xi|t5=N2<2-ik81LS_ zYf*sgP=Czl^O*twU`|dBj~_qI%a+3VmZ{50;wY9Z;`SK+@4i3`caPa!| z>x@Jq?CI&D&*%FJ@+#V9q5uF$R6s#N0Rw>m4;?zhXV0GT+O=z}sHh+SmY0|F?Afyn z1OkjiB8)^Ltf;79b#=9=g!1xoMj{c50&LM}RFglpaN$A#z~;@HQC3!lD_5?V6S;He z4yvlE(9zKW0I=KbXl!gmPfrg3prWF}GVypkuEpbV4d2)d!_W-FFrQL*wX+$Cs zY~Q{e(P$JNj|ZKdov5p;LrqN$0HCq45o2RxXl`!C{rmS(U0n^sFtA|30+3UBPL$n5 zLLd-eC=}x3$B(IL8sENs%f7xoZr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ay(uA?smJgQD9CHa71KykgK)Af=5zBfg|!dd7tq9a_#k_urR+9_cP7- zVi|s)%>(%J&$QG6fBj|k_A&|xZZ<4iW~l}0fBOvp@IoM@SL_*z3M9m2ULnS6J)W-q zS95>${&^CK*(fmED4^``gV=Fp#(AY0G_M!OZsDb6Eg;tlKPwra+T{L185K%OO0u=U ze*^)to-Y;g*!$B@mJH8q!rSlt{r9OAAz}GLI=R14zT2}a`9rEa zLCqt^^7F0p93Gxl;8C&pD~kZB&}y%j01%L?!XnOlluS&n3Wt^Buv`rm$4PO0s?1L! zzz{1l5&?33K&=+lRbZ#AMwJXS6++aeA}Wi3BJn21DG=ZlaaO(=lAM%phDL=3#}&@Y zywNW6hZG2qyUoowp0L*#07^?sXM_ONqUu_s`tDGjPc{n3HPsK&qKf6H><{>;#QCq{ zeF_fhx}MR}fZURo^uImXJm5PZAV=oj!qQ`cLz+^bQ{|Yjw8}BnE02tfe6^W*I?k#{ zPyYC>vJ`3tM{k- z6NMUw)i|FH32Jm0Ro-E$d4b2{nbt>S5fF>TG+^pa(=)j-lYfYPkCtlde&RpLGHEg| c`QZ`pFYDlzDmH;tumAu607*qoM6N<$f+5Wc!vFvP diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_center_3.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_center_3.png deleted file mode 100644 index f741647debca8d25640e4a9474f4ed5f9c1fd508..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2635 zcmV-R3bgf!P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_000TzNklM-EuUI;2m z@PVR6SK4n&urf34j2&ZQC~Ly3WBH)Gaip~*REXzz}D7Q>blMc4<69x^O?1vpnwGh1;k{FBs`S?Jv}{U-MxD^ zqtPgvo13|4(IS(`t5>g@3}|a>VRx8u#wq%d)aEllXW%&Z?>^ZrQShx~}udlP3hgWy_XP*L8ZmUXuZnVnkkEo`v`` zXU_1{sZ+dj=Z?t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HcmV?d00001 diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_center_1.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_center_off.png similarity index 100% rename from infrastructure/textures/infrastructure_automatic_warning_device_middle_center_1.png rename to infrastructure/textures/infrastructure_automatic_warning_device_middle_center_off.png diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_left_2.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_left_2.png deleted file mode 100644 index dbb24287455d598b53e8045ef91db8a6cd2c107b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 501 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_0004qNklv12 z5JCtcgb+dqA#q`13%IH(ce&rufJn%)%mF}>B%lEo*jO^Z1#5uTz?!CU0MPgSGUGeR zxpOo?WexC|-&9^QpRfifs{ut(tlsnEI4&}Oou&YQoHZblJ^;a)_nE(^0m=+WAI9Rd6_DC@VGs=}A--%lqR zpyGLee-04N|ML_mYbF1`*h%_VsSPwhOCa8a*#IA)?ENh8u%G6_XBwdNd4Mrybt?4T z!lxK+ z3;L%300000006)%MQ#Bv7K_2g&IkiCp|0yzlFG6a2K1G>4o0Iz|qR;yN$cDvoM z$4A!ZZHoaeb3o|%r1IADB{{%Z4w%hmN5}d7en05>%kfx}G$jXQG7nI6&xf9Wg8|MA z7~8!a=YU<)z4~xr=SyqfS#H39a}Qv-T(&RW`=N&?VV+=re~$r93~1Y-0GrKbV8E;C zRFbr?^Vin%S2s5p;CdcVM05Qr%ml6da(#^fE)0mr{rP-8nER_~Ud$O7;C2ZRR)f|) z7hP8PW#?aSZ!y5den8j0&MYk^e zfB{bT1B#+Jx+)B_g?lsNyFDMk0RLI8GompQY^|st7~pIa2*huIR8@6!?$47UuLi^> z#0DHj37!i$Hz1W0VlW_=KvO1QKyCrA*K6Js1poj5000000Dydhg zKqdwx>jxN9s~-@r1)lEiFd&QlfD~8c04D~d>IVdxsD41aHo$;f1AoK-C;I`(`T>b~ zLS5J709OXYCSXAB`vL#d4~SqMz;c)i;ByoRoT?wdo}hOFViPbRR|8Txfl=Uy0pUy2 z>a~3{TDwrCx{ox^C4G|g&4US*{(g2_QP6!FJAO;L@9igKn*%12p3X5~>IeKMCaeXV Z@CU#NzaiiC;p6}S002ovPDHLkV1mN*Q?>vA literal 0 HcmV?d00001 diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_left_1.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_left_off.png similarity index 100% rename from infrastructure/textures/infrastructure_automatic_warning_device_middle_left_1.png rename to infrastructure/textures/infrastructure_automatic_warning_device_middle_left_off.png diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_right_2.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_right_2.png deleted file mode 100644 index d1b150eb7abdaa133855e63827d18efe901dfcd6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 567 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-mQ$WCjv*Dd-p<+>)a)S8R&UhkU}R-tbuQuu z+saQK``RBrUh4aa!7OUY1fK~FDh)^9S`{fLzy0+8>{Gr=cj|U;-!0=1DB=o7z21(q zmfbzydibG0PbRZkvU-A4TVlRrrvx|WV)cXq=1V4T|NL-Z(wWEPDPyh8zJK?h95dru zs|gL-iVG&T<}Vjln!>QUlIe59Y!ya^DM=r974wuB@$b2@AwtKBL8D7afl-WOhiLcv zRLA6luGiZA*pD%2v)q|~UXRV^PTZD49)=Z9T9X66{1b2$G zfBoASk+3vNh4K1oQHBS3+nE{m%=7DG*;sM?E4S1B`U4Ul?sHZ|=`k|&-(K7ODT=FN z@zrAtoEPLvW4{;G%L=a)ZOdX70;#!|!@!`vmd$ql_In~Kj5n*^u5w(-y6fj1TLC4# zU(3#XwozwX#!(@7I!ia;+1?Wx4$>$-{5v2(8?+6XFzow^WO%Y(?3#Ah%nYIGk@~?nvOryl!g<(f893m z&CmP0PJmOQ>Ogc-vZ6zE<0_l;mBCXM9b2rQ=iL7C%X*I@U{o`By85}Sb4q9e0I@si AC;$Ke diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_right_anim.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_right_anim.png new file mode 100644 index 0000000000000000000000000000000000000000..5517f0db71c6d49e5fa35f9e6a7bcd3ab6eb2f1a GIT binary patch literal 822 zcmeAS@N?(olHy`uVBq!ia0vp^4nW+%!3HFEH|A#nDYhhUcNd2LAh=-f^2tCE&H|6f zVg?3oVGw3ym^DWND9B#o>Fdh=fRUG3P;bWN3nv*Em=1foIEGZ*dOK%t(X9Z1*8UC_ zj@F)86*D|1s%_QY?;NL+KT&D&@#5^?jF*nIaxZq|5d64UI@pWc z`TH)bd}ldh*CGuta=K#ezW*tA1J3~t2c`YGlODe~lFg!^#w6m(x>n=-=Wq9gT?1Vd zc@JomFg;T7tWuxS5#Yfwui+r$iO+ks{%d5ZsNq_YS#|Byo%(%GH~6JR43gKM);y-BjC2k7L8ey~mjK&5zW2Z1IY@Zd%L0-oX6e z0Q;UW;VoYqo)(>~Z)@sd-V-^GMT4>IT=e`0wQB`9C3YPMO_nkpgpy2}v zC5=<7Z`do8Fu{l)%N?xdmW9dPU_bDW@gC<4ZpK}DPf{;&3%-$mV9WPI<2Q5G#tP-v zOwpEU{~6x1#B?5=|D@$t)82Igy*2DDDi0>V5nbheH$rB4Fhj#Tsff_f_uN38y$$D& zD>FQZeD+Iz=I`Efe;MN+sAj7$%ID=VFm$)GGaPt-cA2uH&N+~kKMHGk8Ge-2->B-;o@9-B zsV~7TSiLv6@233$X~z9WHqGMBdHOd)C;#X_#yF0ODSzs8r^R{xXPEnYW9MJ68vmrq zwOsOXGk^Cm*JR4AU!t^Rn*Ww(<^lW#+q(BG;omUv-i15q{~6Y^^qk$l|BbwW6r;2F w4lf-MV1P9gEq%|h&PnZocEiu;eILXZzk8C+k~hB(n8F!6UHx3vIVCg!0BI&@0{{R3 literal 0 HcmV?d00001 diff --git a/infrastructure/textures/infrastructure_automatic_warning_device_middle_right_1.png b/infrastructure/textures/infrastructure_automatic_warning_device_middle_right_off.png similarity index 100% rename from infrastructure/textures/infrastructure_automatic_warning_device_middle_right_1.png rename to infrastructure/textures/infrastructure_automatic_warning_device_middle_right_off.png