diff options
author | Christian <Christian_D_97@gmx.de> | 2014-06-24 21:49:58 +0200 |
---|---|---|
committer | Christian <Christian_D_97@gmx.de> | 2014-06-24 21:49:58 +0200 |
commit | 25d8aadf386c253665407b8b94875a1587df0b40 (patch) | |
tree | 6c3cf702d6023d1b1f4c6fe185eae2ac8bf33b58 /roadsigns/init.lua | |
parent | 59610279478543d186c735e7bae96b1bf98d1005 (diff) | |
parent | 5c24ba52ba4448094cf1b51494eb994f1cbc6567 (diff) | |
download | roads-25d8aadf386c253665407b8b94875a1587df0b40.tar roads-25d8aadf386c253665407b8b94875a1587df0b40.tar.gz roads-25d8aadf386c253665407b8b94875a1587df0b40.tar.bz2 roads-25d8aadf386c253665407b8b94875a1587df0b40.tar.xz roads-25d8aadf386c253665407b8b94875a1587df0b40.zip |
Merge pull request #20 from ethic-rush/master
Made a few changes to the way signs are registered
Diffstat (limited to 'roadsigns/init.lua')
-rw-r--r-- | roadsigns/init.lua | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/roadsigns/init.lua b/roadsigns/init.lua index 73401fa..ccb58ea 100644 --- a/roadsigns/init.lua +++ b/roadsigns/init.lua @@ -3,5 +3,40 @@ ]] streets.workshop = {} +streets.workshop.register_sign = function(nodename, desc, img, rrecipe, rtime) + + minetest.register_node(nodename,{ + description = desc, + tiles = img, + inventory_image = img, + wield_image = img, + groups = {snappy = 1,attached_node = 1}, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", desc) + end, + 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 = rrecipe, + time = rtime + } + } + }) +end + 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 +dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/workshop.lua") |