Add support for Inventory++

master
Wuzzy 2016-12-28 13:56:49 +01:00
parent c4976ca4df
commit 34af0a95f5
5 changed files with 21 additions and 3 deletions

View File

@ -3,9 +3,14 @@ and power users.
Current version: 1.3.0
If you use Minetest Game or Unified Inventory there's a new button in your
inventory menu for opening the form. Alternatively, you can always Use the
server command `/treeform`.
If you use one of the following mods, there's a new button in your inventory
menu for opening the form:
* Unified Inventory [`unified_inventory`]
* Simple Fast Inventory Buttons [`sfinv_buttons`]
* Inventory++ [`inventory_plus`]
Alternatively, you can always use the server command `/treeform`.
Usage help for this form is provided in the form itself.

View File

@ -1,2 +1,3 @@
unified_inventory?
sfinv_buttons?
inventory_plus?

View File

@ -830,6 +830,12 @@ end
function ltool.process_form(player,formname,fields)
local playername = player:get_player_name()
if fields.ltool and minetest.get_modpath("inventory_plus") then
ltool.show_treeform(playername)
return
end
local seltree = ltool.get_selected_tree(playername)
local seltree_id = ltool.get_selected_tree_id(playername)
local privs = minetest.get_player_privs(playername)
@ -1241,6 +1247,10 @@ function ltool.join(player)
infotable.treeform.help = {}
infotable.treeform.help.tab = 1
ltool.playerinfos[player:get_player_name()] = infotable
if minetest.get_modpath("inventory_plus") then
inventory_plus.register_button(player, "ltool", "L-System Tree Utility")
end
end
function ltool.save_to_file()
@ -1290,3 +1300,5 @@ if minetest.get_modpath("sfinv_buttons") ~= nil then
action = button_action,
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 191 B