From fa2be9fc8d55f498a69daaa3ec8157eb58e122c5 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 28 Nov 2015 20:44:41 +0100 Subject: [PATCH] Creation of signs_road mod --- signs_road/LICENSE.txt | 13 +++ signs_road/README.md | 34 ++++++++ signs_road/crafts.lua | 27 +++++++ signs_road/depends.txt | 4 + signs_road/init.lua | 14 ++++ signs_road/nodes.lua | 75 ++++++++++++++++++ signs_road/textures/signs_black_inventory.png | Bin 0 -> 265 bytes signs_road/textures/signs_black_left.png | Bin 0 -> 263 bytes signs_road/textures/signs_black_right.png | Bin 0 -> 258 bytes signs_road/textures/signs_blue_street.png | Bin 0 -> 436 bytes .../textures/signs_blue_street_inventory.png | Bin 0 -> 472 bytes signs_road/textures/signs_green_street.png | Bin 0 -> 274 bytes .../textures/signs_green_street_inventory.png | Bin 0 -> 279 bytes 13 files changed, 167 insertions(+) create mode 100644 signs_road/LICENSE.txt create mode 100644 signs_road/README.md create mode 100644 signs_road/crafts.lua create mode 100644 signs_road/depends.txt create mode 100644 signs_road/init.lua create mode 100644 signs_road/nodes.lua create mode 100644 signs_road/textures/signs_black_inventory.png create mode 100644 signs_road/textures/signs_black_left.png create mode 100644 signs_road/textures/signs_black_right.png create mode 100644 signs_road/textures/signs_blue_street.png create mode 100644 signs_road/textures/signs_blue_street_inventory.png create mode 100644 signs_road/textures/signs_green_street.png create mode 100644 signs_road/textures/signs_green_street_inventory.png diff --git a/signs_road/LICENSE.txt b/signs_road/LICENSE.txt new file mode 100644 index 0000000..bc06764 --- /dev/null +++ b/signs_road/LICENSE.txt @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/signs_road/README.md b/signs_road/README.md new file mode 100644 index 0000000..deef3f7 --- /dev/null +++ b/signs_road/README.md @@ -0,0 +1,34 @@ +# Signs Road + +This mod provides road signs with text display. Text is locked if area is protected. + +**Dependancies**: default, display\_lib, font\_lib, signs + +**License**: WTFPL + +## Recipes + +**Blue Street Sign** + + B W S + S S S + - - - + +B = Blue Dye, W = White Dye, S = Steel Ingot + +**Green Street Sign** + + G W S + S S S + - - - + +G = Green Dye, W = White Dye, S = Steel Ingot + +**Black direction sign** + + B W S + S S - + - - - + +B = Black Dye, W = White Dye, S = Steel Ingot + diff --git a/signs_road/crafts.lua b/signs_road/crafts.lua new file mode 100644 index 0000000..2ae51ef --- /dev/null +++ b/signs_road/crafts.lua @@ -0,0 +1,27 @@ +minetest.register_craft({ + output = 'signs_road:blue_street', + recipe = { + {'dye:blue', 'dye:white', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'signs_road:green_street', + recipe = { + {'dye:green', 'dye:white', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, + {'', '', ''}, + } +}) + +minetest.register_craft({ + output = 'signs_road:black_right', + recipe = { + {'dye:black', 'dye:white', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:steel_ingot', ''}, + {'', '', ''}, + } +}) + diff --git a/signs_road/depends.txt b/signs_road/depends.txt new file mode 100644 index 0000000..9f7af7c --- /dev/null +++ b/signs_road/depends.txt @@ -0,0 +1,4 @@ +default +display_lib +font_lib +signs diff --git a/signs_road/init.lua b/signs_road/init.lua new file mode 100644 index 0000000..5bec1a4 --- /dev/null +++ b/signs_road/init.lua @@ -0,0 +1,14 @@ +-- Signs mod by P.Y. Rollo +-- +-- License: WTFPL + +signs_road = {} +signs_road.path = minetest.get_modpath("signs_road") + +dofile(signs_road.path.."/nodes.lua") +dofile(signs_road.path.."/crafts.lua") + + + + + diff --git a/signs_road/nodes.lua b/signs_road/nodes.lua new file mode 100644 index 0000000..a4c4b6a --- /dev/null +++ b/signs_road/nodes.lua @@ -0,0 +1,75 @@ + +local models = { + blue_street={ + depth = 1/16, + width = 14/16, + height = 12/16, + entity_fields = { + resolution = { x = 144, y = 64 }, + maxlines = 3, + color="#fff", + }, + node_fields = { + description="Blue street sign", + tiles={"signs_blue_street.png"}, + inventory_image="signs_blue_street_inventory.png", + }, + }, + green_street={ + depth=1/32, + width = 1, + height = 6/16, + entity_fields = { + resolution = { x = 96, y = 64 }, + maxlines = 1, + color="#fff", + }, + node_fields = { + description="Green street sign", + tiles={"signs_green_street.png"}, + inventory_image="signs_green_street_inventory.png", + }, + }, + black_right={ + depth=1/32, + width = 1, + height = 0.5, + entity_fields = { + resolution = { x = 96, y = 64 }, + maxlines = 1, + color="#000", + }, + node_fields = { + description="Black direction sign", + tiles={"signs_black_right.png"}, + inventory_image="signs_black_inventory.png", + on_place=signs.on_place_direction, + on_rotate=signs.on_rotate_direction, + }, + }, + black_left={ + depth=1/32, + width = 1, + height = 0.5, + entity_fields = { + resolution = { x = 96, y = 64 }, + maxlines = 1, + color="#000", + }, + node_fields = { + description="Black direction sign", + tiles={"signs_black_left.png"}, + inventory_image="signs_black_inventory.png", + groups={choppy=1,oddly_breakable_by_hand=1,not_in_creative_inventory=1}, + drop="signs:black_right", + on_place=signs.on_place_direction, + on_rotate=signs.on_rotate_direction, + }, + }, +} + + +for name, model in pairs(models) +do + signs.register_sign("signs_road", name, model) +end diff --git a/signs_road/textures/signs_black_inventory.png b/signs_road/textures/signs_black_inventory.png new file mode 100644 index 0000000000000000000000000000000000000000..4b10ee397f0b3a9152e61dbcf7496bdba6ad177c GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt*kyE{-7) zt#7Y7aW=N;oPk?m$?HPm^^N&RyH#z z7sO8?NfDv}F9Ipyj~GRlsoDZdt?1R~}U&Kt(N{E{-7) zt#7Xy@*Pm%Xia>x&|-f1~}U&Kt=VQE{-7) zt#7Y7@--N6xCFjhXc7PZ*uj0$$yb)_(z@*85%F1S)l8gbokp9szR)H(SA%4eCxzJCqo%onZWZnk&x!;Tkz! wf7Tkdi8ftRkFSu`o-oyhohzV$=>((oZoOsIy|a{3fKFlXboFyt=akR{0FKjES^xk5 literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_blue_street.png b/signs_road/textures/signs_blue_street.png new file mode 100644 index 0000000000000000000000000000000000000000..540a3904deadd6a452b0b47c2d28e3cbf45d6663 GIT binary patch literal 436 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&3=E8ho-U3d z5v^~pD`p>dkT~|S{+Ps8;e|>{8&9*Z=(rX0oXNPbHB2sq?HecC)YcOnvxJOStdT4h z{L3(NZ&!zqp>&eb)QQrPJ~Anf;>6=V{;_!Xpp*5xuJXC7Gaj;i&}X>*xBqb=^MRy~ zO;aQ%pX{ABVOQRVJso%7NjChnkz*@Sb~#b^|5(=6i%cGuB@_=GoO`vt?ea@qr z{aG3pXq<~;*!O7XE>p)@7+No=Fw9__QKj5Eh;K}DPb7PEM7GufMEzDnz8|_bHGcbF= ZUGh3DsP9vXC@_Q>JYD@<);T3K0RX?2u}S~{ literal 0 HcmV?d00001 diff --git a/signs_road/textures/signs_blue_street_inventory.png b/signs_road/textures/signs_blue_street_inventory.png new file mode 100644 index 0000000000000000000000000000000000000000..a702669d5262356df298b79adc6fb7d13948b435 GIT binary patch literal 472 zcmV;}0Vn>6P)9eFrZiB21~fN!<+q zfLUKK=Ktz45S`d(LAWjAlCrFzEGx*e*3>jt(xs-kl4Y%j^MNJxzOykpAp#r@uh?#% zwcIvIA_x(T_E`T78S}}q?jb~g-R=pVCs3AWEdZ|TAkSm$_b-U!BQBTs;R%!_lrn{F z&$XHZKv|yQc>=aQhm@((Qzk%k0%N{5<1zIfqZ61y2EYIq00UqE41faAwjGirg6lfk zja=73l0<0R?t1{vLsV6bJdd?P^ns+RYH%JZJtYrh*)4(<#T#sUt~HWXRgJ~s0RXUC zMMEAK&4h7$gp?^Zn@24GZQFtKZ~*u!Wdd5~}U&Kt=tYE{-7) zt#7X=@-;gMxIH|+Y zrskP5CoB}xV;C4&1RjVqa3A>e+hC8{z1!DSqvG>>e9tdlqjBcUyYuIC_qnfmD>MIq z^}hVH`;3e%90L1WzAs5*keGc>bRwUi0RP13p9$wSGBa@~G%#2`=U~}U&Kt)qLT^vIq zTHjt#xLtgu>7hyn&sGT&&gT+GmU+5<<>CAv^Pn~< zZPH9ZOUo^K4Gc^i3?d3&M8z6@|2|n@ZCo3tcQJNz>YFOQ+0#dZ#WD$6bP0l+XkK;1gtj literal 0 HcmV?d00001