summaryrefslogtreecommitdiff
path: root/skin_meta_api.lua
diff options
context:
space:
mode:
authorAlexander Weber <web.alexander@web.de>2018-05-13 00:37:19 +0200
committerAlexander Weber <web.alexander@web.de>2018-05-13 00:37:19 +0200
commite6516d298284b6a64af2bce7c6df5be2ba4eb964 (patch)
treed6920747b7358451dfb8b674b30fd8d4b37ac9a7 /skin_meta_api.lua
parentb12aefbe4fe768106ee1d1dfac8567dbbcd8c273 (diff)
Visual update fixes if skin change externally (with and without 3d armor)
API updated also
Diffstat (limited to 'skin_meta_api.lua')
-rw-r--r--skin_meta_api.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/skin_meta_api.lua b/skin_meta_api.lua
index f8a92e2..c08573f 100644
--- a/skin_meta_api.lua
+++ b/skin_meta_api.lua
@@ -59,8 +59,6 @@ function skin_class:get_preview()
return self._preview or "player.png"
end
-local armor_loaded = minetest.global_exists("armor")
-
function skin_class:apply_skin_to_player(player)
local ver = self:get_meta("format") or "1.0"
default.player_set_model(player, "skinsdb_3d_armor_character.b3d")
@@ -76,7 +74,7 @@ function skin_class:apply_skin_to_player(player)
v10_texture = self:get_texture()
end
- if armor_loaded then
+ if skins.armor_loaded then
local armor_textures = armor.textures[player:get_player_name()]
if armor_textures then
armor_texture = armor_textures.armor
@@ -103,7 +101,6 @@ function skin_class:set_skin(player)
-- The set_skin is used on skins selection
-- This means the method could be redefined to start an furmslec
-- See character_creator for example
- self:apply_skin_to_player(player)
end
function skin_class:is_applicable_for_player(playername)