2019-05-31 12:27:35 -07:00
|
|
|
--[[
|
|
|
|
|
|
|
|
Inventory Plus for Minetest
|
|
|
|
|
|
|
|
Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com>
|
|
|
|
Source Code: https://github.com/cornernote/minetest-inventory_plus
|
|
|
|
License: BSD-3-Clause https://raw.github.com/cornernote/minetest-inventory_plus/master/LICENSE
|
|
|
|
|
|
|
|
Edited by TenPlus1 (23rd March 2016)
|
|
|
|
|
|
|
|
]]--
|
|
|
|
|
2019-07-27 11:58:13 -07:00
|
|
|
-- For Tooltip : First is name of button, Two is description
|
|
|
|
|
2019-05-31 12:27:35 -07:00
|
|
|
-- expose api
|
|
|
|
inventory_plus = {}
|
|
|
|
|
|
|
|
-- define buttons
|
|
|
|
inventory_plus.buttons = {}
|
|
|
|
|
|
|
|
-- default inventory page
|
2019-07-08 08:55:51 -07:00
|
|
|
inventory_plus.default = "main"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
-- register_button
|
|
|
|
inventory_plus.register_button = function(player, name, label)
|
|
|
|
|
|
|
|
local player_name = player:get_player_name()
|
|
|
|
|
|
|
|
if inventory_plus.buttons[player_name] == nil then
|
|
|
|
inventory_plus.buttons[player_name] = {}
|
|
|
|
end
|
|
|
|
|
|
|
|
inventory_plus.buttons[player_name][name] = label
|
|
|
|
end
|
|
|
|
|
|
|
|
-- set_inventory_formspec
|
|
|
|
inventory_plus.set_inventory_formspec = function(player, formspec)
|
|
|
|
|
|
|
|
-- error checking
|
|
|
|
if not formspec then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if minetest.settings:get_bool("creative_mode") then
|
|
|
|
|
|
|
|
-- if creative mode is on then wait a bit
|
|
|
|
minetest.after(0.01,function()
|
|
|
|
player:set_inventory_formspec(formspec)
|
|
|
|
end)
|
|
|
|
else
|
|
|
|
player:set_inventory_formspec(formspec)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- create detached inventory for trashcan
|
|
|
|
local trashInv = minetest.create_detached_inventory(
|
|
|
|
"trash", {
|
|
|
|
on_put = function(inv, toList, toIndex, stack, player)
|
|
|
|
inv:set_stack(toList, toIndex, ItemStack(nil))
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
trashInv:set_size("main", 1)
|
|
|
|
|
|
|
|
-- get_formspec
|
|
|
|
inventory_plus.get_formspec = function(player, page)
|
|
|
|
|
|
|
|
if not player then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- default inventory page
|
|
|
|
local formspec = "size[8,7.5]"
|
|
|
|
.. default.gui_bg
|
|
|
|
.. default.gui_bg_img
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
-- nodes page
|
|
|
|
if page == "nodes" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,0.5;1,1;blocks.png;blocks;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[blocks;Block]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;stairs.png;stairs;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[stairs;Stair]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,0.5;1,1;slabs.png;slabs;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[slabs;Slab]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[3,0.5;1,1;windows.png;windows;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[windows;Window]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[4,0.5;1,1;lights.png;lights;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lights;Light]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[5,0.5;1,1;waters.png;waters;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[waters;Water]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[6,0.5;1,1;doors.png;doors;] "
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[doors;Door]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[7,0.5;1,1;carpets.png;carpets;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[carpets;Carpet]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,2.5;1,1;trapdoor.png;trapdoor;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[trapdoor;Trapdoor]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,2.5;1,1;fence.png;fence;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[fence;Fence]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,2.5;1,1;cylinder.png;cylinder;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[cylinder;Cylinder]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[3,2.5;1,1;triangle.png;triangle;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[triangle;Triangle]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[4,2.5;1,1;long.png;long;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[long;Long Triangle]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[5,2.5;1,1;cone.png;cone;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[cone;Cone]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[6,2.5;1,1;sphere.png;sphere;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[sphere;Sphere]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[7,2.5;1,1;cornera.png;outcorner;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[outcorner;Out Corner]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,4.5;1,1;cornerb.png;incorner;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[incorner;In Corner]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,4.5;1,1;arc.png;arc;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[arc;Arc]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,4.5;1,1;arcin.png;inarc;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[inarc;In Arc]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[3,4.5;1,1;arcout.png;outarc;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[outarc;Out Arc]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[4,4.5;1,1;fullpipe.png;fullpipe;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[fullpipe;Fullpipe]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[5,4.5;1,1;fullpipeborder.png;fullpipeborder;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[fullpipeborder;Fullpipe Border]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[6,4.5;1,1;edge.png;edge;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[edge;Edge]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[7,4.5;1,1;droite.png;nodes2;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[nodes2;Nodes Page 2]"
|
2019-07-23 10:29:09 -07:00
|
|
|
|
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[main;Back to Menu]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
|
|
|
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
-- nodes page2
|
|
|
|
|
|
|
|
if page == "nodes2" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,0.5;1,1;edgecorner.png;edgecorner;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[edgecorner;Edge corner]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;nodes;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[nodes;Nodes Page 1]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if page == "animals" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,0.5;1,1;mobs_chicken_egg_overlay.png;panda;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[panda;Animals & Tools]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[main;Back to Menu]"
|
|
|
|
|
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
|
|
.. "tooltip[none;None]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
-- furnitures page
|
|
|
|
|
|
|
|
if page == "furnitures" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,0.5;1,1;chair.png;chair;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[chair;Chair]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;sofas.png;sofas;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[sofas;Armchair]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,0.5;1,1;table.png;table;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[table;Table]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[3,0.5;1,1;signs.png;signs;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[signs;Sign]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[4,0.5;1,1;beds.png;beds;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[beds;Bed]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[5,0.5;1,1;flowers.png;flowers;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[flowers;Flower]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[6,0.5;1,1;flag.png;flags;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[flags;Flag]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[7,0.5;1,1;computer.png;computers;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[computers;Computer]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,2.5;1,1;desk.png;desks;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[desks;Desk]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,2.5;1,1;bench.png;bench;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[bench;Bench]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,2.5;1,1;armoire.png;armoire;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[armoire;Cabinet]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[3,2.5;1,1;frigo.png;frigo;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[frigo;Fridge]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[4,2.5;1,1;fbtrap.png;fbtrap;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[fbtrap;Strap]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[5,2.5;1,1;fbstair.png;fbstair;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[fbstair;Stair]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[6,2.5;1,1;fbladder.png;fbladder;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[fbladder;Ladder]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[7,2.5;1,1;cgherse.png;cgherse;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[cgherse;Cg Harrow]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,4.5;1,1;cgborder.png;cgborder;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[cgborder;Cg Border]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,4.5;1,1;cgdoor.png;cgdoor;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[cgdoor;Cg Door]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,4.5;1,1;torch.png;torch;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[torch;Torch]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[3,4.5;1,1;invcross.png;shieldcross;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[shieldcross;Shield cross]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[4,4.5;1,1;invslash.png;shieldslash;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[shieldslash;Shield slash]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[5,4.5;1,1;invchevron.png;shieldchevron;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[shieldchevron;Shield chevron]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.."image_button_exit[6,4.5;1,1;trampo.png;trampoline;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[trampoline;Trampoline]"
|
2019-07-23 10:29:09 -07:00
|
|
|
|
|
|
|
.. "image_button[7,4.5;1,1;droite.png;furnitures2;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[furnitures2;Furnitures Page 2]"
|
2019-07-23 10:29:09 -07:00
|
|
|
|
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[main;Back to Menu]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
2019-05-31 12:27:35 -07:00
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
-- furnitures page2
|
|
|
|
|
|
|
|
if page == "furnitures2" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,0.5;1,1;beaconon.png;beacon;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[beacon;Beacon]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;beaconoff.png;beaconoff;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[beaconoff;Beacon Off]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;furnitures;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[furnitures;Furnitures Page1]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- Cars
|
|
|
|
|
|
|
|
if page == "vehicules" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,0.5;1,1;cars.png;cars;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[cars;Car]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;surfboard.png;surfboard;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[surfboard;Surfboard]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,0.5;1,1;airboat_airboat_inv.png;airboat;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[airboat;AirBoat]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[3,0.5;1,1;spaceship_spaceship_inv.png;spaceship;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[spaceship;SpaceShip]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[4,0.5;1,1;hovercraft_inv.png;hovercraft;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[hovercraft;Hovercraft]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[5,0.5;1,1;hotair_inv.png;hotairballoon;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[hotairballoon;HotairBallon]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[6,0.5;1,1;cart.png;carts;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[carts;Cart]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[7,0.5;1,1;carts_rail_straight_pwr.png;rails;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rails;Rail]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[main;Back to Menu]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
|
|
|
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if page == "planets" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if page == "trees" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[0,0.5;1,1;smalltrees.png;smalltrees;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[smalltrees;Small Tree]"
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;normaltrees.png;normaltrees;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[normaltrees;Tree]"
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,0.5;1,1;bigtrees.png;bigtrees;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[bigtrees;Big Tree]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[main;Back to Menu]"
|
|
|
|
|
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
|
|
|
.. "tooltip[none;None]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
2019-07-23 20:56:38 -07:00
|
|
|
|
|
|
|
-- letters page
|
|
|
|
if page == "mathmenu" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
|
|
|
.. "image_button_exit[0,0.5;1,1;0.png;math0;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math0;0]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;1.png;math1;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math1;1]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,0.5;1,1;2.png;math2;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math2;2]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[3,0.5;1,1;3.png;math3;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math3;3]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[4,0.5;1,1;4.png;math4;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math4;4]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[5,0.5;1,1;5.png;math5;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math5;5]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[6,0.5;1,1;6.png;math6;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math6;6]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[7,0.5;1,1;7.png;math7;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math7;7]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[0,2.5;1,1;8.png;math8;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math8;8]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,2.5;1,1;9.png;math9;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[math9;9]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,2.5;1,1;egale.png;mathegale;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathegale;Equal to]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[3,2.5;1,1;inferieure.png;mathinferieure;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathinferieure;Less than]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[4,2.5;1,1;superieure.png;mathsuperieure;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathsuperieure;Greater than]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[5,2.5;1,1;diviser.png;mathdiviser;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathdiviser;Divide]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[6,2.5;1,1;plus.png;mathplus;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathplus;Plus]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[7,2.5;1,1;moins.png;mathmoins;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathmoins;Minus]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[0,4.5;1,1;multiplier.png;mathmultiplier;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathmultiplier;Multiply]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,4.5;1,1;virgule.png;mathvirgule;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[mathvirgule;Comma]"
|
2019-07-23 20:56:38 -07:00
|
|
|
|
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[main;Back to Menu]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
2019-07-23 20:56:38 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
-- letters page
|
|
|
|
if page == "lettermenu" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
|
|
|
.. "image_button_exit[0,0.5;1,1;a.png;lettera;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettera;A]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;b.png;letterb;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterb;B]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,0.5;1,1;c.png;letterc;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterc;C]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[3,0.5;1,1;d.png;letterd;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterd;D]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[4,0.5;1,1;e.png;lettere;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettere;E]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[5,0.5;1,1;f.png;letterf;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterf;F]"
|
|
|
|
|
|
|
|
.. "image_button_exit[6,0.5;1,1;g.png;letterg;]"
|
|
|
|
.. "tooltip[letterg;G]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[7,0.5;1,1;h.png;letterh;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterh;H]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[0,2.5;1,1;i.png;letteri;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letteri;I]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,2.5;1,1;j.png;letterj;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterj;J]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,2.5;1,1;k.png;letterk;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterk;K]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[3,2.5;1,1;l.png;letterl;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterl;L]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[4,2.5;1,1;m.png;letterm;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterm;M]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[5,2.5;1,1;n.png;lettern;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettern;N]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[6,2.5;1,1;o.png;lettero;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettero;O]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[7,2.5;1,1;p.png;letterp;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterp;P]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[0,4.5;1,1;q.png;letterq;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterq;Q]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,4.5;1,1;r.png;letterr;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterr;R]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,4.5;1,1;s.png;letters;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letters;S]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[3,4.5;1,1;t.png;lettert;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettert;T]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[4,4.5;1,1;u.png;letteru;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letteru;U]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[5,4.5;1,1;v.png;letterv;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterv;V]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[6,4.5;1,1;w.png;letterw;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterw;W]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button[7,4.5;1,1;droite.png;lettermenu2;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettermenu2;Letters Page 2]"
|
2019-07-23 20:56:38 -07:00
|
|
|
|
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;main;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[main;Back to Menu]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
2019-07-23 20:56:38 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
-- letters page 2
|
|
|
|
|
|
|
|
if page == "lettermenu2" then
|
|
|
|
|
|
|
|
local inv = player:get_inventory() or nil
|
|
|
|
|
|
|
|
if not inv then
|
|
|
|
print ("NO INVENTORY FOUND")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
|
|
|
.. "image_button_exit[0,0.5;1,1;x.png;letterx;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterx;X]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,0.5;1,1;y.png;lettery;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettery;Y]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,0.5;1,1;z.png;letterz;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[letterz;Z]"
|
2019-07-23 20:56:38 -07:00
|
|
|
|
|
|
|
.. "image_button[0,6.5;1,1;gauche.png;lettermenu;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[lettermenu;Letters Page 1]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[1,6.5;1,1;rotate.png;rotate;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[rotate;Rotate]"
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button_exit[2,6.5;1,1;nones.png;none;]"
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "tooltip[none;None]"
|
2019-07-23 20:56:38 -07:00
|
|
|
|
|
|
|
.. ""
|
|
|
|
|
|
|
|
end
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
-- main page
|
|
|
|
if page == "main" then
|
|
|
|
|
|
|
|
-- buttons
|
|
|
|
local x, y = 2, 0
|
|
|
|
|
|
|
|
for k, v in pairs(inventory_plus.buttons[player:get_player_name()]) do
|
|
|
|
|
|
|
|
formspec = formspec
|
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[2,0.5;4,1;;character_creator;Skin]"
|
|
|
|
.. "image_button[2,1.5;4,1;;vehicules;Vehicules]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "image_button[2,2.5;4,1;;trees;Trees]"
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button[2,3.5;4,1;;animals;Animals]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-27 11:58:13 -07:00
|
|
|
.. "image_button[2,4.5;2,1;;nodes;Builds]"
|
2019-07-23 20:56:38 -07:00
|
|
|
.. "image_button[4,4.5;2,1;;furnitures;Decorations]"
|
|
|
|
|
|
|
|
.. "image_button[2,5.5;2,1;;lettermenu;Letters]"
|
|
|
|
.. "image_button[4,5.5;2,1;;mathmenu;Maths]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
2019-07-23 10:29:09 -07:00
|
|
|
.. "image_button_exit[2,6.5;4,1;;quit;Back To Game]"
|
2019-05-31 12:27:35 -07:00
|
|
|
|
|
|
|
x = x
|
|
|
|
y = y + 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return formspec
|
|
|
|
end
|
|
|
|
|
|
|
|
-- register_on_joinplayer
|
|
|
|
minetest.register_on_joinplayer(function(player)
|
|
|
|
|
|
|
|
minetest.after(1, function()
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, inventory_plus.default))
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- register_on_player_receive_fields
|
|
|
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
|
|
|
|
|
|
-- main
|
|
|
|
|
|
|
|
if fields.main then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "main"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- craft
|
|
|
|
if fields.nodes then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "nodes"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2019-07-23 20:56:38 -07:00
|
|
|
if fields.lettermenu then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "lettermenu"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.lettermenu2 then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "lettermenu2"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.mathmenu then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "mathmenu"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.lettermenu2 then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "mathmenu2"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2019-05-31 12:27:35 -07:00
|
|
|
if fields.nodes2 then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "nodes2"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.furnitures then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "furnitures"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.furnitures2 then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "furnitures2"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.vehicules then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "vehicules"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.trees then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "trees"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if fields.animals then
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "animals"))
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- creative
|
|
|
|
if fields.creative_prev
|
|
|
|
or fields.creative_next then
|
|
|
|
|
|
|
|
minetest.after(0.1, function()
|
|
|
|
|
|
|
|
inventory_plus.set_inventory_formspec(player,
|
|
|
|
inventory_plus.get_formspec(player, "creative"))
|
|
|
|
end)
|
|
|
|
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end)
|