mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
added error message when skinsdb and armor are installed together
This commit is contained in:
parent
9899cdd2d9
commit
f7f4a232cf
1 changed files with 15 additions and 5 deletions
|
@ -6,12 +6,16 @@ local curr_skin = "airutils:skin"
|
||||||
|
|
||||||
minetest.register_chatcommand("au_uniform", {
|
minetest.register_chatcommand("au_uniform", {
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = minetest.get_player_by_name(name)
|
if skinsdb_mod_path and minetest.global_exists("armor") then
|
||||||
|
minetest.chat_send_player(name, "Sorry, but this module doesn't work when SkinsDb and Armor are instaled together.")
|
||||||
if player then
|
|
||||||
airutils.uniform_formspec(name)
|
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(name, "Something isn't working...")
|
local player = minetest.get_player_by_name(name)
|
||||||
|
|
||||||
|
if player then
|
||||||
|
airutils.uniform_formspec(name)
|
||||||
|
else
|
||||||
|
minetest.chat_send_player(name, "Something isn't working...")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -52,6 +56,9 @@ function airutils.set_player_skin(player, skin)
|
||||||
mesh = "character.b3d",
|
mesh = "character.b3d",
|
||||||
textures = {texture},
|
textures = {texture},
|
||||||
})
|
})
|
||||||
|
if armor then
|
||||||
|
armor:update_player_visuals(player)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
set_player_textures(player, {texture})
|
set_player_textures(player, {texture})
|
||||||
end
|
end
|
||||||
|
@ -80,6 +87,9 @@ function airutils.set_player_skin(player, skin)
|
||||||
textures = {texture},
|
textures = {texture},
|
||||||
})
|
})
|
||||||
skins.set_player_skin(player, skins.get_player_skin(player))
|
skins.set_player_skin(player, skins.get_player_skin(player))
|
||||||
|
if armor then
|
||||||
|
armor:set_player_armor(player)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if old_texture ~= nil and old_texture ~= "" then
|
if old_texture ~= nil and old_texture ~= "" then
|
||||||
set_player_textures(player, { old_texture })
|
set_player_textures(player, { old_texture })
|
||||||
|
|
Loading…
Add table
Reference in a new issue