diff options
-rw-r--r-- | castle/init.lua | 10 | ||||
-rw-r--r-- | castle/sounds/LICENSE.txt | 2 | ||||
-rw-r--r-- | castle/sounds/castle_crossbow_reload.ogg | bin | 0 -> 12213 bytes | |||
-rw-r--r-- | castle/town_item.lua | 6 | ||||
-rw-r--r-- | trafficlight/init.lua | 360 | ||||
-rw-r--r-- | trafficlight/textures/streets_b_flashred.png | bin | 0 -> 1245 bytes | |||
-rw-r--r-- | trafficlight/textures/streets_beacon_inv.png | bin | 0 -> 3028 bytes | |||
-rw-r--r-- | trafficlight/textures/streets_hb_flashred.png | bin | 0 -> 1291 bytes | |||
-rw-r--r-- | trafficlight/textures/streets_hb_flashyellow.png | bin | 0 -> 1287 bytes | |||
-rw-r--r-- | trafficlight/textures/streets_hb_off.png | bin | 0 -> 941 bytes | |||
-rw-r--r-- | trafficlight/textures/streets_hb_red.png | bin | 0 -> 1027 bytes | |||
-rw-r--r-- | trafficlight/textures/streets_hb_yellow.png | bin | 0 -> 1050 bytes | |||
-rw-r--r-- | trafficlight/textures/streets_hybrid_beacon_inv.png | bin | 0 -> 3103 bytes |
13 files changed, 373 insertions, 5 deletions
diff --git a/castle/init.lua b/castle/init.lua index 5235d52..4e60014 100644 --- a/castle/init.lua +++ b/castle/init.lua @@ -257,8 +257,16 @@ minetest.register_node("castle:ironbound_chest",{ local meta = minetest.get_meta(pos) meta:set_string("infotext", "Ironbound Chest") meta:set_string("owner", "") + meta:set_string("formspec", + "size[8,8]".. + default.gui_bg .. + default.gui_bg_img .. + default.gui_slots .. + "list[current_name;main;0,0;8,5;]".. + "list[current_player;main;0,4;8,4;]".. + "infotext", "Ironbound Chest") local inv = meta:get_inventory() - inv:set_size("main", 8*4) + inv:set_size("main", 8*3) end, can_dig = function(pos,player) local meta = minetest.get_meta(pos); diff --git a/castle/sounds/LICENSE.txt b/castle/sounds/LICENSE.txt index d461ac2..f8041dd 100644 --- a/castle/sounds/LICENSE.txt +++ b/castle/sounds/LICENSE.txt @@ -4,7 +4,7 @@ License Sounds (From Simple Shooter mod by Stuart Jones) -castle_crossbow_click.ogg -castle_crossbow_shoot.ogg --castle_reload.ogg +-castle_crossbow_reload.ogg Author : freesound.org License : Attribution 3.0 Unported (CC BY 3.0) diff --git a/castle/sounds/castle_crossbow_reload.ogg b/castle/sounds/castle_crossbow_reload.ogg Binary files differnew file mode 100644 index 0000000..47f7245 --- /dev/null +++ b/castle/sounds/castle_crossbow_reload.ogg diff --git a/castle/town_item.lua b/castle/town_item.lua index 6e2b4f8..0cf6043 100644 --- a/castle/town_item.lua +++ b/castle/town_item.lua @@ -201,7 +201,7 @@ minetest.register_craft({ }) minetest.register_node("castle:crate", { - description = "Crate", + description = "Cratelol", drawtype = "normal", tiles = {"castle_crate_top.png","castle_crate_top.png","castle_crate.png","castle_crate.png","castle_crate.png","castle_crate.png"}, groups = {choppy=3}, @@ -214,11 +214,11 @@ minetest.register_node("castle:crate", { default.gui_bg .. default.gui_bg_img .. default.gui_slots .. - "list[current_name;main;0,1;8,4;]".. + "list[current_name;main;0,0;8,5;]".. "list[current_player;main;0,5;8,4;]") meta:set_string("infotext", "Crate") local inv = meta:get_inventory() - inv:set_size("main", 8*3) + inv:set_size("main", 8*4) end, can_dig = function(pos,player) local meta = minetest.get_meta(pos); diff --git a/trafficlight/init.lua b/trafficlight/init.lua index 8e182a0..b55d467 100644 --- a/trafficlight/init.lua +++ b/trafficlight/init.lua @@ -47,6 +47,34 @@ streets.plBox = { {0.1875,-0.0625,0.3125,0.1375,-0.4375,0.5}, --Bottom Visor, Right } +streets.bBox = { + {-0.1875,-0.1875,0.5,0.1875,0.1875,0.75}, --Box + + {-0.125, -0.125, 0.85, 0.125, 0.125, 0.75}, -- Pole Mounting Bracket + + {-0.125,0,0.3125,-0.0625,0.0625,0.5}, --Visor, Left + {-0.0625,0.0625,0.3125,0.0625,0.125,0.5}, --Visor, Center + {0.0625,0,0.3125,0.125,0.0625,0.5}, --Visor, Right +} + +streets.hbBox = { + {-0.375,-0.25,0.5,0.375,0.25,0.75}, --Box + + {-0.125, -0.125, 0.85, 0.125, 0.125, 0.75}, -- Pole Mounting Bracket + + {-0.3,0.0625,0.3125,-0.2375,0.125,0.5}, --Top Left Visor, Left + {-0.2375,0.125,0.3125,-0.1125,0.1875,0.5}, --Top Left Visor, Center + {-0.1125,0.0625,0.3125,-0.05,0.125,0.5}, --Top Left Visor, Right + + {0.1125,0.0625,0.3125,0.05,0.125,0.5}, --Top Right Visor, Left + {0.2375,0.125,0.3125,0.1125,0.1875,0.5}, --Top Right Visor, Center + {0.3,0.0625,0.3125,0.2375,0.125,0.5}, --Top Right Visor, Right + + {-0.125,-0.125,0.3125,-0.0625,-0.0625,0.5}, --Bottom Visor, Left + {-0.0625,-0.0625,0.3125,0.0625,0,0.5}, --Bottom Visor, Center + {0.0625,-0.125,0.3125,0.125,-0.0625,0.5}, --Bottom Visor, Right +} + streets.tlDigilineRules = { {x= 0, y= 0, z=-1}, {x= 0, y= 0, z= 1}, @@ -81,6 +109,10 @@ streets.on_digiline_receive = function(pos, node, channel, msg) streets.tlSwitch(pos,"streets:trafficlight_top_left_off") elseif name:find("right") then streets.tlSwitch(pos,"streets:trafficlight_top_right_off") + elseif name:find("beacon_hybrid") then + streets.tlSwitch(pos,"streets:beacon_hybrid_off") + elseif name:find("beacon") then + streets.tlSwitch(pos,"streets:beacon_off") else streets.tlSwitch(pos,"streets:trafficlight_top_off") end @@ -95,6 +127,10 @@ streets.on_digiline_receive = function(pos, node, channel, msg) streets.tlSwitch(pos,"streets:trafficlight_top_left_green") elseif name:find("right") then streets.tlSwitch(pos,"streets:trafficlight_top_right_green") + elseif name:find("beacon_hybrid") then + --Not Supported + elseif name:find("beacon") then + --Not Supported else streets.tlSwitch(pos,"streets:trafficlight_top_green") end @@ -109,6 +145,10 @@ streets.on_digiline_receive = function(pos, node, channel, msg) streets.tlSwitch(pos,"streets:trafficlight_top_left_red") elseif name:find("right") then streets.tlSwitch(pos,"streets:trafficlight_top_right_red") + elseif name:find("beacon_hybrid") then + streets.tlSwitch(pos,"streets:beacon_hybrid_red") + elseif name:find("beacon") then + --Not Supported else streets.tlSwitch(pos,"streets:trafficlight_top_red") end @@ -123,6 +163,10 @@ streets.on_digiline_receive = function(pos, node, channel, msg) streets.tlSwitch(pos,"streets:trafficlight_top_left_warn") elseif name:find("right") then streets.tlSwitch(pos,"streets:trafficlight_top_right_warn") + elseif name:find("beacon_hybrid") then + streets.tlSwitch(pos,"streets:beacon_hybrid_flashyellow") + elseif name:find("beacon") then + streets.tlSwitch(pos,"streets:beacon_flashyellow") else streets.tlSwitch(pos,"streets:trafficlight_top_warn") end @@ -137,6 +181,10 @@ streets.on_digiline_receive = function(pos, node, channel, msg) streets.tlSwitch(pos,"streets:trafficlight_top_left_warn") elseif name:find("right") then streets.tlSwitch(pos,"streets:trafficlight_top_right_warn") + elseif name:find("beacon_hybrid") then + streets.tlSwitch(pos,"streets:beacon_hybrid_flashyellow") + elseif name:find("beacon") then + streets.tlSwitch(pos,"streets:beacon_flashyellow") else streets.tlSwitch(pos,"streets:trafficlight_top_warn") end @@ -151,6 +199,10 @@ streets.on_digiline_receive = function(pos, node, channel, msg) streets.tlSwitch(pos,"streets:trafficlight_top_left_yellow") elseif name:find("right") then streets.tlSwitch(pos,"streets:trafficlight_top_right_yellow") + elseif name:find("beacon_hybrid") then + streets.tlSwitch(pos,"streets:beacon_hybrid_yellow") + elseif name:find("beacon") then + --Not Supported else streets.tlSwitch(pos,"streets:trafficlight_top_yellow") end @@ -165,6 +217,10 @@ streets.on_digiline_receive = function(pos, node, channel, msg) streets.tlSwitch(pos,"streets:trafficlight_top_left_flashred") elseif name:find("right") then streets.tlSwitch(pos,"streets:trafficlight_top_right_flashred") + elseif name:find("beacon_hybrid") then + streets.tlSwitch(pos,"streets:beacon_hybrid_flashred") + elseif name:find("beacon") then + streets.tlSwitch(pos,"streets:beacon_flashred") else streets.tlSwitch(pos,"streets:trafficlight_top_flashred") end @@ -197,6 +253,292 @@ minetest.register_node(":streets:digiline_distributor",{ } }) +minetest.register_node(":streets:beacon_hybrid_off",{ + description = "Hybrid Beacon", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2}, + inventory_image = "streets_hybrid_beacon_inv.png", + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.hbBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_hb_off.png"}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + +minetest.register_node(":streets:beacon_hybrid_yellow",{ + drop = "streets:beacon_hybrid_off", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2, not_in_creative_inventory = 1}, + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.hbBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_hb_yellow.png"}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + +minetest.register_node(":streets:beacon_hybrid_red",{ + drop = "streets:beacon_hybrid_off", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2, not_in_creative_inventory = 1}, + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.hbBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_hb_red.png"}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + +minetest.register_node(":streets:beacon_hybrid_flashyellow",{ + drop = "streets:beacon_hybrid_off", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2, not_in_creative_inventory = 1}, + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.hbBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png",{ + name="streets_hb_flashyellow.png", + animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}, + }}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + +minetest.register_node(":streets:beacon_hybrid_flashred",{ + drop = "streets:beacon_hybrid_off", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2, not_in_creative_inventory = 1}, + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.hbBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png",{ + name="streets_hb_flashred.png", + animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}, + }}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + +minetest.register_node(":streets:beacon_off",{ + description = "Beacon", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2}, + inventory_image = "streets_beacon_inv.png", + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.bBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_off.png"}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + +minetest.register_node(":streets:beacon_flashred",{ + drop = "streets:beacon_off", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2, not_in_creative_inventory = 1}, + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.bBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png",{ + name="streets_b_flashred.png", + animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}, + }}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + +minetest.register_node(":streets:beacon_flashyellow",{ + drop = "streets:beacon_off", + drawtype="nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 1, level = 2, not_in_creative_inventory = 1}, + light_source = 11, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = streets.bBox + }, + tiles = {"streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png","streets_tl_bg.png",{ + name="streets_tl_warn.png", + animation={type="vertical_frames", aspect_w=64, aspect_h=64, length=1.2}, + }}, + digiline = { + receptor = {}, + wire = {rules=streets.tlDigilineRules}, + effector = { + action = function(pos, node, channel, msg) + streets.on_digiline_receive(pos, node, channel, msg) + end + } + }, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[channel;Channel;${channel}]") + 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, +}) + minetest.register_node(":streets:trafficlight_top_extender_left_off",{ description = streets.S("Traffic Light Left-Turn Module"), drawtype="nodebox", @@ -736,6 +1078,24 @@ minetest.register_craft({ }) minetest.register_craft({ + output = "streets:beacon_off", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "dye:red", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} + } +}) + +minetest.register_craft({ + output = "streets:beacon_hybrid_off", + recipe = { + {"dye:red", "default:steel_ingot", "dye:red"}, + {"default:steel_ingot", "dye:yellow", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} + } +}) + +minetest.register_craft({ output = "streets:digiline_distributor", recipe = { {"", "digilines:wire_std_00000000", ""}, diff --git a/trafficlight/textures/streets_b_flashred.png b/trafficlight/textures/streets_b_flashred.png Binary files differnew file mode 100644 index 0000000..8f20032 --- /dev/null +++ b/trafficlight/textures/streets_b_flashred.png diff --git a/trafficlight/textures/streets_beacon_inv.png b/trafficlight/textures/streets_beacon_inv.png Binary files differnew file mode 100644 index 0000000..bd9a700 --- /dev/null +++ b/trafficlight/textures/streets_beacon_inv.png diff --git a/trafficlight/textures/streets_hb_flashred.png b/trafficlight/textures/streets_hb_flashred.png Binary files differnew file mode 100644 index 0000000..7b0afa2 --- /dev/null +++ b/trafficlight/textures/streets_hb_flashred.png diff --git a/trafficlight/textures/streets_hb_flashyellow.png b/trafficlight/textures/streets_hb_flashyellow.png Binary files differnew file mode 100644 index 0000000..3e97632 --- /dev/null +++ b/trafficlight/textures/streets_hb_flashyellow.png diff --git a/trafficlight/textures/streets_hb_off.png b/trafficlight/textures/streets_hb_off.png Binary files differnew file mode 100644 index 0000000..999e1a4 --- /dev/null +++ b/trafficlight/textures/streets_hb_off.png diff --git a/trafficlight/textures/streets_hb_red.png b/trafficlight/textures/streets_hb_red.png Binary files differnew file mode 100644 index 0000000..4dc175e --- /dev/null +++ b/trafficlight/textures/streets_hb_red.png diff --git a/trafficlight/textures/streets_hb_yellow.png b/trafficlight/textures/streets_hb_yellow.png Binary files differnew file mode 100644 index 0000000..27f97dd --- /dev/null +++ b/trafficlight/textures/streets_hb_yellow.png diff --git a/trafficlight/textures/streets_hybrid_beacon_inv.png b/trafficlight/textures/streets_hybrid_beacon_inv.png Binary files differnew file mode 100644 index 0000000..f368555 --- /dev/null +++ b/trafficlight/textures/streets_hybrid_beacon_inv.png |