Compare commits
5 Commits
5681dff2dd
...
0765804d04
Author | SHA1 | Date |
---|---|---|
Vanessa Dannenberg | 0765804d04 | |
cheapie | 3f84af947f | |
cheapie | d11f870de2 | |
cheapie | c79b5de686 | |
cheapie | 143f97eaae |
38
init.lua
38
init.lua
|
@ -2,18 +2,28 @@ invsaw = {}
|
||||||
|
|
||||||
invsaw.users = {}
|
invsaw.users = {}
|
||||||
|
|
||||||
local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
|
local ui = unified_inventory
|
||||||
invsaw.formspec = "size[11,10]"..fancy_inv..
|
|
||||||
"label[0,0;Input\nmaterial]" ..
|
invsaw.formspec = "formspec_version[4]"..
|
||||||
"list[detached:invsaw_%s;input;1.5,0;1,1;]" ..
|
"size[15,15]"..
|
||||||
"label[0,1;Left-over]" ..
|
"background9[0,0;1,1;ui_formbg_9_sliced.png;true;16]"..
|
||||||
"list[detached:invsaw_%s;micro;1.5,1;1,1;]" ..
|
"listcolors[#00000000;#FFFFFF80;#00000000]"..
|
||||||
"label[0,2;Recycle\noutput]" ..
|
ui.single_slot(1.88, 0.88, true)..
|
||||||
"list[detached:invsaw_%s;recycle;1.5,2;1,1;]" ..
|
"label[0.75,1.3;Input\nmaterial]" ..
|
||||||
"field[0.3,3.5;1,1;max_offered;Max:;%s]" ..
|
"list[detached:invsaw_%s;input;2,1;1,1;]" ..
|
||||||
"button[1,3.2;1,1;Set;Set]" ..
|
"label[0.75,3;Left-over]" ..
|
||||||
"list[detached:invsaw_%s;output;2.8,0;8,6;]" ..
|
ui.single_slot(1.88, 2.38)..
|
||||||
"list[current_player;main;1.5,6.25;8,4;]"
|
"list[detached:invsaw_%s;micro;2,2.5;1,1;]" ..
|
||||||
|
"label[0.75,4.3;Recycle\noutput]" ..
|
||||||
|
ui.single_slot(1.88, 3.88)..
|
||||||
|
"list[detached:invsaw_%s;recycle;2,4;1,1;]" ..
|
||||||
|
"field[0.75,6;1,1;max_offered;Max:;%s]" ..
|
||||||
|
"button[2,6;1,1;Set;Set]" ..
|
||||||
|
ui.make_inv_img_grid(3.88, 0.88, 8, 6)..
|
||||||
|
"list[detached:invsaw_%s;output;4,1;8,6;]" ..
|
||||||
|
ui.make_inv_img_grid(3.88, 9.38, 8, 1, true)..
|
||||||
|
ui.make_inv_img_grid(3.88, 10.63, 8, 3)..
|
||||||
|
"list[current_player;main;4,9.5;8,4;]"
|
||||||
|
|
||||||
invsaw.nosawformspec = "size[5,2]"..
|
invsaw.nosawformspec = "size[5,2]"..
|
||||||
"label[0,0;You don't have a circular saw in your inventory!\nYou need to have one in order to use this function.]"..
|
"label[0,0;You don't have a circular saw in your inventory!\nYou need to have one in order to use this function.]"..
|
||||||
|
@ -136,7 +146,7 @@ invsaw.on_take = function(inv, listname, index, stack, player)
|
||||||
player_inv:add_item("main", input_stack)
|
player_inv:add_item("main", input_stack)
|
||||||
end
|
end
|
||||||
|
|
||||||
circular_saw:reset(pos)
|
invsaw.reset(inv,player:get_player_name())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -190,7 +200,7 @@ minetest.register_on_joinplayer(function(player)
|
||||||
on_put = invsaw.on_put,
|
on_put = invsaw.on_put,
|
||||||
on_take = invsaw.on_take,
|
on_take = invsaw.on_take,
|
||||||
allow_move = function() return 0 end
|
allow_move = function() return 0 end
|
||||||
})
|
}, name)
|
||||||
inv:set_size("input",1)
|
inv:set_size("input",1)
|
||||||
inv:set_size("micro",1)
|
inv:set_size("micro",1)
|
||||||
inv:set_size("recycle",1)
|
inv:set_size("recycle",1)
|
||||||
|
|
Loading…
Reference in New Issue