From 86cf33201d6de4de08353bb0271c540c1bd56bbd Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 3 Aug 2014 20:46:05 -0400 Subject: [PATCH] add green and yellow wall signs (intended for traffic signage or similar) Rework related textures. Use steel ingots and green, white, black, yellow dyes to craft. Can also use "sheet metal" from my fork of Zeg9's steel mod. --- signs_lib/init.lua | 128 +++++++++++++++++++-- signs_lib/textures/signs_back_metal.png | Bin 127 -> 118 bytes signs_lib/textures/signs_green_bottom.png | Bin 122 -> 95 bytes signs_lib/textures/signs_green_front.png | Bin 127 -> 118 bytes signs_lib/textures/signs_green_inv.png | Bin 118 -> 110 bytes signs_lib/textures/signs_green_sides.png | Bin 93 -> 89 bytes signs_lib/textures/signs_green_top.png | Bin 95 -> 95 bytes signs_lib/textures/signs_yellow_bottom.png | Bin 117 -> 98 bytes signs_lib/textures/signs_yellow_front.png | Bin 133 -> 120 bytes signs_lib/textures/signs_yellow_inv.png | Bin 121 -> 111 bytes signs_lib/textures/signs_yellow_sides.png | Bin 96 -> 94 bytes signs_lib/textures/signs_yellow_top.png | Bin 100 -> 95 bytes 12 files changed, 120 insertions(+), 8 deletions(-) diff --git a/signs_lib/init.lua b/signs_lib/init.lua index 87140b38..c8db6134 100644 --- a/signs_lib/init.lua +++ b/signs_lib/init.lua @@ -484,13 +484,16 @@ signs_lib.update_sign = function(pos, fields) -- if there is no entity local sign_info - if minetest.get_node(pos).name == "signs:sign_yard" then + local signnode = minetest.get_node(pos) + if signnode.name == "signs:sign_yard" then sign_info = signs_lib.yard_sign_model.textpos[minetest.get_node(pos).param2 + 1] - elseif minetest.get_node(pos).name == "signs:sign_hanging" then + elseif signnode.name == "signs:sign_hanging" then sign_info = signs_lib.hanging_sign_model.textpos[minetest.get_node(pos).param2 + 1] - elseif minetest.get_node(pos).name == "default:sign_wall" then + elseif signnode.name == "default:sign_wall" + or signnode.name == "signs:sign_wall_green" + or signnode.name == "signs:sign_wall_yellow" then sign_info = signs_lib.wall_sign_model.textpos[minetest.get_node(pos).param2 + 1] - else --if minetest.get_node(pos).name == "signs:sign_post" then + else -- ...it must be a sign on a fence post. sign_info = signs_lib.sign_post_model.textpos[minetest.get_node(pos).param2 + 1] end if sign_info == nil then @@ -553,19 +556,22 @@ function signs_lib.determine_sign_type(itemstack, placer, pointed_thing) local sign_info local pt_name = minetest.get_node(under).name print(dump(pt_name)) + local signname = itemstack:get_name() - if fences_with_sign[pt_name] then + if fences_with_sign[pt_name] and signname == "default:sign_wall" then minetest.add_node(under, {name = fences_with_sign[pt_name], param2 = fdir}) sign_info = signs_lib.sign_post_model.textpos[fdir + 1] - elseif wdir == 0 then + elseif wdir == 0 and signname == "default:sign_wall" then minetest.add_node(above, {name = "signs:sign_hanging", param2 = fdir}) sign_info = signs_lib.hanging_sign_model.textpos[fdir + 1] - elseif wdir == 1 then + + elseif wdir == 1 and signname == "default:sign_wall" then minetest.add_node(above, {name = "signs:sign_yard", param2 = fdir}) sign_info = signs_lib.yard_sign_model.textpos[fdir + 1] + else - minetest.add_node(above, {name = "default:sign_wall", param2 = fdir}) + minetest.add_node(above, {name = signname, param2 = fdir}) sign_info = signs_lib.wall_sign_model.textpos[fdir + 1] end @@ -714,6 +720,78 @@ minetest.register_node(":signs:sign_post", { }, }) +minetest.register_node(":signs:sign_wall_green", { + description = S("Sign (green, metal)"), + inventory_image = "signs_green_inv.png", + wield_image = "signs_green_inv.png", + node_placement_prediction = "", + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = signs_lib.wall_sign_model.nodebox, + tiles = { + "signs_green_top.png", + "signs_green_bottom.png", + "signs_green_sides.png", + "signs_green_sides.png", + "signs_back_metal.png", + "signs_green_front.png" + }, + groups = sign_groups, + on_place = function(itemstack, placer, pointed_thing) + return signs_lib.determine_sign_type(itemstack, placer, pointed_thing) + end, + on_construct = function(pos) + signs_lib.construct_sign(pos) + end, + on_destruct = function(pos) + signs_lib.destruct_sign(pos) + end, + on_receive_fields = function(pos, formname, fields, sender) + signs_lib.receive_fields(pos, formname, fields, sender) + end, + on_punch = function(pos, node, puncher) + signs_lib.update_sign(pos) + end, +}) + +minetest.register_node(":signs:sign_wall_yellow", { + description = S("Sign (yellow, metal)"), + inventory_image = "signs_yellow_inv.png", + wield_image = "signs_yellow_inv.png", + node_placement_prediction = "", + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = signs_lib.wall_sign_model.nodebox, + tiles = { + "signs_yellow_top.png", + "signs_yellow_bottom.png", + "signs_yellow_sides.png", + "signs_yellow_sides.png", + "signs_back_metal.png", + "signs_yellow_front.png" + }, + groups = sign_groups, + on_place = function(itemstack, placer, pointed_thing) + return signs_lib.determine_sign_type(itemstack, placer, pointed_thing) + end, + on_construct = function(pos) + signs_lib.construct_sign(pos) + end, + on_destruct = function(pos) + signs_lib.destruct_sign(pos) + end, + on_receive_fields = function(pos, formname, fields, sender) + signs_lib.receive_fields(pos, formname, fields, sender) + end, + on_punch = function(pos, node, puncher) + signs_lib.update_sign(pos) + end, +}) + local signs_text_on_activate signs_text_on_activate = function(self) @@ -811,6 +889,40 @@ minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post") signs_lib.register_fence_with_sign("default:fence_wood", "signs:sign_post") +-- craft recipes for the green and yellow signs + +minetest.register_craft( { + output = "signs:sign_wall_green 4", + recipe = { + { "dye:dark_green", "dye:white", "dye:dark_green" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_green 2", + recipe = { + { "dye:dark_green", "dye:white", "dye:dark_green" }, + { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_yellow 4", + recipe = { + { "dye:yellow", "dye:black", "dye:yellow" }, + { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" } + }, +}) + +minetest.register_craft( { + output = "signs:sign_wall_yellow 2", + recipe = { + { "dye:yellow", "dye:black", "dye:yellow" }, + { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + }, +}) + if minetest.setting_get("log_mods") then minetest.log("action", S("signs loaded")) end diff --git a/signs_lib/textures/signs_back_metal.png b/signs_lib/textures/signs_back_metal.png index e11736e220ecb0bf35296dbf4c86573005f6969f..f7f1973b3ce2b7a860753cd09ddf3e0831957043 100644 GIT binary patch delta 37 rcmb;~o1nsIJ5kk4+Qi>`%XJ2Z|MFbnS$kt*8Gyjk)z4*}Q$iB}--!#E delta 46 zcmXS`pP<6%Hc{0~CF1g=Wy{o`9g B5m^8L diff --git a/signs_lib/textures/signs_green_bottom.png b/signs_lib/textures/signs_green_bottom.png index 3b7ea5553d84713a81a2506c09003555cdbe0cbb..5aa85a9e6e356e906cea2a16ed4029f75d7cd808 100644 GIT binary patch delta 64 zcmb=5pP*u`=IP=XqH#W1M_W5tfz==?B4Wal#?D3;gH?$k%v()1+_-sj;u1!NymF?e TKU^!l8Gyjk)z4*}Q$iB}=y?}h delta 91 zcmV-h0Hpt4dXOYmK}keGR4C75WT;>u2{2k%SdgTFiGf5g95gV(gO!ni5iVNKQP04@ x(D^n(BZ002ovPDHLkV1m4OC0YOg diff --git a/signs_lib/textures/signs_green_front.png b/signs_lib/textures/signs_green_front.png index c35d813a27d186f6a2d5da4695da8eb696c939f8..e2932a14b11781b185a625b236c31d5bef4d9556 100644 GIT binary patch delta 45 zcmb;~o1nsIJ5g0nIZ2sM?${9qw^_?oZ)Gzu{OsWT<#>Ag3kD$YboFyt=akR{0Bds) AJOBUy delta 54 zcmXS`pP<6%Hc?eiXVy^@o1hNHo(SRj?d|N$%!m7At=SIoGaR|e^XuaNO-u|x;OXk; Jvd$@?2>=3F614yT diff --git a/signs_lib/textures/signs_green_inv.png b/signs_lib/textures/signs_green_inv.png index dc95a918868bc5c3476d03e0de31a94ff058f4e1..f8a73787a61a3450a2d9bed70c7fa8c1be2fe59a 100644 GIT binary patch delta 90 zcmXTRn;;p=#=yWJ|M`C+kTUgjaSX9Iotz+%ap1&(0|!3*2ZEH$w3L*T#$qi=&r5&y s%On+a delta 98 zcmc~Rn;;p>#K6EXVPb|Ekh1l3aSYKopS)$mh6Dvx1H%a%5fTy-ee(8xOR~JZy~Q}X zH%^+k;MM=P|4$ZPTERB!sEJKb2V;+ke~n5u14HaC&R=T`YJ`9WF?hQAxvXTz(dF5)uyRojc;7ByrVXRpN^b28Nhgwi$d* R_A42Hz|+;wWt~$(69C!K79aos diff --git a/signs_lib/textures/signs_green_top.png b/signs_lib/textures/signs_green_top.png index 7df77f9131b9550a427b854d07a8cad18381b7e9..5aa85a9e6e356e906cea2a16ed4029f75d7cd808 100644 GIT binary patch delta 56 zcma!#pP*x`qph8+z-kZ`5iwy&V`rm_!K%a%=B*|hZrr>%aS0gTe~DWM4fL^c$k delta 56 zcma!#pP*x$vLZo&(;zA$V#1Qf&PEpl854s^QfrpnHjv`q(!tK)n9X$MtAq3>1|aZs L^>bP0l+XkKGb9sP diff --git a/signs_lib/textures/signs_yellow_bottom.png b/signs_lib/textures/signs_yellow_bottom.png index c2688d9af393697b674a174e5f3a9639bcd81616..8b65dbfe2339e7846605cea8f187ee8e630b759b 100644 GIT binary patch delta 78 zcmXR-njq=P#=yWJ|M`C+kka&YaSX9Iovfp+{rkKFW5SjV8y1{kP-EjdxPoypTaOe2 hqfS{_nTR9`kTPXMpA~c)I$ztaD0e0syf- BBRBv6 diff --git a/signs_lib/textures/signs_yellow_front.png b/signs_lib/textures/signs_yellow_front.png index c2f7e1041eda067297a83cde9890dca8062fc279..7b984fcba1528bdb318d396c15e43cb4369f9ff0 100644 GIT binary patch delta 47 zcmZo=teBv}Xg^U^Uqx_bBdcXkCu5I^zxS5w3=A4_EKi)>TNN09z|+;wWt~$(697$U B4Zi>Y delta 60 zcmb%@sA>IQ*QY>U}=*qAl^I(eMs85q3TS!8_Tm~R42VDNPHb6Mw<&;$Tx&Ku4E delta 101 zcmd0=oFJLN#K6EXVPb|EkaF;JaSYKopS)$mh6Dvx1H%bi9-9sxI@H8^=-2O-#)%7( zQzU?3fs}-#goI?~Uttn diff --git a/signs_lib/textures/signs_yellow_sides.png b/signs_lib/textures/signs_yellow_sides.png index 738afdc07172c15d50f1ec301b3c6c7611b8d6f6..1c9e227bd1ae80b490fae8f27c158f51306ba90a 100644 GIT binary patch delta 74 zcmYd@n;_}R#=yWJ|M`C+kW%$@aSX9Iovfp+{k#6f1x2=^hPiWPnT45K6RtD_GQ06g b=m1sUd(GNdzWOpZPy>UftDnm{r-UW|XWAEf delta 76 zcmaz`m>}uS#K6EXVPb|EkW%+_aSYKopZw?ll!Hb$nixf8;%b{(IlF&++^Rl9!h>b8 fl$$A!EHA^dI1ZL|&NpR%S{OWC{an^LB{Ts5z&9AK diff --git a/signs_lib/textures/signs_yellow_top.png b/signs_lib/textures/signs_yellow_top.png index bbd6e8f0f66ecbd0bc92c538488cd211b40ca8e8..5aa85a9e6e356e906cea2a16ed4029f75d7cd808 100644 GIT binary patch delta 64 zcmYd^pP*u`=IP=XqH#W1M_W5tfz==?B4Wal#?D3;gH?$k%v()1+_-sj;u1!NymF?e TKU^!l8Gyjk)z4*}Q$iB};`tXw delta 69 zcmaz~nV{mJ?djqeqH#X?&;KcnDhDzW6CEe9sj&$iEVyvsNB@z8)Wj5tUUsP?%qvey YGXyPQmzow>%)zopr0LU>JuK)l5