From 10da2b2f32619f52569f7f6610cd089415606f58 Mon Sep 17 00:00:00 2001 From: Milan* Date: Fri, 13 Jan 2017 20:49:05 +0100 Subject: [PATCH] move playerskins out of the subgame --- mods/playerskins/depends.txt | 3 --- mods/playerskins/init.lua | 48 ------------------------------------ 2 files changed, 51 deletions(-) delete mode 100644 mods/playerskins/depends.txt delete mode 100644 mods/playerskins/init.lua diff --git a/mods/playerskins/depends.txt b/mods/playerskins/depends.txt deleted file mode 100644 index b9c14495..00000000 --- a/mods/playerskins/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -default -character_creator? -3d_armor? diff --git a/mods/playerskins/init.lua b/mods/playerskins/init.lua deleted file mode 100644 index 745d651f..00000000 --- a/mods/playerskins/init.lua +++ /dev/null @@ -1,48 +0,0 @@ --- thanks for the support from tenplus1, kaeza and Shara <3 --- --- this is a kind of pre-version of the Illuna skinmod. --- it is supposed to work together with a skinserver later. --- since it is very basic and the base kindly rewritten by tenplus1, --- i didn't yet decide about any license and so on. - --- get mod textures path -local path = minetest.get_modpath("playerskins") .. "/textures/" - --- this function runs every time player joins game -minetest.register_on_joinplayer(function(player) - - -- get player name from player object - local name = player:get_player_name() - - -- make name lower case and add .png extension - name = name:lower() .. ".png" - - -- set skin to default - local skin = "character.png" - - -- check if texture exists and set new skin - local f = io.open(path .. name, "r") - if f then - skin = name -- set new skin name - f:close() -- close file - - -- apply player texture - minetest.after(1, function() - if minetest.get_modpath("3d_armor") then - -- FIXME: after function is a placeholder to validate function - minetest.after(0, function(player) - if not player then - return - end - local name = player:get_player_name() - armor.textures[player:get_player_name()].skin = skin - armor:set_player_armor(player) - end, player) - else - player:set_properties({ - textures = {skin}, - }) - end - end) - end -end)