From a24e6add1b239164d10a9385267aeb3cdcc5be54 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sat, 12 Oct 2013 11:42:12 +0200 Subject: soft depend on building_blicks --- asphalt/depends.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asphalt/depends.txt b/asphalt/depends.txt index 48ef5e1..fef815d 100644 --- a/asphalt/depends.txt +++ b/asphalt/depends.txt @@ -1,2 +1,3 @@ default -streetsmod \ No newline at end of file +streetsmod +building_blocks? \ No newline at end of file -- cgit v1.2.3 From 02592d54f7fd17b4cc38a0cb94839dad8c55fc93 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sat, 12 Oct 2013 11:49:48 +0200 Subject: Started adding philip's textures for streetlamp --- streetlamps/init.lua | 3 +++ streetlamps/textures/streets_lamps_basic_bottom.png | Bin 0 -> 3121 bytes streetlamps/textures/streets_lamps_basic_middle.png | Bin 0 -> 6634 bytes streetlamps/textures/streets_lamps_basic_top.png | Bin 0 -> 5112 bytes streetlamps/textures/streets_lamps_basic_top_top.png | Bin 0 -> 6359 bytes 5 files changed, 3 insertions(+) create mode 100644 streetlamps/textures/streets_lamps_basic_bottom.png create mode 100644 streetlamps/textures/streets_lamps_basic_middle.png create mode 100644 streetlamps/textures/streets_lamps_basic_top.png create mode 100644 streetlamps/textures/streets_lamps_basic_top_top.png diff --git a/streetlamps/init.lua b/streetlamps/init.lua index 1cc9973..c0d3cca 100644 --- a/streetlamps/init.lua +++ b/streetlamps/init.lua @@ -3,6 +3,7 @@ ]] minetest.register_node(":streets:streetlamp_basic_bottom",{ description = "Street lamp", + tiles = {"streets_lamps_basic_bottom.png"}, groups = {cracky = 1}, paramtype = "light", drawtype = "nodebox", @@ -31,6 +32,7 @@ minetest.register_node(":streets:streetlamp_basic_bottom",{ minetest.register_node(":streets:streetlamp_basic_middle",{ description = "U cheater U", groups = {cracky = 1, not_in_creative_inventory = 1}, + tiles = {"streets_lamps_basic_middle.png"}, paramtype = "light", drawtype = "nodebox", pointable = false, @@ -58,6 +60,7 @@ minetest.register_node(":streets:streetlamp_basic_top_off",{ minetest.register_node(":streets:streetlamp_basic_top_on",{ description = "U cheater U", groups = {cracky = 1, not_in_creative_inventory = 1}, + tiles = {"streets_lamps_basic_top_top.png","streets_lamps_basic_top.png"}, paramtype = "light", drawtype = "nodebox", pointable = false, diff --git a/streetlamps/textures/streets_lamps_basic_bottom.png b/streetlamps/textures/streets_lamps_basic_bottom.png new file mode 100644 index 0000000..07d123f Binary files /dev/null and b/streetlamps/textures/streets_lamps_basic_bottom.png differ diff --git a/streetlamps/textures/streets_lamps_basic_middle.png b/streetlamps/textures/streets_lamps_basic_middle.png new file mode 100644 index 0000000..1370765 Binary files /dev/null and b/streetlamps/textures/streets_lamps_basic_middle.png differ diff --git a/streetlamps/textures/streets_lamps_basic_top.png b/streetlamps/textures/streets_lamps_basic_top.png new file mode 100644 index 0000000..355f50d Binary files /dev/null and b/streetlamps/textures/streets_lamps_basic_top.png differ diff --git a/streetlamps/textures/streets_lamps_basic_top_top.png b/streetlamps/textures/streets_lamps_basic_top_top.png new file mode 100644 index 0000000..4d6bf22 Binary files /dev/null and b/streetlamps/textures/streets_lamps_basic_top_top.png differ -- cgit v1.2.3 From 0df7fcd05444feb8545c9acccf3c8e7ca018f137 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sat, 12 Oct 2013 11:54:52 +0200 Subject: Improved selectionbox --- trafficlight/init.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/trafficlight/init.lua b/trafficlight/init.lua index 768c26a..1d3049d 100644 --- a/trafficlight/init.lua +++ b/trafficlight/init.lua @@ -17,12 +17,6 @@ minetest.register_node(":streets:trafficlight_bottom",{ {-0.1,0.25,-0.1,0.1,0.5,0.1} } }, - selection_box = { - type = "fixed", - fixed = { - {-0.25,-0.5,-0.25,0.25,2.5,0.25}, - } - } }) minetest.register_node(":streets:trafficlight_middle",{ @@ -54,6 +48,13 @@ minetest.register_node(":streets:trafficlight_controller",{ {-0.05,0.5,-0.05,0.05,1.6,0.05} } }, + selection_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,0.5,0.5}, + {-0.5,1.5,-0.5,0.5,4.5,0.5} + } + }, on_receive_fields = function(pos, formname, fields, sender) minetest.get_meta(pos):set_string("channel", fields.channel) end, -- cgit v1.2.3 From 81abbed3eb4a5a745c96efe8179d0cc3accff299 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 13 Oct 2013 12:33:14 +0200 Subject: Changed drawtype to nodebox --- roadsigns/signs.lua | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/roadsigns/signs.lua b/roadsigns/signs.lua index a73b294..0a3ecf4 100644 --- a/roadsigns/signs.lua +++ b/roadsigns/signs.lua @@ -5,7 +5,13 @@ if streets.extendedBy.bucket == true and streets.extendedBy.wool then inventory_image = "streets_sign_lava.png", wield_image = "streets_sign_lava.png", groups = {snappy = 1,attached_node = 1}, - drawtype = "signlike", + drawtype = "nodebox", + node_box = { + type = "wallmounted", + fixed = { + {-0.4,-0.5,-0.4,0.4,-0.4,0.4} + } + }, paramtype = "light", paramtype2 = "wallmounted", walkable = false, @@ -33,7 +39,13 @@ if streets.extendedBy.bucket == true and streets.extendedBy.wool then inventory_image = "streets_sign_water.png", wield_image = "streets_sign_water.png", groups = {snappy = 1,attached_node = 1}, - drawtype = "signlike", + drawtype = "nodebox", + node_box = { + type = "wallmounted", + fixed = { + {-0.4,-0.5,-0.4,0.4,-0.4,0.4} + } + }, paramtype = "light", paramtype2 = "wallmounted", walkable = false, @@ -61,7 +73,13 @@ if streets.extendedBy.bucket == true and streets.extendedBy.wool then inventory_image = "streets_sign_construction.png", wield_image = "streets_sign_construction.png", groups = {snappy = 1,attached_node = 1}, - drawtype = "signlike", + drawtype = "nodebox", + node_box = { + type = "wallmounted", + fixed = { + {-0.4,-0.5,-0.4,0.4,-0.4,0.4} + } + }, paramtype = "light", paramtype2 = "wallmounted", walkable = false, -- cgit v1.2.3 From 4863e454ea76b951aa8a8fe2b0cace02df1fa8fd Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 13 Oct 2013 12:42:17 +0200 Subject: textures and selection_box --- streetlamps/init.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/streetlamps/init.lua b/streetlamps/init.lua index c0d3cca..621c7b1 100644 --- a/streetlamps/init.lua +++ b/streetlamps/init.lua @@ -14,6 +14,12 @@ minetest.register_node(":streets:streetlamp_basic_bottom",{ {-0.1,0.4,-0.1,0.1,0.5,0.1} } }, + selection_box = { + type = "fixed", + fixed = { + {-0.3,-0.5,-0.3,0.3,2.5,0.3} + } + }, after_place_node = function(pos,placer,itemstack) minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z},{name = "streets:streetlamp_basic_middle"}) minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_off"}) @@ -60,7 +66,7 @@ minetest.register_node(":streets:streetlamp_basic_top_off",{ minetest.register_node(":streets:streetlamp_basic_top_on",{ description = "U cheater U", groups = {cracky = 1, not_in_creative_inventory = 1}, - tiles = {"streets_lamps_basic_top_top.png","streets_lamps_basic_top.png"}, + tiles = {"streets_lamps_basic_top_top.png","streets_lamps_basic_top_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png"}, paramtype = "light", drawtype = "nodebox", pointable = false, -- cgit v1.2.3 From 52b2ae9334403d49103f38d6007f643b52a131f6 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Mon, 14 Oct 2013 12:02:09 +0200 Subject: Signs available in creative mode --- roadsigns/signs.lua | 182 ++++++++++++++++++++++++++-------------------------- 1 file changed, 90 insertions(+), 92 deletions(-) diff --git a/roadsigns/signs.lua b/roadsigns/signs.lua index 0a3ecf4..9010691 100644 --- a/roadsigns/signs.lua +++ b/roadsigns/signs.lua @@ -1,99 +1,97 @@ -if streets.extendedBy.bucket == true and streets.extendedBy.wool then - minetest.register_node(":streets:sign_lava",{ - description = "Warning sign (lava)", - tiles = {"streets_sign_lava.png"}, - inventory_image = "streets_sign_lava.png", - wield_image = "streets_sign_lava.png", - groups = {snappy = 1,attached_node = 1}, - drawtype = "nodebox", - node_box = { - type = "wallmounted", - fixed = { - {-0.4,-0.5,-0.4,0.4,-0.4,0.4} - } - }, - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "wallmounted" +minetest.register_node(":streets:sign_lava",{ + description = "Warning sign (lava)", + tiles = {"streets_sign_lava.png"}, + inventory_image = "streets_sign_lava.png", + wield_image = "streets_sign_lava.png", + groups = {snappy = 1,attached_node = 1}, + drawtype = "nodebox", + node_box = { + type = "wallmounted", + fixed = { + {-0.4,-0.5,-0.4,0.4,-0.4,0.4} } - }) - - minetest.register_craft({ - output = "streets:sign_lava 2", - recipe = { - {"wool:red","wool:red","wool:red"}, - {"wool:red","bucket:bucket_lava","wool:red"}, - {"wool:red","wool:red","wool:red"} - }, - replacements = { - {"bucket:bucket_lava", "bucket:bucket_empty"} + }, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "wallmounted" } - }) +}) + +minetest.register_craft({ + output = "streets:sign_lava 2", + recipe = { + {"wool:red","wool:red","wool:red"}, + {"wool:red","bucket:bucket_lava","wool:red"}, + {"wool:red","wool:red","wool:red"} + }, + replacements = { + {"bucket:bucket_lava", "bucket:bucket_empty"} + } +}) - minetest.register_node(":streets:sign_water",{ - description = "Warning sign (water)", - tiles = {"streets_sign_water.png"}, - inventory_image = "streets_sign_water.png", - wield_image = "streets_sign_water.png", - groups = {snappy = 1,attached_node = 1}, - drawtype = "nodebox", - node_box = { - type = "wallmounted", - fixed = { - {-0.4,-0.5,-0.4,0.4,-0.4,0.4} - } - }, - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "wallmounted" +minetest.register_node(":streets:sign_water",{ + description = "Warning sign (water)", + tiles = {"streets_sign_water.png"}, + inventory_image = "streets_sign_water.png", + wield_image = "streets_sign_water.png", + groups = {snappy = 1,attached_node = 1}, + drawtype = "nodebox", + node_box = { + type = "wallmounted", + fixed = { + {-0.4,-0.5,-0.4,0.4,-0.4,0.4} } - }) + }, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "wallmounted" + } +}) - minetest.register_craft({ - output = "streets:sign_water 2", - recipe = { - {"wool:red","wool:red","wool:red"}, - {"wool:red","bucket:bucket_water","wool:red"}, - {"wool:red","wool:red","wool:red"} - }, - replacements = { - {"bucket:bucket_water", "bucket:bucket_empty"} - } - }) +minetest.register_craft({ + output = "streets:sign_water 2", + recipe = { + {"wool:red","wool:red","wool:red"}, + {"wool:red","bucket:bucket_water","wool:red"}, + {"wool:red","wool:red","wool:red"} + }, + replacements = { + {"bucket:bucket_water", "bucket:bucket_empty"} + } +}) - minetest.register_node(":streets:sign_construction",{ - description = "Warning sign (Construction area)", - tiles = {"streets_sign_construction.png"}, - inventory_image = "streets_sign_construction.png", - wield_image = "streets_sign_construction.png", - groups = {snappy = 1,attached_node = 1}, - drawtype = "nodebox", - node_box = { - type = "wallmounted", - fixed = { - {-0.4,-0.5,-0.4,0.4,-0.4,0.4} - } - }, - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "wallmounted" - } - }) - minetest.register_craft({ - output = "streets:sign_construction 2", - recipe = { - {"wool:red","wool:red","wool:red"}, - {"wool:red","default:shovel_steel","wool:red"}, - {"wool:red","wool:red","wool:red"} +minetest.register_node(":streets:sign_construction",{ + description = "Warning sign (Construction area)", + tiles = {"streets_sign_construction.png"}, + inventory_image = "streets_sign_construction.png", + wield_image = "streets_sign_construction.png", + groups = {snappy = 1,attached_node = 1}, + drawtype = "nodebox", + node_box = { + type = "wallmounted", + fixed = { + {-0.4,-0.5,-0.4,0.4,-0.4,0.4} } - }) -end \ No newline at end of file + }, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "wallmounted" + } +}) +minetest.register_craft({ + output = "streets:sign_construction 2", + recipe = { + {"wool:red","wool:red","wool:red"}, + {"wool:red","default:shovel_steel","wool:red"}, + {"wool:red","wool:red","wool:red"} + } +}) \ No newline at end of file -- cgit v1.2.3 From c72382e0a83cc77acc0bd0590c558dcfa70fb146 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Mon, 14 Oct 2013 12:23:07 +0200 Subject: Streetlamp controller --- streetlamps/init.lua | 55 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/streetlamps/init.lua b/streetlamps/init.lua index 621c7b1..d813de9 100644 --- a/streetlamps/init.lua +++ b/streetlamps/init.lua @@ -1,39 +1,62 @@ --[[ StreetsMod: Streetlamps ]] -minetest.register_node(":streets:streetlamp_basic_bottom",{ - description = "Street lamp", - tiles = {"streets_lamps_basic_bottom.png"}, - groups = {cracky = 1}, - paramtype = "light", +minetest.register_node(":streets:streetlamp_basic_controller",{ + description = "Trafficlight", + tiles = {"streets_lampcontroller_top.png","streets_lampcontroller_bottom.png","streets_lampcontroller_sides.png"}, + groups = {cracky = 1, not_in_creative_inventory = 1}, drawtype = "nodebox", + paramtype = "light", node_box = { type = "fixed", fixed = { - {-0.15,-0.5,-0.15,0.15,0.4,0.15}, - {-0.1,0.4,-0.1,0.1,0.5,0.1} + {-0.5,-0.5,-0.5,0.5,0.5,0.5}, + {-0.05,0.5,-0.05,0.05,1.6,0.05} } }, - selection_box = { + selection_box = { type = "fixed", fixed = { - {-0.3,-0.5,-0.3,0.3,2.5,0.3} + {-0.5,-0.5,-0.5,0.5,0.5,0.5}, + {-0.3,1.5,-0.3,0.3,4.5,0.3} } }, - after_place_node = function(pos,placer,itemstack) - minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z},{name = "streets:streetlamp_basic_middle"}) - minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_off"}) - end, mesecons = { effector = { action_on = function(pos,node) - minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_on"}) + minetest.set_node({x = pos.x, y = pos.y + 4, z = pos.z},{name = "streets:streetlamp_basic_top_on"}) end, action_off = function(pos,node) - minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_off"}) + minetest.set_node({x = pos.x, y = pos.y + 4, z = pos.z},{name = "streets:streetlamp_basic_top_off"}) end } - } + }, + after_dig_node = function(pos) + minetest.remove_node({x = pos.x, y = pos.y + 2, z = pos.z}) + minetest.remove_node({x = pos.x, y = pos.y + 3, z = pos.z}) + minetest.remove_node({x = pos.x, y = pos.y + 4, z = pos.z}) + minetest.chat_send_all("!!!") + end +}) +minetest.register_node(":streets:streetlamp_basic_bottom",{ + description = "Street lamp", + tiles = {"streets_lamps_basic_bottom.png"}, + groups = {cracky = 1}, + paramtype = "light", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.15,-0.5,-0.15,0.15,0.4,0.15}, + {-0.1,0.4,-0.1,0.1,0.5,0.1} + } + }, + pointable = false, + after_place_node = function(pos,placer,itemstack) + minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z},{name = "streets:streetlamp_basic_middle"}) + minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_off"}) + minetest.set_node({x = pos.x, y = pos.y - 2, z = pos.z},{name = "streets:streetlamp_basic_controller"}) + end }) minetest.register_node(":streets:streetlamp_basic_middle",{ description = "U cheater U", -- cgit v1.2.3 From 28c4a2d251279b392b573854114fa9f6dbbe6faa Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Mon, 14 Oct 2013 12:50:13 +0200 Subject: chatcommand '/streets' --- streetsmod/init.lua | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/streetsmod/init.lua b/streetsmod/init.lua index ed044bd..f070cfd 100644 --- a/streetsmod/init.lua +++ b/streetsmod/init.lua @@ -11,6 +11,10 @@ streets.version = "1.3 indev" streets.modpath = minetest.get_modpath("streets") streets.extendedBy = {} + streets.load = { + start = os.clock(), + fin = 0 + } -- Check for mods which change this mod's beahaviour print("Streets: Checking installed mods...") @@ -35,13 +39,6 @@ print("'Moreblocks' not installed \n\t => There won't be stairs and slabs'") streets.extendedBy.moreblocks = false end - if minetest.get_modpath("bucket") then - print("'Bucket' is installed \n\t => All signs are available") - streets.extendedBy.bucket = true - else - print("'Bucket' not installed \n\t => No signs available") - streets.extendedBy.bucket = false - end if minetest.get_modpath("mesecons") then print("'Mesecons' is installed \n\t => Trafficlights might be available. Checking for digilines. Streetlamps available") streets.extendedBy.mesecons = true @@ -64,6 +61,30 @@ streets.extendedBy.prefab = false end +-- Streets chatcommand + local function round(num, idp) + local mult = 10^(idp or 0) + return math.floor(num * mult + 0.5) / mult + end + minetest.register_chatcommand("streets",{ + description = "Check version of you installed StreetsMod and find information", + func = function(name,param) + minetest.show_formspec(name, "streets:streetsform", table.concat({ + "size[10,6]", + "label[0,1;Wool installed: " .. tostring(streets.extendedBy.wool) .. "]", + "label[0,1.5;Technic installed: " .. tostring(streets.extendedBy.technic) .. "]", + "label[0,2;Moreblocks installed: " .. tostring(streets.extendedBy.moreblocks) .. "]", + "label[0,2.5;Mesecons installed: " .. tostring(streets.extendedBy.mesecons) .. "]", + "label[0,3;Digilines installed: " .. tostring(streets.extendedBy.digilines) .. "]", + "label[0,3.5;Prefab installed: " .. tostring(streets.extendedBy.prefab) .. "]", + "label[0,4.5;Running version: " .. streets.version .. "]", + "label[0,5;Load time: " .. round(streets.load.fin - streets.load.start,4) .. "s]" + })) + end + }) + -- Done print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!") - print("Streets: Special thanks to everyone who contributed to this mod (except myself): Immanuel_Kant and philipbenr!") \ No newline at end of file + print("Streets: Special thanks to everyone who contributed to this mod (except myself): Immanuel_Kant and philipbenr!") + streets.load.fin = os.clock() +print(os.clock()) \ No newline at end of file -- cgit v1.2.3 From 23bd16f9276122945d05018776e44e0563078346 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Mon, 14 Oct 2013 12:51:29 +0200 Subject: Removed code --- streetsmod/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/streetsmod/init.lua b/streetsmod/init.lua index f070cfd..e7de999 100644 --- a/streetsmod/init.lua +++ b/streetsmod/init.lua @@ -86,5 +86,4 @@ -- Done print("Streets: Setup completed, have fun with StreetsMod ".. streets.version .."!") print("Streets: Special thanks to everyone who contributed to this mod (except myself): Immanuel_Kant and philipbenr!") - streets.load.fin = os.clock() -print(os.clock()) \ No newline at end of file + streets.load.fin = os.clock() \ No newline at end of file -- cgit v1.2.3 From 761e23f88221f74c89299105d0a9920205ebba33 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Mon, 14 Oct 2013 19:30:49 +0200 Subject: Removed craft recipes --- roadsigns/signs.lua | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/roadsigns/signs.lua b/roadsigns/signs.lua index 9010691..70959cd 100644 --- a/roadsigns/signs.lua +++ b/roadsigns/signs.lua @@ -19,18 +19,6 @@ minetest.register_node(":streets:sign_lava",{ type = "wallmounted" } }) - -minetest.register_craft({ - output = "streets:sign_lava 2", - recipe = { - {"wool:red","wool:red","wool:red"}, - {"wool:red","bucket:bucket_lava","wool:red"}, - {"wool:red","wool:red","wool:red"} - }, - replacements = { - {"bucket:bucket_lava", "bucket:bucket_empty"} - } -}) minetest.register_node(":streets:sign_water",{ description = "Warning sign (water)", @@ -54,18 +42,6 @@ minetest.register_node(":streets:sign_water",{ } }) -minetest.register_craft({ - output = "streets:sign_water 2", - recipe = { - {"wool:red","wool:red","wool:red"}, - {"wool:red","bucket:bucket_water","wool:red"}, - {"wool:red","wool:red","wool:red"} - }, - replacements = { - {"bucket:bucket_water", "bucket:bucket_empty"} - } -}) - minetest.register_node(":streets:sign_construction",{ description = "Warning sign (Construction area)", tiles = {"streets_sign_construction.png"}, @@ -86,12 +62,4 @@ minetest.register_node(":streets:sign_construction",{ selection_box = { type = "wallmounted" } -}) -minetest.register_craft({ - output = "streets:sign_construction 2", - recipe = { - {"wool:red","wool:red","wool:red"}, - {"wool:red","default:shovel_steel","wool:red"}, - {"wool:red","wool:red","wool:red"} - } }) \ No newline at end of file -- cgit v1.2.3 From 64ef3a5507eb8c729b2b749c574320f0627f2195 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Mon, 14 Oct 2013 19:31:17 +0200 Subject: Started developement of a sign 'workshop' --- roadsigns/init.lua | 3 ++- roadsigns/workshop.lua | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 roadsigns/workshop.lua diff --git a/roadsigns/init.lua b/roadsigns/init.lua index 4985694..38e8692 100644 --- a/roadsigns/init.lua +++ b/roadsigns/init.lua @@ -2,4 +2,5 @@ StreetsMod: Poles and signs ]] dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/pole.lua") -dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/signs.lua") \ No newline at end of file +dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/signs.lua") +dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/workshop.lua") \ No newline at end of file diff --git a/roadsigns/workshop.lua b/roadsigns/workshop.lua new file mode 100644 index 0000000..a71eeda --- /dev/null +++ b/roadsigns/workshop.lua @@ -0,0 +1,30 @@ +--[[ + StreetsMod: Create signs in the signworkshop +]] +minetest.register_node(":streets:signworkshop",{ + description = "Sign workshop", + tiles = {}, + groups = {cracky = 1, level = 2}, + after_place_node = function(pos) + minetest.get_meta(pos):set_string("formspec",table.concat({ + "size[12,10]", + "label[3.5,0;Sign workshop - Create signs for your roads!]", + "label[0,0.5;Available signs:]", + "list[context;streets:signworkshop_list;0,1;5,4]", + "label[9,0.5;Needed stuff:]", + "list[context;streets:signworkshop_recipe;8,1;4,1]", + "label[9,2;Put it here:]", + "list[context;streets:signworkshop_input;8,3;4,1]", + "list[current_player;main;2,6;8,4]" + })) + local inv = minetest.get_inventory({type = "node", pos = pos}) + inv:set_size("streets:signworkshop_list",5*4) + inv:set_size("streets:signworkshop_recipe",3*2) + inv:set_size("streets:signworkshop_input",4*1) + end, + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + if to_list ~= "x" then + + end + end, +}) \ No newline at end of file -- cgit v1.2.3 From a776532a30dd80560a26d77ef9ea53848ba76ba7 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Mon, 14 Oct 2013 19:57:41 +0200 Subject: Some more code --- roadsigns/workshop.lua | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/roadsigns/workshop.lua b/roadsigns/workshop.lua index a71eeda..939c570 100644 --- a/roadsigns/workshop.lua +++ b/roadsigns/workshop.lua @@ -15,16 +15,46 @@ minetest.register_node(":streets:signworkshop",{ "list[context;streets:signworkshop_recipe;8,1;4,1]", "label[9,2;Put it here:]", "list[context;streets:signworkshop_input;8,3;4,1]", - "list[current_player;main;2,6;8,4]" + "button[8,4;2,1;streets:signworkshop_send;Start!]", + "label[5.8,0.5;Selected:]", + "list[context;streets:signworkshop_select;6,1;1,1]", + "label[5.8,2.5;Output:]", + "list[context;streets:signworkshop_output;6,3;1,1]", + "list[current_player;main;2,6;8,4]", })) local inv = minetest.get_inventory({type = "node", pos = pos}) inv:set_size("streets:signworkshop_list",5*4) inv:set_size("streets:signworkshop_recipe",3*2) inv:set_size("streets:signworkshop_input",4*1) + inv:set_size("streets:signworkshop_select",1*1) + inv:set_size("streets:signworkshop_output",1*1) + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if listname ~= "streets:signworkshop_input" then + return 0 + else + return 1 + end end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - if to_list ~= "x" then - + if to_list == "streets:signworkshop_input" and from_list == "streets:signworkshop_input" then + return 1 + else + return 0 + end + end, + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if listname == "streets:signworkshop_input" or listname == "streets:signworkshop_output" then + return 99 + else + return 0 end end, + on_receive_fields = function(pos, formname, fields, sender) + local inv = minetest.get_inventory({type = "node", pos = pos}) + -- + if inv:is_emtpy("streets:signworkshop_input") ~= true then + + end + end }) \ No newline at end of file -- cgit v1.2.3 From 3646ecaa4b0062bc7a24fb9960e85dd719e69aaf Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Tue, 15 Oct 2013 10:32:37 +0200 Subject: Display recipe and validate input --- roadsigns/signs.lua | 33 +++++++++++++++++++++++++++++++++ roadsigns/workshop.lua | 45 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/roadsigns/signs.lua b/roadsigns/signs.lua index 70959cd..0b01ff5 100644 --- a/roadsigns/signs.lua +++ b/roadsigns/signs.lua @@ -1,3 +1,30 @@ +minetest.register_node(":streets:sign_blank",{ + description = "Emtpy sign", + tiles = {"streets_sign_back.png"}, + inventory_image = "streets_sign_back.png", + wield_image = "streets_sign_back.png", + groups = {snappy = 1,attached_node = 1}, + drawtype = "nodebox", + node_box = { + type = "wallmounted", + fixed = { + {-0.4,-0.5,-0.4,0.4,-0.4,0.4} + } + }, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "wallmounted" + }, + streets = { + signworkshop = { + recipe = {"default:steel_ingot","","",""}, + time = 5 + } + } +}) minetest.register_node(":streets:sign_lava",{ description = "Warning sign (lava)", tiles = {"streets_sign_lava.png"}, @@ -17,7 +44,13 @@ minetest.register_node(":streets:sign_lava",{ sunlight_propagates = true, selection_box = { type = "wallmounted" + }, + streets = { + signworkshop = { + recipe = {"streets:sign_blank","bucket:bucket_lava","",""}, + time = 7 } + } }) minetest.register_node(":streets:sign_water",{ diff --git a/roadsigns/workshop.lua b/roadsigns/workshop.lua index 939c570..283d2b4 100644 --- a/roadsigns/workshop.lua +++ b/roadsigns/workshop.lua @@ -28,6 +28,11 @@ minetest.register_node(":streets:signworkshop",{ inv:set_size("streets:signworkshop_input",4*1) inv:set_size("streets:signworkshop_select",1*1) inv:set_size("streets:signworkshop_output",1*1) + -- Fill + inv:add_item("streets:signworkshop_list","streets:sign_blank") + inv:add_item("streets:signworkshop_list","streets:sign_lava") + inv:add_item("streets:signworkshop_list","streets:sign_water") + inv:add_item("streets:signworkshop_list","streets:sign_construction") end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) if listname ~= "streets:signworkshop_input" then @@ -37,8 +42,22 @@ minetest.register_node(":streets:signworkshop",{ end end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + -- Move items inside input slots if to_list == "streets:signworkshop_input" and from_list == "streets:signworkshop_input" then return 1 + -- List -> selection + elseif from_list == "streets:signworkshop_list" and to_list == "streets:signworkshop_select" then + local inv = minetest.get_meta(pos):get_inventory() + local selected = inv:get_stack("streets:signworkshop_list",from_index):to_table() + local need = minetest.registered_nodes[selected.name].streets.signworkshop.recipe + inv:set_list("streets:signworkshop_recipe",{need[1],need[2],need[3],need[4]}) + return 1 + -- selection -> list + elseif from_list == "streets:signworkshop_select" and to_list == "streets:signworkshop_list" then + local inv = minetest.get_meta(pos):get_inventory() + inv:set_list("streets:signworkshop_recipe",{"","","",""}) + return 1 + -- Every other case else return 0 end @@ -53,8 +72,30 @@ minetest.register_node(":streets:signworkshop",{ on_receive_fields = function(pos, formname, fields, sender) local inv = minetest.get_inventory({type = "node", pos = pos}) -- - if inv:is_emtpy("streets:signworkshop_input") ~= true then - + if inv:is_empty("streets:signworkshop_input") ~= true and inv:is_empty("streets:signworkshop_select") ~= true then + local selection = inv:get_stack("streets:signworkshop_select",1):get_name() + local def = minetest.registered_nodes[selection].streets.signworkshop + local need = inv:get_list("streets:signworkshop_recipe") + local has = inv:get_list("streets:signworkshop_input") + need[1] = need[1]:to_table() + need[2] = need[2]:to_table() + need[3] = need[3]:to_table() + need[4] = need[4]:to_table() + has[1] = has[1]:to_table() + has[2] = has[2]:to_table() + has[3] = has[3]:to_table() + has[4] = has[4]:to_table() + if need[1] == nil then need[1] = { name = "" } end + if need[2] == nil then need[2] = { name = "" } end + if need[3] == nil then need[3] = { name = "" } end + if need[4] == nil then need[4] = { name = "" } end + if has[1] == nil then has[1] = { name = "" } end + if has[2] == nil then has[2] = { name = "" } end + if has[3] == nil then has[3] = { name = "" } end + if has[4] == nil then has[4] = { name = "" } end + if need[1].name == has[1].name and need[2].name == has[2].name and need[3].name == has[3].name and need[4].name == has[4].name then + minetest.chat_send_all("yay") + end end end }) \ No newline at end of file -- cgit v1.2.3 From 7e72af629252db26347a5248c9fdd370739dd16d Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Tue, 15 Oct 2013 14:28:42 +0200 Subject: Finished code --- roadsigns/workshop.lua | 76 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/roadsigns/workshop.lua b/roadsigns/workshop.lua index 283d2b4..5ee1af5 100644 --- a/roadsigns/workshop.lua +++ b/roadsigns/workshop.lua @@ -1,28 +1,48 @@ --[[ StreetsMod: Create signs in the signworkshop ]] +local forms = { + inactive = { + "size[12,10]", + "label[3.5,0;Sign workshop - Create signs for your roads!]", + "label[0,0.5;Available signs:]", + "list[context;streets:signworkshop_list;0,1;5,4]", + "label[9,0.5;Needed stuff:]", + "list[context;streets:signworkshop_recipe;8,1;4,1]", + "label[9,2;Put it here:]", + "list[context;streets:signworkshop_input;8,3;4,1]", + "button[8,4;2,1;streets:signworkshop_send;Start!]", + "label[5.8,0.5;Selected:]", + "list[context;streets:signworkshop_select;6,1;1,1]", + "label[5.8,2.5;Output:]", + "list[context;streets:signworkshop_output;6,3;1,1]", + "list[current_player;main;2,6;8,4]", + }, + active = { + "size[12,10]", + "label[3.5,0;Sign workshop - Create signs for your roads!]", + "label[0,0.5;Available signs:]", + "list[context;streets:signworkshop_list;0,1;5,4]", + "label[9,0.5;Needed stuff:]", + "list[context;streets:signworkshop_recipe;8,1;4,1]", + "label[9,2;Put it here:]", + "list[context;streets:signworkshop_input;8,3;4,1]", + "label[5.8,0.5;Selected:]", + "list[context;streets:signworkshop_select;6,1;1,1]", + "label[5.8,2.5;Output:]", + "list[context;streets:signworkshop_output;6,3;1,1]", + "list[current_player;main;2,6;8,4]", + "label[8,4;Please wait...]", + } +} minetest.register_node(":streets:signworkshop",{ description = "Sign workshop", tiles = {}, groups = {cracky = 1, level = 2}, after_place_node = function(pos) - minetest.get_meta(pos):set_string("formspec",table.concat({ - "size[12,10]", - "label[3.5,0;Sign workshop - Create signs for your roads!]", - "label[0,0.5;Available signs:]", - "list[context;streets:signworkshop_list;0,1;5,4]", - "label[9,0.5;Needed stuff:]", - "list[context;streets:signworkshop_recipe;8,1;4,1]", - "label[9,2;Put it here:]", - "list[context;streets:signworkshop_input;8,3;4,1]", - "button[8,4;2,1;streets:signworkshop_send;Start!]", - "label[5.8,0.5;Selected:]", - "list[context;streets:signworkshop_select;6,1;1,1]", - "label[5.8,2.5;Output:]", - "list[context;streets:signworkshop_output;6,3;1,1]", - "list[current_player;main;2,6;8,4]", - })) - local inv = minetest.get_inventory({type = "node", pos = pos}) + minetest.get_meta(pos):set_string("formspec",table.concat(forms.inactive)) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() inv:set_size("streets:signworkshop_list",5*4) inv:set_size("streets:signworkshop_recipe",3*2) inv:set_size("streets:signworkshop_input",4*1) @@ -33,6 +53,9 @@ minetest.register_node(":streets:signworkshop",{ inv:add_item("streets:signworkshop_list","streets:sign_lava") inv:add_item("streets:signworkshop_list","streets:sign_water") inv:add_item("streets:signworkshop_list","streets:sign_construction") + -- Meta + meta:set_string("infotext","Sign workshop idle") + meta:set_string("idle","y") end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) if listname ~= "streets:signworkshop_input" then @@ -70,9 +93,10 @@ minetest.register_node(":streets:signworkshop",{ end end, on_receive_fields = function(pos, formname, fields, sender) - local inv = minetest.get_inventory({type = "node", pos = pos}) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() -- - if inv:is_empty("streets:signworkshop_input") ~= true and inv:is_empty("streets:signworkshop_select") ~= true then + if inv:is_empty("streets:signworkshop_input") ~= true and inv:is_empty("streets:signworkshop_select") ~= true and meta:get_string("idle") == "y" then local selection = inv:get_stack("streets:signworkshop_select",1):get_name() local def = minetest.registered_nodes[selection].streets.signworkshop local need = inv:get_list("streets:signworkshop_recipe") @@ -94,7 +118,19 @@ minetest.register_node(":streets:signworkshop",{ if has[3] == nil then has[3] = { name = "" } end if has[4] == nil then has[4] = { name = "" } end if need[1].name == has[1].name and need[2].name == has[2].name and need[3].name == has[3].name and need[4].name == has[4].name then - minetest.chat_send_all("yay") + meta:set_string("infotext","Sign workshop working") + meta:set_string("idle","n") + meta:set_string("formspec",table.concat(forms.active)) + -- Clear input + inv:set_list("streets:signworkshop_input",{"","","",""}) + minetest.after(def.time,function() + -- Reset infotext and meta + meta:set_string("infotext","Sign workshop idle") + meta:set_string("idle","y") + meta:set_string("formspec",table.concat(forms.inactive)) + -- Fill output + inv:add_item("streets:signworkshop_output",selection) + end) end end end -- cgit v1.2.3 From fe7607750f24d1ee8daa38d648fc39e056ef6779 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Wed, 16 Oct 2013 09:59:39 +0200 Subject: Finished code --- roadsigns/signs.lua | 16 ++++++++++++++-- roadsigns/workshop.lua | 9 +++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/roadsigns/signs.lua b/roadsigns/signs.lua index 0b01ff5..0992adf 100644 --- a/roadsigns/signs.lua +++ b/roadsigns/signs.lua @@ -21,7 +21,7 @@ minetest.register_node(":streets:sign_blank",{ streets = { signworkshop = { recipe = {"default:steel_ingot","","",""}, - time = 5 + time = 3 } } }) @@ -48,7 +48,7 @@ minetest.register_node(":streets:sign_lava",{ streets = { signworkshop = { recipe = {"streets:sign_blank","bucket:bucket_lava","",""}, - time = 7 + time = 5 } } }) @@ -72,6 +72,12 @@ minetest.register_node(":streets:sign_water",{ sunlight_propagates = true, selection_box = { type = "wallmounted" + }, + streets = { + signworkshop = { + recipe = {"streets:sign_blank","bucket:bucket_water","",""}, + time = 5 + } } }) @@ -94,5 +100,11 @@ minetest.register_node(":streets:sign_construction",{ sunlight_propagates = true, selection_box = { type = "wallmounted" + }, + streets = { + signworkshop = { + recipe = {"streets:sign_blank","default:dirt","",""}, + time = 5 + } } }) \ No newline at end of file diff --git a/roadsigns/workshop.lua b/roadsigns/workshop.lua index 5ee1af5..e5dc0d6 100644 --- a/roadsigns/workshop.lua +++ b/roadsigns/workshop.lua @@ -31,14 +31,15 @@ local forms = { "list[context;streets:signworkshop_select;6,1;1,1]", "label[5.8,2.5;Output:]", "list[context;streets:signworkshop_output;6,3;1,1]", - "list[current_player;main;2,6;8,4]", - "label[8,4;Please wait...]", + "list[current_player;main;2,6;8,4]" + -- } } minetest.register_node(":streets:signworkshop",{ description = "Sign workshop", - tiles = {}, + tiles = {"streets_signworkshop_top.png","streets_signworkshop_bottom.png","streets_signworkshop_side.png","streets_signworkshop_side.png","streets_signworkshop_side.png","streets_signworkshop_front.png"}, groups = {cracky = 1, level = 2}, + paramtype2 = "facedir", after_place_node = function(pos) minetest.get_meta(pos):set_string("formspec",table.concat(forms.inactive)) local meta = minetest.get_meta(pos) @@ -120,7 +121,7 @@ minetest.register_node(":streets:signworkshop",{ if need[1].name == has[1].name and need[2].name == has[2].name and need[3].name == has[3].name and need[4].name == has[4].name then meta:set_string("infotext","Sign workshop working") meta:set_string("idle","n") - meta:set_string("formspec",table.concat(forms.active)) + meta:set_string("formspec",table.concat(forms.active) .. "label[8,4;Please wait " .. def.time .. " seconds...]") -- Clear input inv:set_list("streets:signworkshop_input",{"","","",""}) minetest.after(def.time,function() -- cgit v1.2.3 From 5508d85d407282c391336bdcb8937a26f21e8c6d Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Wed, 16 Oct 2013 10:10:19 +0200 Subject: Lightened code --- asphaltstairs/function.lua | 56 ---------------------------------------------- asphaltstairs/init.lua | 5 ++--- concretestairs/init.lua | 2 +- emergencyphone/init.lua | 44 +++++++++++++++++------------------- labels/init.lua | 2 -- trafficlight/init.lua | 5 +---- 6 files changed, 25 insertions(+), 89 deletions(-) delete mode 100644 asphaltstairs/function.lua diff --git a/asphaltstairs/function.lua b/asphaltstairs/function.lua deleted file mode 100644 index 9879d4c..0000000 --- a/asphaltstairs/function.lua +++ /dev/null @@ -1,56 +0,0 @@ --- StreetsMod needs a special slab definition, so it needs its own register_stair_and_slab -streets.register_stair_and_slab = function(node,desc,tile,item) - minetest.register_node(":streets:"..node.."_stair",{ - description = desc.."stair", - groups = {cracky = 3}, - tiles = tile, - paramtype = "light", - paramtype2 = "facedir", - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - {-0.5, 0, 0, 0.5, 0.5, 0.5} - } - } - }) - minetest.register_node(":streets:"..node.."_slab",{ - description = desc.." slab", - groups = {cracky = 3}, - tiles = tile, - paramtype = "light", - paramtype2 = "facedir", - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - } - } - }) - minetest.register_craft({ - output = "streets:"..node.."_stair 4", - recipe = { - {"","",item}, - {"",item,item}, - {item,item,item} - } - }) - minetest.register_craft({ - output = "streets:"..node.."_stair 4", - recipe = { - {item,"",""}, - {item,item,""}, - {item,item,item} - } - }) - minetest.register_craft({ - output = "streets:"..node.."_slab 3", - recipe = { - {"","",""}, - {"","",""}, - {item,item,item} - } - }) -end \ No newline at end of file diff --git a/asphaltstairs/init.lua b/asphaltstairs/init.lua index 7c1c181..aae9e22 100644 --- a/asphaltstairs/init.lua +++ b/asphaltstairs/init.lua @@ -1,7 +1,7 @@ --[[ StreetsMod: Asphalt stairs ]] -if streets.extendedBy.moreblocks == true then +if type(register_stair_slab_panel_micro) ~= "function" then return end -- Asphalt register_stair_slab_panel_micro("streets", "asphalt", "streets:asphalt", {cracky=3}, {"streets_asphalt.png"}, "Asphalt", "asphalt", nil) minetest.register_alias("streets:asphalt_stair","stairs:stair_asphalt") @@ -224,5 +224,4 @@ if streets.extendedBy.moreblocks == true then type = "shapeless", output = "streets:asphalt_side_l", recipe = {"streets:asphalt_side_r"} - }) -end \ No newline at end of file + }) \ No newline at end of file diff --git a/concretestairs/init.lua b/concretestairs/init.lua index 4cd3efd..b3000fa 100644 --- a/concretestairs/init.lua +++ b/concretestairs/init.lua @@ -1,7 +1,7 @@ --[[ StreetsMod: Concrete stairs (compatible to circular saw) ]] -if streets.extendedBy.moreblocks == true and streets.extendedBy.prefab == false then +if type(register_stair_slab_panel_mirco) == "function" and streets.extendedBy.prefab == false then register_stair_slab_panel_micro("streets", "concrete", "streets:concrete", {cracky=2}, {"streets_concrete.png"}, "Concrete", "concrete", nil) table.insert(circular_saw.known_stairs,"streets:concrete") minetest.register_alias("stairs:stair_concrete","streets:stair_concrete") diff --git a/emergencyphone/init.lua b/emergencyphone/init.lua index 90124a8..2dc818f 100644 --- a/emergencyphone/init.lua +++ b/emergencyphone/init.lua @@ -1,27 +1,25 @@ --[[ StreetsMod: Emergency Phone ]] -if streets.extendedBy.wool == true then - minetest.register_node(":streets:emergencyphone",{ - description = "Emergency Phone", - tiles = {"streets_sos_top.png","streets_sos_bottom.png","streets_sos_side.png","streets_sos_side.png","streets_sos_side.png","streets_sos_front.png"}, - groups = {cracky = 3}, - paramtype2 = "facedir", - light_source = 5, - on_rightclick = function(pos,node,clicker) - if clicker:is_player() and clicker:get_hp() < 6 then - clicker:set_hp(6) - minetest.log("action",clicker:get_player_name() .. " healed by emergency phone at pos (" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")") - end +minetest.register_node(":streets:emergencyphone",{ + description = "Emergency Phone", + tiles = {"streets_sos_top.png","streets_sos_bottom.png","streets_sos_side.png","streets_sos_side.png","streets_sos_side.png","streets_sos_front.png"}, + groups = {cracky = 3}, + paramtype2 = "facedir", + light_source = 5, + on_rightclick = function(pos,node,clicker) + if clicker:is_player() and clicker:get_hp() < 6 then + clicker:set_hp(6) + minetest.log("action",clicker:get_player_name() .. " healed by emergency phone at pos (" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")") end - }) - minetest.register_alias("streets:emergency_phone","streets:emergencyphone") - minetest.register_craft({ - output = "streets:emergencyphone", - recipe = { - {"wool:orange","default:torch","wool:orange"}, - {"wool:orange","default:apple","wool:orange"}, - {"default:steel_ingot","default:diamondblock","default:steel_ingot"} - } - }) -end \ No newline at end of file + end + }) + minetest.register_alias("streets:emergency_phone","streets:emergencyphone") +minetest.register_craft({ + output = "streets:emergencyphone", + recipe = { + {"wool:orange","default:torch","wool:orange"}, + {"wool:orange","default:apple","wool:orange"}, + {"default:steel_ingot","default:diamondblock","default:steel_ingot"} + } +}) \ No newline at end of file diff --git a/labels/init.lua b/labels/init.lua index 5e59a3c..d53b7af 100644 --- a/labels/init.lua +++ b/labels/init.lua @@ -1,8 +1,6 @@ --[[ StreetsMod: All kinds of asphalt with labels ]] -if streets.extendedBy.wool == false then return end --- minetest.register_node(":streets:asphalt_sideline",{ description = "Asphalt with sideline", groups = {cracky=3}, diff --git a/trafficlight/init.lua b/trafficlight/init.lua index 1d3049d..44e463a 100644 --- a/trafficlight/init.lua +++ b/trafficlight/init.lua @@ -1,7 +1,6 @@ --[[ StreetsMod: inDev Trafficlights ]] -if streets.extendedBy.mesecons and streets.extendedBy.digilines then minetest.register_node(":streets:trafficlight_bottom",{ description = "Cheater", groups = {not_in_creative_inventory = 1}, @@ -224,6 +223,4 @@ minetest.register_node(":streets:trafficlight_top_warn",{ }, pointable = false, light_source = 6, -}) - -end \ No newline at end of file +}) \ No newline at end of file -- cgit v1.2.3 From 9818b48e43797ce8bcc1aab2e8d25bf3a87eef55 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Wed, 16 Oct 2013 10:21:20 +0200 Subject: Changed crafts wool->dye --- labels/init.lua | 58 ++++++++++++++++++++++++------------------------- roadworks/init.lua | 64 +++++++++++++++++++++++++++--------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/labels/init.lua b/labels/init.lua index d53b7af..c627b64 100644 --- a/labels/init.lua +++ b/labels/init.lua @@ -11,9 +11,9 @@ minetest.register_alias("streets:asphalt_side","streets:asphalt_sideline") minetest.register_craft({ output = "streets:asphalt_side 6", recipe = { - {"wool:white","streets:asphalt","streets:asphalt"}, - {"wool:white","streets:asphalt","streets:asphalt"}, - {"wool:white","streets:asphalt","streets:asphalt"} + {"dye:white","streets:asphalt","streets:asphalt"}, + {"dye:white","streets:asphalt","streets:asphalt"}, + {"dye:white","streets:asphalt","streets:asphalt"} } }) @@ -27,9 +27,9 @@ minetest.register_alias("streets:asphalt_middle","streets:asphalt_solid_line") minetest.register_craft({ output = "streets:asphalt_solid_line 6", recipe = { - {"streets:asphalt","wool:white","streets:asphalt"}, - {"streets:asphalt","wool:white","streets:asphalt"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","streets:asphalt"}, + {"streets:asphalt","dye:white","streets:asphalt"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -43,9 +43,9 @@ minetest.register_alias("streets:asphalt_middle_dashed","streets:asphalt_dashed_ minetest.register_craft({ output = "streets:asphalt_dashed_line 6", recipe = { - {"streets:asphalt","wool:white","streets:asphalt"}, + {"streets:asphalt","dye:white","streets:asphalt"}, {"streets:asphalt","streets:asphalt","streets:asphalt"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -59,9 +59,9 @@ minetest.register_node(":streets:asphalt_outer_edge",{ minetest.register_craft({ output = "streets:asphalt_outer_edge 4", recipe = { - {"wool:white","wool:white","wool:white"}, - {"wool:white","streets:asphalt","streets:asphalt"}, - {"wool:white","streets:asphalt","streets:asphalt"} + {"dye:white","dye:white","dye:white"}, + {"dye:white","streets:asphalt","streets:asphalt"}, + {"dye:white","streets:asphalt","streets:asphalt"} } }) @@ -75,9 +75,9 @@ minetest.register_node(":streets:asphalt_parking",{ minetest.register_craft({ output = "streets:asphalt_outer_edge 4", recipe = { - {"streets:asphalt","wool:white","wool:white"}, - {"streets:asphalt","wool:white","wool:white"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","dye:white"}, + {"streets:asphalt","dye:white","dye:white"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -92,8 +92,8 @@ minetest.register_craft({ output = "streets:asphalt_arrow_straight 4", recipe = { {"streets:asphalt","streets:asphalt","streets:asphalt"}, - {"streets:asphalt","wool:white","streets:asphalt"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","streets:asphalt"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -108,8 +108,8 @@ minetest.register_craft({ output = "streets:asphalt_arrow_left 4", recipe = { {"streets:asphalt","streets:asphalt","streets:asphalt"}, - {"wool:white","wool:white","streets:asphalt"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"dye:white","dye:white","streets:asphalt"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -124,8 +124,8 @@ minetest.register_craft({ output = "streets:asphalt_arrow_right 4", recipe = { {"streets:asphalt","streets:asphalt","streets:asphalt"}, - {"streets:asphalt","wool:white","wool:white"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","dye:white"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -139,9 +139,9 @@ minetest.register_node(":streets:asphalt_arrow_straight_left",{ minetest.register_craft({ output = "streets:asphalt_arrow_straight_left 4", recipe = { - {"streets:asphalt","wool:white","streets:asphalt"}, - {"wool:white","wool:white","streets:asphalt"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","streets:asphalt"}, + {"dye:white","dye:white","streets:asphalt"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -155,9 +155,9 @@ minetest.register_node(":streets:asphalt_arrow_straight_right",{ minetest.register_craft({ output = "streets:asphalt_arrow_straight_right 4", recipe = { - {"streets:asphalt","wool:white","streets:asphalt"}, - {"streets:asphalt","wool:white","wool:white"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","streets:asphalt"}, + {"streets:asphalt","dye:white","dye:white"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) @@ -171,8 +171,8 @@ minetest.register_node(":streets:asphalt_arrow_alldirs",{ minetest.register_craft({ output = "streets:asphalt_arrow_alldirs 4", recipe = { - {"streets:asphalt","wool:white","streets:asphalt"}, - {"wool:white","wool:white","wool:white"}, - {"streets:asphalt","wool:white","streets:asphalt"} + {"streets:asphalt","dye:white","streets:asphalt"}, + {"dye:white","dye:white","dye:white"}, + {"streets:asphalt","dye:white","streets:asphalt"} } }) \ No newline at end of file diff --git a/roadworks/init.lua b/roadworks/init.lua index cbbb8b7..6df2e13 100644 --- a/roadworks/init.lua +++ b/roadworks/init.lua @@ -247,63 +247,63 @@ minetest.register_node(":streets:rw_sideline",{ minetest.register_craft({ output = "streets:rw_asphalt_solid 3", recipe = { - {"","wool:yellow",""}, - {"","wool:yellow",""}, - {"","wool:yellow",""} + {"","dye:yellow",""}, + {"","dye:yellow",""}, + {"","dye:yellow",""} } }) minetest.register_craft({ output = "streets:rw_sideline 3", recipe = { - {"wool:yellow","wool:yellow",""}, - {"wool:yellow","wool:yellow",""}, - {"wool:yellow","wool:yellow",""} + {"dye:yellow","dye:yellow",""}, + {"dye:yellow","dye:yellow",""}, + {"dye:yellow","dye:yellow",""} } }) minetest.register_craft({ output = "streets:rw_asphalt_dashed 3", recipe = { - {"","wool:yellow",""}, + {"","dye:yellow",""}, {"","",""}, - {"","wool:yellow",""} + {"","dye:yellow",""} } }) minetest.register_craft({ output = "streets:rw_cross 3", recipe = { - {"wool:yellow","","wool:yellow"}, - {"","wool:yellow",""}, - {"wool:yellow","","wool:yellow"} + {"dye:yellow","","dye:yellow"}, + {"","dye:yellow",""}, + {"dye:yellow","","dye:yellow"} } }) minetest.register_craft({ output = "streets:rw_outer_edge 3", recipe = { - {"wool:yellow","wool:yellow","wool:yellow"}, - {"wool:yellow","",""}, - {"wool:yellow","",""} + {"dye:yellow","dye:yellow","dye:yellow"}, + {"dye:yellow","",""}, + {"dye:yellow","",""} } }) minetest.register_craft({ output = "streets:rw_parking 3", recipe = { - {"","wool:yellow","wool:yellow"}, - {"","wool:yellow","wool:yellow"}, - {"","wool:yellow",""} + {"","dye:yellow","dye:yellow"}, + {"","dye:yellow","dye:yellow"}, + {"","dye:yellow",""} } }) minetest.register_craft({ output = "streets:rw_alldirs 3", recipe = { - {"","wool:yellow",""}, - {"wool:yellow","wool:yellow","wool:yellow"}, - {"","wool:yellow",""} + {"","dye:yellow",""}, + {"dye:yellow","dye:yellow","dye:yellow"}, + {"","dye:yellow",""} } }) @@ -311,8 +311,8 @@ minetest.register_craft({ output = "streets:rw_left 3", recipe = { {"","",""}, - {"wool:yellow","wool:yellow",""}, - {"","wool:yellow",""} + {"dye:yellow","dye:yellow",""}, + {"","dye:yellow",""} } }) @@ -320,26 +320,26 @@ minetest.register_craft({ output = "streets:rw_right 3", recipe = { {"","",""}, - {"","wool:yellow","wool:yellow"}, - {"","wool:yellow",""} + {"","dye:yellow","dye:yellow"}, + {"","dye:yellow",""} } }) minetest.register_craft({ output = "streets:rw_straight_left 3", recipe = { - {"","wool:yellow",""}, - {"wool:yellow","wool:yellow",""}, - {"","wool:yellow",""} + {"","dye:yellow",""}, + {"dye:yellow","dye:yellow",""}, + {"","dye:yellow",""} } }) minetest.register_craft({ output = "streets:rw_straight_right 3", recipe = { - {"","wool:yellow",""}, - {"","wool:yellow","wool:yellow"}, - {"","wool:yellow",""} + {"","dye:yellow",""}, + {"","dye:yellow","dye:yellow"}, + {"","dye:yellow",""} } }) @@ -347,7 +347,7 @@ minetest.register_craft({ output = "streets:rw_straight 3", recipe = { {"","",""}, - {"","wool:yellow",""}, - {"","wool:yellow",""} + {"","dye:yellow",""}, + {"","dye:yellow",""} } }) \ No newline at end of file -- cgit v1.2.3 From f4a043769c508777ea38192d12ad37ab8cb92c20 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Wed, 16 Oct 2013 19:15:41 +0200 Subject: Added textures for signworkshop --- roadsigns/textures/streets_signworkshop_bottom.png | Bin 0 -> 1942 bytes roadsigns/textures/streets_signworkshop_front.png | Bin 0 -> 2138 bytes roadsigns/textures/streets_signworkshop_side.png | Bin 0 -> 1888 bytes roadsigns/textures/streets_signworkshop_top.png | Bin 0 -> 2026 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 roadsigns/textures/streets_signworkshop_bottom.png create mode 100644 roadsigns/textures/streets_signworkshop_front.png create mode 100644 roadsigns/textures/streets_signworkshop_side.png create mode 100644 roadsigns/textures/streets_signworkshop_top.png diff --git a/roadsigns/textures/streets_signworkshop_bottom.png b/roadsigns/textures/streets_signworkshop_bottom.png new file mode 100644 index 0000000..022bb2c Binary files /dev/null and b/roadsigns/textures/streets_signworkshop_bottom.png differ diff --git a/roadsigns/textures/streets_signworkshop_front.png b/roadsigns/textures/streets_signworkshop_front.png new file mode 100644 index 0000000..83317b1 Binary files /dev/null and b/roadsigns/textures/streets_signworkshop_front.png differ diff --git a/roadsigns/textures/streets_signworkshop_side.png b/roadsigns/textures/streets_signworkshop_side.png new file mode 100644 index 0000000..509a3e3 Binary files /dev/null and b/roadsigns/textures/streets_signworkshop_side.png differ diff --git a/roadsigns/textures/streets_signworkshop_top.png b/roadsigns/textures/streets_signworkshop_top.png new file mode 100644 index 0000000..07f4f06 Binary files /dev/null and b/roadsigns/textures/streets_signworkshop_top.png differ -- cgit v1.2.3 From 114d1b173cd318e1a80d276b67b8d70362547a1b Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sat, 19 Oct 2013 14:49:06 +0200 Subject: Added drop = '' to some nodes --- roadsigns/pole.lua | 3 ++- streetlamps/init.lua | 4 ++++ trafficlight/init.lua | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/roadsigns/pole.lua b/roadsigns/pole.lua index 8f2f7ba..478afb9 100644 --- a/roadsigns/pole.lua +++ b/roadsigns/pole.lua @@ -48,7 +48,8 @@ minetest.register_node(":streets:pole_top",{ paramtype = "light", paramtype2 = "facedir", drawtype = "nodebox", - can_dig = function(pos,player) + drop = "", + can_dig = function() return false end, node_box = { diff --git a/streetlamps/init.lua b/streetlamps/init.lua index d813de9..ac08cde 100644 --- a/streetlamps/init.lua +++ b/streetlamps/init.lua @@ -39,6 +39,7 @@ minetest.register_node(":streets:streetlamp_basic_controller",{ end }) minetest.register_node(":streets:streetlamp_basic_bottom",{ + drop = "", description = "Street lamp", tiles = {"streets_lamps_basic_bottom.png"}, groups = {cracky = 1}, @@ -59,6 +60,7 @@ minetest.register_node(":streets:streetlamp_basic_bottom",{ end }) minetest.register_node(":streets:streetlamp_basic_middle",{ + drop = "", description = "U cheater U", groups = {cracky = 1, not_in_creative_inventory = 1}, tiles = {"streets_lamps_basic_middle.png"}, @@ -73,6 +75,7 @@ minetest.register_node(":streets:streetlamp_basic_middle",{ } }) minetest.register_node(":streets:streetlamp_basic_top_off",{ + drop = "", description = "U cheater U", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", @@ -87,6 +90,7 @@ minetest.register_node(":streets:streetlamp_basic_top_off",{ } }) minetest.register_node(":streets:streetlamp_basic_top_on",{ + drop = "", description = "U cheater U", groups = {cracky = 1, not_in_creative_inventory = 1}, tiles = {"streets_lamps_basic_top_top.png","streets_lamps_basic_top_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png"}, diff --git a/trafficlight/init.lua b/trafficlight/init.lua index 44e463a..48d7a62 100644 --- a/trafficlight/init.lua +++ b/trafficlight/init.lua @@ -3,6 +3,7 @@ ]] minetest.register_node(":streets:trafficlight_bottom",{ description = "Cheater", + drop = "", groups = {not_in_creative_inventory = 1}, paramtype = "light", paramtype2 = "facedir", @@ -20,6 +21,7 @@ minetest.register_node(":streets:trafficlight_bottom",{ minetest.register_node(":streets:trafficlight_middle",{ description = "Cheater!", + drop = "", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", drawtype = "nodebox", @@ -117,6 +119,7 @@ minetest.register_node(":streets:trafficlight_controller",{ minetest.register_node(":streets:trafficlight_top_off",{ description = "U cheater U", + drop = "", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", paramtype2 = "facedir", @@ -134,6 +137,7 @@ minetest.register_node(":streets:trafficlight_top_off",{ minetest.register_node(":streets:trafficlight_top_red",{ description = "U cheater U", + drop = "", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", paramtype2 = "facedir", @@ -152,6 +156,7 @@ minetest.register_node(":streets:trafficlight_top_red",{ minetest.register_node(":streets:trafficlight_top_yellow",{ description = "U cheater U", + drop = "", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", paramtype2 = "facedir", @@ -170,6 +175,7 @@ minetest.register_node(":streets:trafficlight_top_yellow",{ minetest.register_node(":streets:trafficlight_top_redyellow",{ description = "U cheater U", + drop = "", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", paramtype2 = "facedir", @@ -188,6 +194,7 @@ minetest.register_node(":streets:trafficlight_top_redyellow",{ minetest.register_node(":streets:trafficlight_top_green",{ description = "U cheater U", + drop = "", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", paramtype2 = "facedir", @@ -206,6 +213,7 @@ minetest.register_node(":streets:trafficlight_top_green",{ minetest.register_node(":streets:trafficlight_top_warn",{ description = "U cheater U", + drop = "", groups = {cracky = 1, not_in_creative_inventory = 1}, paramtype = "light", paramtype2 = "facedir", -- cgit v1.2.3 From f1ca0097c44914aa6c5197ce0e994ed4daeb98d1 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 24 Nov 2013 13:22:15 +0100 Subject: misc --- asphaltstairs/init.lua | 18 +++++++++--------- screenshot.png | Bin 0 -> 1085475 bytes 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 screenshot.png diff --git a/asphaltstairs/init.lua b/asphaltstairs/init.lua index aae9e22..a7ec32b 100644 --- a/asphaltstairs/init.lua +++ b/asphaltstairs/init.lua @@ -25,7 +25,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_solid_line_stair", + output = "streets:asphalt_solid_line_stair 6", recipe = { {"","","streets:asphalt_solid_line"}, {"","streets:asphalt_solid_line","streets:asphalt_solid_line"}, @@ -33,7 +33,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_solid_line_stair", + output = "streets:asphalt_solid_line_stair 6", recipe = { {"streets:asphalt_solid_line","",""}, {"streets:asphalt_solid_line","streets:asphalt_solid_line",""}, @@ -56,7 +56,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_solid_line_slab", + output = "streets:asphalt_solid_line_slab 3", recipe = { {"","",""}, {"","",""}, @@ -82,7 +82,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_dashed_line_stair", + output = "streets:asphalt_dashed_line_stair 6", recipe = { {"","","streets:asphalt_dashed_line"}, {"","streets:asphalt_dashed_line","streets:asphalt_dashed_line"}, @@ -90,7 +90,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_dashed_line_stair", + output = "streets:asphalt_dashed_line_stair 6", recipe = { {"streets:asphalt_dashed_line","",""}, {"streets:asphalt_dashed_line","streets:asphalt_dashed_line",""}, @@ -113,7 +113,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_dashed_line_slab", + output = "streets:asphalt_dashed_line_slab 3", recipe = { {"","",""}, {"","",""}, @@ -153,7 +153,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_side_stair_l", + output = "streets:asphalt_side_stair_l 6", recipe = { {"","","streets:asphalt_side"}, {"","streets:asphalt_side","streets:asphalt_side"}, @@ -161,7 +161,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_side_stair_l", + output = "streets:asphalt_side_stair_l 6", recipe = { {"streets:asphalt_side","",""}, {"streets:asphalt_side","streets:asphalt_side",""}, @@ -208,7 +208,7 @@ if type(register_stair_slab_panel_micro) ~= "function" then return end } }) minetest.register_craft({ - output = "streets:asphalt_side_slab_l", + output = "streets:asphalt_side_slab_l 3", recipe = { {"","",""}, {"","",""}, diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..501435e Binary files /dev/null and b/screenshot.png differ -- cgit v1.2.3 From eeb04f5ad694b577134caa6111fb307a7933533b Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 24 Nov 2013 13:34:27 +0100 Subject: Finished StreetLamp --- streetlamps/init.lua | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/streetlamps/init.lua b/streetlamps/init.lua index ac08cde..49dea32 100644 --- a/streetlamps/init.lua +++ b/streetlamps/init.lua @@ -1,7 +1,7 @@ --[[ StreetsMod: Streetlamps ]] -minetest.register_node(":streets:streetlamp_basic_controller",{ +--[[minetest.register_node(":streets:streetlamp_basic_controller",{ description = "Trafficlight", tiles = {"streets_lampcontroller_top.png","streets_lampcontroller_bottom.png","streets_lampcontroller_sides.png"}, groups = {cracky = 1, not_in_creative_inventory = 1}, @@ -37,7 +37,8 @@ minetest.register_node(":streets:streetlamp_basic_controller",{ minetest.remove_node({x = pos.x, y = pos.y + 4, z = pos.z}) minetest.chat_send_all("!!!") end -}) +})]] + minetest.register_node(":streets:streetlamp_basic_bottom",{ drop = "", description = "Street lamp", @@ -55,8 +56,8 @@ minetest.register_node(":streets:streetlamp_basic_bottom",{ pointable = false, after_place_node = function(pos,placer,itemstack) minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z},{name = "streets:streetlamp_basic_middle"}) - minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_off"}) - minetest.set_node({x = pos.x, y = pos.y - 2, z = pos.z},{name = "streets:streetlamp_basic_controller"}) + minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},{name = "streets:streetlamp_basic_top_on"}) + -- minetest.set_node({x = pos.x, y = pos.y - 2, z = pos.z},{name = "streets:streetlamp_basic_controller"}) end }) minetest.register_node(":streets:streetlamp_basic_middle",{ @@ -74,7 +75,7 @@ minetest.register_node(":streets:streetlamp_basic_middle",{ } } }) -minetest.register_node(":streets:streetlamp_basic_top_off",{ +--[[minetest.register_node(":streets:streetlamp_basic_top_off",{ drop = "", description = "U cheater U", groups = {cracky = 1, not_in_creative_inventory = 1}, @@ -88,7 +89,7 @@ minetest.register_node(":streets:streetlamp_basic_top_off",{ {-0.3,-0.4,-0.3,0.3,0.5,0.3} } } -}) +})]] minetest.register_node(":streets:streetlamp_basic_top_on",{ drop = "", description = "U cheater U", @@ -96,7 +97,6 @@ minetest.register_node(":streets:streetlamp_basic_top_on",{ tiles = {"streets_lamps_basic_top_top.png","streets_lamps_basic_top_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png","streets_lamps_basic_top.png"}, paramtype = "light", drawtype = "nodebox", - pointable = false, light_source = 10, node_box = { type = "fixed", @@ -104,5 +104,15 @@ minetest.register_node(":streets:streetlamp_basic_top_on",{ {-0.1,-0.5,-0.1,0.1,-0.4,0.1}, {-0.3,-0.4,-0.3,0.3,0.5,0.3} } - } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.3,0.5,-0.3,0.3,-2.5,0.3}, + } + }, + after_dig_node = function(pos) + minetest.remove_node({x = pos.x, y = pos.y - 1, z = pos.z}) + minetest.remove_node({x = pos.x, y = pos.y - 2, z = pos.z}) + end }) \ No newline at end of file -- cgit v1.2.3 From b5b9527658e7388bb17091d7269ffdf0ecae66b1 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 24 Nov 2013 13:39:08 +0100 Subject: recipe --- trafficlight/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/trafficlight/init.lua b/trafficlight/init.lua index 48d7a62..b3c8835 100644 --- a/trafficlight/init.lua +++ b/trafficlight/init.lua @@ -231,4 +231,13 @@ minetest.register_node(":streets:trafficlight_top_warn",{ }, pointable = false, light_source = 6, +}) + +minetest.register_craft({ + output = "streets:trafficlight_controller", + recipe = { + {"dye:red","",""}, + {"dye:yellow","",""}, + {"dye:green","",""} + } }) \ No newline at end of file -- cgit v1.2.3 From d4e5fa33336b9ed72e70d61a32b916cdf61919a2 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 24 Nov 2013 13:40:15 +0100 Subject: recipe --- streetlamps/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/streetlamps/init.lua b/streetlamps/init.lua index 49dea32..597dd54 100644 --- a/streetlamps/init.lua +++ b/streetlamps/init.lua @@ -115,4 +115,13 @@ minetest.register_node(":streets:streetlamp_basic_top_on",{ minetest.remove_node({x = pos.x, y = pos.y - 1, z = pos.z}) minetest.remove_node({x = pos.x, y = pos.y - 2, z = pos.z}) end +}) + +minetest.register_craft({ + output = "streets:streetlamp_basic_bottom", + recipe = { + {"","default:torch",""}, + {"","default:stick",""}, + {"","default:stick",""} + } }) \ No newline at end of file -- cgit v1.2.3 From fb2abe876b66948e6966ea496d0b93f61fe3cb89 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 24 Nov 2013 18:58:09 +0100 Subject: desc --- description.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 description.txt diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..57612b0 --- /dev/null +++ b/description.txt @@ -0,0 +1 @@ +With the StreetsMod, you can build your own realistic streets with arrows, lines, manholes and many more cool stuff. You don't need any additional mod, but it's recommended to have stairs (default), wool (default) and bucket (default) installed. It's easy for you to enable/disable certain parts of this mod because it's organised as a modpack, which you can configure in Minetest's Main Menu -> Configure. \ No newline at end of file -- cgit v1.2.3 From a88b2dcfd60e86205d562b8ba9c402f9345e5ee9 Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 24 Nov 2013 19:52:14 +0100 Subject: crafts and inv images --- roadsigns/workshop.lua | 9 +++++++++ streetlamps/init.lua | 1 + streetlamps/textures/streets_lamps_basi_inv.png | Bin 0 -> 4210 bytes trafficlight/init.lua | 1 + trafficlight/textures/streets_trafficlight_inv.png | Bin 0 -> 2772 bytes 5 files changed, 11 insertions(+) create mode 100644 streetlamps/textures/streets_lamps_basi_inv.png create mode 100644 trafficlight/textures/streets_trafficlight_inv.png diff --git a/roadsigns/workshop.lua b/roadsigns/workshop.lua index e5dc0d6..9c68fb7 100644 --- a/roadsigns/workshop.lua +++ b/roadsigns/workshop.lua @@ -135,4 +135,13 @@ minetest.register_node(":streets:signworkshop",{ end end end +}) + +minetest.register_craft({ + output = "streets:signworkshop", + recipe = { + {"default:steel_ingot","default:glass","default:steel_ingot"}, + {"default:steel_ingot","default:diamond","default:steel_ingot"}, + {"default:cobble","default:cobble","default:cobble"} + } }) \ No newline at end of file diff --git a/streetlamps/init.lua b/streetlamps/init.lua index 597dd54..a139104 100644 --- a/streetlamps/init.lua +++ b/streetlamps/init.lua @@ -43,6 +43,7 @@ minetest.register_node(":streets:streetlamp_basic_bottom",{ drop = "", description = "Street lamp", tiles = {"streets_lamps_basic_bottom.png"}, + inventory_image = "streets_lamps_basi_inv.png", groups = {cracky = 1}, paramtype = "light", drawtype = "nodebox", diff --git a/streetlamps/textures/streets_lamps_basi_inv.png b/streetlamps/textures/streets_lamps_basi_inv.png new file mode 100644 index 0000000..5c31236 Binary files /dev/null and b/streetlamps/textures/streets_lamps_basi_inv.png differ diff --git a/trafficlight/init.lua b/trafficlight/init.lua index b3c8835..68a818e 100644 --- a/trafficlight/init.lua +++ b/trafficlight/init.lua @@ -38,6 +38,7 @@ minetest.register_node(":streets:trafficlight_middle",{ minetest.register_node(":streets:trafficlight_controller",{ description = "Trafficlight", + inventory_image = "streets_trafficlight_inv.png", tiles = {"streets_lampcontroller_top.png","streets_lampcontroller_bottom.png","streets_lampcontroller_sides.png"}, groups = {cracky = 1}, drawtype = "nodebox", diff --git a/trafficlight/textures/streets_trafficlight_inv.png b/trafficlight/textures/streets_trafficlight_inv.png new file mode 100644 index 0000000..fb76b72 Binary files /dev/null and b/trafficlight/textures/streets_trafficlight_inv.png differ -- cgit v1.2.3 From 4fab78d25b26bb9111aa5d5da0511c8395f0c5ca Mon Sep 17 00:00:00 2001 From: webdesigner97 Date: Sun, 24 Nov 2013 20:09:24 +0100 Subject: misc and screenshot --- screenshot.png | Bin 1085475 -> 818904 bytes trafficlight/init.lua | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/screenshot.png b/screenshot.png index 501435e..d9bf232 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/trafficlight/init.lua b/trafficlight/init.lua index 68a818e..3eaa43a 100644 --- a/trafficlight/init.lua +++ b/trafficlight/init.lua @@ -54,7 +54,7 @@ minetest.register_node(":streets:trafficlight_controller",{ type = "fixed", fixed = { {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - {-0.5,1.5,-0.5,0.5,4.5,0.5} + {-0.3,1.5,-0.3,0.3,4.5,0.3} } }, on_receive_fields = function(pos, formname, fields, sender) -- cgit v1.2.3