forked from mtcontrib/3d_armor
Inventory compat cleanup
fix inventory_plus after cleanup. Create own register_on_player_receive_fields for this inventory removed smart_inventory (moved to the inventoy mod), adjusted sfinv moved sfinv to own mod 3d_armor_sfinv moved unified_inventory to 3d_armor_ui moved inventory_plus support to own mod 3d_armor_ip
This commit is contained in:
committed by
stujones11
parent
75191490c2
commit
f0edb9a710
5
3d_armor_sfinv/LICENSE.txt
Normal file
5
3d_armor_sfinv/LICENSE.txt
Normal file
@ -0,0 +1,5 @@
|
||||
[mod] 3d Armor sfinv integration [3d_armor_sfinv]
|
||||
=================================================
|
||||
|
||||
License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1
|
||||
|
2
3d_armor_sfinv/depends.txt
Normal file
2
3d_armor_sfinv/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
3d_armor
|
||||
sfinv?
|
1
3d_armor_sfinv/description.txt
Normal file
1
3d_armor_sfinv/description.txt
Normal file
@ -0,0 +1 @@
|
||||
Adds 3d_armor page to the sfinv inventory
|
18
3d_armor_sfinv/init.lua
Normal file
18
3d_armor_sfinv/init.lua
Normal file
@ -0,0 +1,18 @@
|
||||
if not minetest.global_exists("sfinv") then
|
||||
minetest.log("warning", "3d_armor_sfinv: Mod loaded but unused.")
|
||||
return
|
||||
end
|
||||
|
||||
sfinv.register_page("3d_armor:armor", {
|
||||
title = "Armor",
|
||||
get = function(self, player, context)
|
||||
local name = player:get_player_name()
|
||||
local formspec = armor:get_armor_formspec(name, true)
|
||||
return sfinv.make_formspec(player, context, formspec, false)
|
||||
end
|
||||
})
|
||||
armor:register_on_update(function(player)
|
||||
if sfinv.enabled then
|
||||
sfinv.set_player_inventory_formspec(player)
|
||||
end
|
||||
end)
|
Reference in New Issue
Block a user