diff options
author | webdesigner97 <Christian_D_97@gmx.de> | 2013-10-14 19:31:17 +0200 |
---|---|---|
committer | webdesigner97 <Christian_D_97@gmx.de> | 2013-10-14 19:31:17 +0200 |
commit | 64ef3a5507eb8c729b2b749c574320f0627f2195 (patch) | |
tree | 9c28f353d742e1419499729f5aa1cc9e3e721a86 | |
parent | 761e23f88221f74c89299105d0a9920205ebba33 (diff) | |
download | roads-64ef3a5507eb8c729b2b749c574320f0627f2195.tar roads-64ef3a5507eb8c729b2b749c574320f0627f2195.tar.gz roads-64ef3a5507eb8c729b2b749c574320f0627f2195.tar.bz2 roads-64ef3a5507eb8c729b2b749c574320f0627f2195.tar.xz roads-64ef3a5507eb8c729b2b749c574320f0627f2195.zip |
Started developement of a sign 'workshop'
-rw-r--r-- | roadsigns/init.lua | 3 | ||||
-rw-r--r-- | roadsigns/workshop.lua | 30 |
2 files changed, 32 insertions, 1 deletions
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 |