Merge pull request #28 from MoNTE48/global_exists

Fix `global_exists` usage
This commit is contained in:
Alexsandro Percy 2024-12-27 10:48:58 -03:00 committed by GitHub
commit a6e40eb557
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,11 +97,11 @@ function airutils.set_player_skin(player, skin)
else
--remove texture
local old_texture = player_meta:get_string("backup")
if minetest.global_exists(set_skin) then --checking if set_skin is available
if minetest.global_exists("set_skin") then --checking if set_skin is available
if player:get_attribute("set_skin:player_skin") ~= nil and player:get_attribute("set_skin:player_skin") ~= "" then
old_texture = player:get_attribute("set_skin:player_skin")
end
elseif minetest.global_exists(wardrobe) then --checking if wardrobe is available
elseif minetest.global_exists("wardrobe") then --checking if wardrobe is available
if wardrobe.playerSkins then
if wardrobe.playerSkins[name] ~= nil then
old_texture = wardrobe.playerSkins[name]