forked from thunderdog1138/star_wars
Add files via upload
This commit is contained in:
parent
9951ba1485
commit
bade4c581f
|
@ -0,0 +1,18 @@
|
|||
[mod] 3d Armor sfinv integration [3d_armor_sfinv]
|
||||
=================================================
|
||||
|
||||
Copyright (C) 2012-2019 stujones11, Stuart Jones <stujones111@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
@ -0,0 +1 @@
|
|||
Adds 3d_armor page to the sfinv inventory
|
|
@ -0,0 +1,21 @@
|
|||
-- support for i18n
|
||||
local S = armor_i18n.gettext
|
||||
|
||||
if not minetest.global_exists("sfinv") then
|
||||
minetest.log("warning", S("3d_armor_sfinv: Mod loaded but unused."))
|
||||
return
|
||||
end
|
||||
|
||||
sfinv.register_page("3d_armor:armor", {
|
||||
title = S("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)
|
Loading…
Reference in New Issue