Added Craftguide button if JP's Craftguide mod available

This commit is contained in:
tenplus1 2020-08-25 18:23:07 +01:00
parent 2821cf673b
commit 2cd93035a6
3 changed files with 17 additions and 0 deletions

View File

@ -2,3 +2,4 @@ default
sethome? sethome?
creative? creative?
intllib? intllib?
craftguide?

View File

@ -206,3 +206,18 @@ if minetest.get_modpath("sethome") and sethome then
print (S("sethome found, adding home_gui to inventory plus")) print (S("sethome found, adding home_gui to inventory plus"))
dofile(MP .. "/home_gui.lua") dofile(MP .. "/home_gui.lua")
end end
-- JP's Craftguide button
if minetest.get_modpath("craftguide") then
minetest.register_on_joinplayer(function(player)
inventory_plus.register_button(player, "craftguide", S("Craftguide"))
end)
minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.craftguide then
inventory_plus.set_inventory_formspec(player,
craftguide.show(player:get_player_name(), ""))
end
end)
end

View File

@ -9,6 +9,7 @@ updated by TenPlus1
- These are processed by your own mod, they can show other formspec screens, or perform in game functionality. - These are processed by your own mod, they can show other formspec screens, or perform in game functionality.
- Adds support for Creative Inventory. - Adds support for Creative Inventory.
- Intllib support for languages (thanks to H4mlet) - Intllib support for languages (thanks to H4mlet)
- Added Craftguide button if JP's Craftguide mod available
## Project Resources ## Project Resources