1
0
mirror of https://github.com/SmallJoker/minetest-u_skinsdb.git synced 2025-06-30 07:01:01 +02:00

14 Commits

Author SHA1 Message Date
dd396bfad2 Upload C# source code, raw 2015-09-25 22:46:42 +02:00
f389e6bd13 More efficient python script
- Fixed pipelining
- Cleaning everything up
- Don't re-download saved characters
- Add the media to .gitignore

About pipelining:

According to python:
1) you send a request
2) you MUST get response headers for (1) (THIS IS MANDATORY)
3) you send another request
4) you get response body for (2)
5) response headers for (3)
6) response body for (5)

Only two requests can be pipelined. Surely this is an unavoidable, wait no it's just written into the code to error out if you don't do it that way.

according to reality:
1) you send a request
2) you do not get response headers for (1)
3) you repeat steps 1-2 until enough responses are queued
4) you receive those responses as header,body,header,body...

they even name it with a __ so to make it hard to override, but the state can safely go to Idle after a request has sent, whether or not response headers have come in. Sure the connection might close, but then you adjust to not pipeline, and re-send the rest of your requests over a new connection.
2015-09-25 22:43:54 +02:00
e762283dec Use simple_skins if default selected 2015-04-11 15:27:41 +02:00
5cb484e251 Add tooltips 2014-11-23 20:00:52 +01:00
71bebbeb09 Update the stuff 2014-10-08 16:44:46 +02:00
503b9a0125 StandardError -> Exception
Try to add some python codes [untested]
2014-10-08 12:20:40 +02:00
a4921558f3 Fix error in update script [untested]
https://forum.minetest.net/viewtopic.php?p=156986#p156986
2014-10-05 18:26:25 +02:00
8d5709661f Fix dat weird stuff. 2014-08-29 22:02:35 +02:00
7c25df22dc Add default; do not use character.x 2014-07-30 17:49:51 +02:00
29332b7cf3 Typo? 2014-07-23 19:09:43 +02:00
343a08e44a Update - fix some errors 2014-07-23 19:06:46 +02:00
4b4aa7fd4c Readme update 2014-07-23 13:53:46 +02:00
88b801b2c0 Add Win32.NET updater 2014-07-23 13:48:56 +02:00
dc44a8805f Update 2014-07-23 13:46:42 +02:00
623 changed files with 642 additions and 867 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
character_*.png
character_*.txt

200
MT_skins_updater.cs Normal file
View File

@ -0,0 +1,200 @@
using System;
//Json.NET library (http://json.codeplex.com/)
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Net;
using System.IO;
// MT skins updater for the u_skins mod
// Creator: Krock
// License: zlib (http://www.zlib.net/zlib_license.html)
namespace MT_skins_updater {
class Program {
static void Main(string[] args) {
Console.WriteLine("Welcome to the MT skins updater!");
Console.WriteLine("# Created by: Krock (2014-07-10)");
Engine e = new Engine();
Console.WriteLine(@"Path to the u_skins mod: (ex. 'E:\Minetest\mods\u_skinsdb\u_skins\')");
string path = Console.ReadLine();
Console.WriteLine("Start updating at page: ('0' to update everything)");
int page = getInt(Console.ReadLine());
e.Start(path, page);
Console.WriteLine("Press any key to exit.");
Console.ReadKey(false);
}
public static int getInt(string i) {
int ret = 0;
int.TryParse(i, out ret);
return (ret > 0)? ret : 0;
}
}
class Engine {
string root = "http://minetest.fensta.bplaced.net";
bool alternate = true; //should it use the special version of medadata saving?
public void Start(string path, int page) {
if (path.Length < 5) {
Console.WriteLine("Too short path. STOP.");
return;
}
if (path[path.Length - 1] != '\\') {
path += '\\';
}
if(!Directory.Exists(path + "meta")){
Console.WriteLine("Folder 'meta' not found. STOP.");
return;
}
if(!Directory.Exists(path + "textures")){
Console.WriteLine("Folder 'textures' not found. STOP.");
return;
}
WebClient cli = new WebClient();
//add useragent to identify
cli.Headers.Add("User-Agent", "MT_skin_grabber 1.1");
bool firstSkin = true;
List<string> skin_local = new List<string>();
int pages = page,
updated = 0;
for (; page <= pages; page++) {
string contents = "";
try {
contents = cli.DownloadString(root + "/api/get.json.php?getlist&page=" + page);
} catch(WebException e) {
Console.WriteLine("Whoops! Error at page ID: " + page + ". WebClient sais: " + e.Message);
Console.WriteLine("Press any key to skip this page.");
Console.ReadKey(false);
continue;
}
Data o = JsonConvert.DeserializeObject<Data>(contents);
if (o.pages != pages) {
pages = o.pages;
}
Console.WriteLine("# Page " + page + " (" + o.per_page + " skins)");
for (int i = 0; i < o.skins.Length; i++) {
int id = o.skins[i].id;
if(o.skins[i].type != "image/png"){
Console.WriteLine("Image type '" + o.skins[i].type + "' not supported at skin ID: " + id);
Console.WriteLine("Press any key to continue.");
Console.ReadKey(false);
continue;
}
//eliminate special chars!
o.skins[i].name = WebUtility.HtmlDecode(o.skins[i].name);
o.skins[i].author = WebUtility.HtmlDecode(o.skins[i].author);
//to delete old, removed skins
if (firstSkin) {
firstSkin = false;
string[] files = Directory.GetFiles(path + "textures\\");
for (int f = 0; f < files.Length; f++) {
string[] filePath = stringSplitLast(files[f], '\\'),
fileName = stringSplitLast(filePath[1], '.'),
fileVer = stringSplitLast(fileName[0], '_');
if (fileVer[1] == "" || fileVer[0] != "character") continue;
int skinNr = Program.getInt(fileVer[1]);
if (skinNr <= id) continue;
skin_local.Add(fileName[0]);
}
} else skin_local.Remove("character_" + id);
//get file size, only override changed
FileInfo localImg = new FileInfo(path + "textures\\character_" + id + ".png");
byte[] imageData = Convert.FromBase64String(o.skins[i].img);
bool isDif = true;
if (localImg.Exists) isDif = (Math.Abs(imageData.Length - localImg.Length) >= 3);
if (isDif) {
File.WriteAllBytes(localImg.FullName, imageData);
imageData = null;
//previews
try {
cli.DownloadFile(root + "/skins/1/" + id + ".png", path + "textures\\character_" + id + "_preview.png");
} catch (WebException e) {
Console.WriteLine("Whoops! Error at skin ID: " + id + ". WebClient sais: " + e.Message);
Console.WriteLine("Press any key to continue.");
Console.ReadKey(false);
}
} else {
Console.WriteLine("[SKIP] character_" + id);
continue;
}
string meta = "";
if (!alternate) {
meta = "name = \"" + o.skins[i].name + "\",\n";
meta += "author = \"" + o.skins[i].author + "\",\n";
meta += "comment = \"" + o.skins[i].license + '"';
} else {
meta = o.skins[i].name + '\n' + o.skins[i].author + '\n' + o.skins[i].license;
}
File.WriteAllText(path + "meta\\character_" + id + ".txt", meta);
updated++;
Console.WriteLine("[" + id + "] " + shorten(o.skins[i].name, 20) + "\t by: " + o.skins[i].author + "\t (" + o.skins[i].license + ")");
}
}
foreach (string fileName in skin_local) {
if(File.Exists(path + "textures\\" + fileName + ".png")) {
File.Delete(path + "textures\\" + fileName + ".png");
}
if(File.Exists(path + "textures\\" + fileName + "_preview.png")) {
File.Delete(path + "textures\\" + fileName + "_preview.png");
}
if(File.Exists(path + "meta\\" + fileName + ".txt")) {
File.Delete(path + "meta\\" + fileName + ".txt");
}
Console.WriteLine("[DEL] " + fileName + " (deleted skin)");
}
Console.WriteLine("Done. Updated " + updated + " skins!");
}
string shorten(string inp, int len) {
char[] shr = new char[len];
for (int i = 0; i < len; i++) {
if (i < inp.Length) {
shr[i] = inp[i];
} else shr[i] = ' ';
}
return new string(shr);
}
string[] stringSplitLast(string path, char limiter) {
int found = 0;
int totalLen = path.Length - 1;
for (int i = totalLen; i >= 0; i--) {
if (path[i] == limiter) {
found = i;
break;
}
}
if (found == 0) {
return new string[] { "", "" };
}
int len = totalLen - found;
char[] str_1 = new char[found],
str_2 = new char[len];
for (int i = 0; i < path.Length; i++) {
if (i == found) continue;
if (i < found) {
str_1[i] = path[i];
} else {
str_2[i - found - 1] = path[i];
}
}
return new string[] { new string(str_1), new string(str_2) };
}
}
class Data {
public Skins_data[] skins;
public int page, pages, per_page;
}
class Skins_data {
public string name, author, uploaded, type, license, img;
public int id, license_id;
}
}

BIN
MT_skins_updater.exe Normal file

Binary file not shown.

BIN
Newtonsoft.Json.dll Normal file

Binary file not shown.

27
README
View File

@ -1,21 +1,28 @@
minetest-u_skins minetest-u_skins
================ ================
An skin extention for the Minetest mod unified_inventory by Dean Montgomery
Skins mod for minetest unified_inventory by Dean Montgomery - feel free to merge it into skinsdb or unified_inventory git. It downloads the skins from the Minetest skin database. (http://minetest.fensta.bplaced.net)
Requires latest unified_inventory from: Requires latest unified_inventory from:
https://github.com/minetest-technic/unified_inventory https://github.com/minetest-technic/unified_inventory
This is the "u_skindb" branch, it is ment to download the skins from addi's skin database (http://minetest.fensta.bplaced.net). To download the latest skins you need to run:
"./update_from_db.py" OR
the win32.NET client
To re-download the latest skins you have 2 ways: Licenses:
1, if you have blender) Run the script "update_from_db.py" OR "update_from_db2.py" --------
and then "./generate_previews.sh"
2, if you are lazy) Run the script "update_from_db_hacky.py" cornernote:
and then make sure, you have set "u_skins.used_hacky" to "true" in "./u_skins/init.lua" Lua source code (GPLv3)
Fritigern:
update_skins_db.sh (CC-BY-NC-SA 4.0)
Krock:
Lua source code (GPLv3)
MT_skins_updater.exe (WTFPL)
Credits: Credits:
MirceaKitsune (WTFPL) + bundled script by Zeg9 (WTFPL too): --------
skin_previews.blend
RealyBadAngel unified_inventory and Zeg9 skinsdb RealyBadAngel unified_inventory and Zeg9 skinsdb

View File

@ -1,48 +0,0 @@
#!/bin/sh
# This script is used to generate the previews needed by the mod
# It requires blender with the latest python API (2.6x is tested)
# A script that works with older blenders and, maybe, without python, is available in older commits.
# This script can also use pngcrush and imagemagick to reduce output size,
# please enable them if you want to push to the git repository of the mod.
# Pngcrush output will be written to .previews/pngcrush_output
# Warning: any file in .previews/ and u_skins/textures might be deleted without asking.
PNGCRUSH=true
IMAGEMAGICK=true
cd .previews
rm ../u_skins/textures/*_preview*.png # Remove all previous previews
blender -b skin_previews.blend --python-text "Generate previews" > /dev/null
if $IMAGEMAGICK
then echo "Stripping metadata from generated files..."
else echo "Moving files..."
fi
rm -rf output # remove my output
mkdir -p output
for i in blender_out/character_*_00.png;
do
out_name=$(basename $i | sed -e 's/_00.png//g')
out_file=output/"$out_name"_preview.png
if $IMAGEMAGICK
then
convert -strip $i $out_file
else
mv $i $out_file
fi
done
for i in blender_out/character_*_01.png;
do
out_name=$(basename $i | sed -e 's/_01.png//g')
out_file=output/"$out_name"_preview_back.png
if $IMAGEMAGICK
then
convert -strip $i $out_file
else
mv $i $out_file
fi
done
if $PNGCRUSH
then
echo "Running pngcrush..."
pngcrush -d ../u_skins/textures/ output/*_preview*.png 2> pngcrush_output
else mv output/*_preview*.png ../u_skins/textures/
fi
echo "Done !"

View File

@ -1,59 +0,0 @@
#!/bin/bash
SPRITES=$(find -regextype sed -regex '.*/player_[0-9]\{1,\}.png' | sort -V)
MODELS=$(find -regextype sed -regex '.*/character_[0-9]\{1,\}.png' | sort -V)
function ask_for_meta {
convert $2 -scale 100x200 /tmp/skins_set_meta
SNAME=$(basename $1)
SNAME=${SNAME%.*}
METAFILE=u_skins/meta/$SNAME.txt
FORCE=$3
if $FORCE || ! [ -f $METAFILE ]
then
echo $METAFILE
YADOUT=$(yad --form --image=/tmp/skins_set_meta --field $SNAME:LBL --field=Name --field=Author --field=Description --field=Comment)
if [ -z "$YADOUT" ]; then exit; fi # canceled
OIFS="$IFS"
IFS='|'
read -a VALUES <<< "$YADOUT"
IFS="$OIFS"
NAME=${VALUES[1]}
AUTHOR=${VALUES[2]}
DESCRIPTION=${VALUES[3]}
COMMENT=${VALUES[4]}
if [ -n "$NAME" ] && [ -n "$AUTHOR" ]
then
echo -n > $METAFILE # clear it
echo 'name = "'$NAME'",' >> $METAFILE
echo 'author = "'$AUTHOR'",' >> $METAFILE
# only write description and comment if they are specified
if [ -n "$DESCRIPTION" ]
then
echo 'description = "'$DESCRIPTION'",' >> $METAFILE
fi
if [ -n "$COMMENT" ]
then
echo 'comment = "'$COMMENT'",' >> $METAFILE
fi
echo "Saved !"
fi
fi
}
if [ -z $1 ]
then
for i in $SPRITES
do
ask_for_meta $i $i false
done
for i in $MODELS
do
ask_for_meta $i ${i%.*}_preview.png false
done
else
if [ -f ${1%.*}_preview.png ]
then
ask_for_meta $1 ${1%.*}_preview.png true
else
ask_for_meta $1 $1 true
fi
fi
rm /tmp/skins_set_meta

View File

@ -1,2 +1,3 @@
unified_inventory? unified_inventory
default default
simple_skins?

View File

@ -3,82 +3,88 @@
-- Copyright (c) 2012 cornernote, Dean Montgomery -- Copyright (c) 2012 cornernote, Dean Montgomery
-- License: GPLv3 -- License: GPLv3
u_skins = {} u_skins = {}
u_skins.type = { SPRITE=0, MODEL=1 } u_skins.modpath = minetest.get_modpath("u_skins")
u_skins.file = minetest.get_worldpath().."/u_skins.mt"
u_skins.default = "character_1"
u_skins.pages = {} u_skins.pages = {}
u_skins.u_skins = {} u_skins.u_skins = {}
u_skins.used_hacky = false -- set to true if used hacky way to update skins u_skins.file_save = false
u_skins.simple_skins = false
-- ( Deprecated
u_skins.type = { SPRITE=0, MODEL=1, ERROR=99 }
u_skins.get_type = function(texture) u_skins.get_type = function(texture)
if not texture then return end if not u_skins.is_skin(texture) then
if string.sub(texture,0,string.len("character")) == "character" then return u_skins.type.ERROR
end
return u_skins.type.MODEL return u_skins.type.MODEL
end end
if string.sub(texture,0,string.len("player")) == "player" then -- )
return u_skins.type.SPRITE
u_skins.is_skin = function(texture)
if not texture then
return false
end end
if not u_skins.meta[texture] then
return false
end
return true
end end
u_skins.modpath = minetest.get_modpath("u_skins")
dofile(u_skins.modpath.."/skinlist.lua") dofile(u_skins.modpath.."/skinlist.lua")
dofile(u_skins.modpath.."/meta.lua")
dofile(u_skins.modpath.."/players.lua") dofile(u_skins.modpath.."/players.lua")
if rawget(_G, "skins") then
u_skins.simple_skins = true
end
u_skins.update_player_skin = function(player) u_skins.update_player_skin = function(player)
name = player:get_player_name() local name = player:get_player_name()
if u_skins.get_type(u_skins.u_skins[name]) == u_skins.type.SPRITE then if u_skins.simple_skins and u_skins.u_skins[name] == u_skins.default then
player:set_properties({ return
visual = "upright_sprite",
textures = {u_skins.u_skins[name]..".png",u_skins.u_skins[name].."_back.png"},
visual_size = {x=1, y=2},
})
elseif u_skins.get_type(u_skins.u_skins[name]) == u_skins.type.MODEL then
player:set_properties({
visual = "mesh",
mesh = "character.x",
textures = {u_skins.u_skins[name]..".png"},
visual_size = {x=1, y=1},
})
end end
u_skins.save()
if not u_skins.is_skin(u_skins.u_skins[name]) then
u_skins.u_skins[name] = u_skins.default
end
player:set_properties({
textures = {u_skins.u_skins[name]..".png"},
})
end end
-- Display Current Skin -- Display Current Skin
unified_inventory.register_page("u_skins", { unified_inventory.register_page("u_skins", {
get_formspec = function(player) get_formspec = function(player)
name = player:get_player_name() local name = player:get_player_name()
local formspec = "background[0.06,0.99;7.92,7.52;ui_misc_form.png]" if not u_skins.is_skin(u_skins.u_skins[name]) then
if u_skins.get_type(u_skins.u_skins[name]) == u_skins.type.MODEL then u_skins.u_skins[name] = u_skins.default
formspec = formspec.."image[0,.75;1,2;"..u_skins.u_skins[name].."_preview.png]"
if not u_skins.used_hacky then
-- player back view
formspec = formspec.."image[1,.75;1,2;"..u_skins.u_skins[name].."_preview_back.png]"
end end
formspec = formspec.."label[6,.5;Raw texture:]"
.."image[6,1;2,1;"..u_skins.u_skins[name]..".png]"
else local formspec = ("background[0.06,0.99;7.92,7.52;ui_misc_form.png]"
formspec = formspec .."image[0,.75;1,2;"..u_skins.u_skins[name].."_preview.png]"
.. "image[0,.75;1,2;"..u_skins.u_skins[name]..".png]" .."label[6,.5;Raw texture:]"
.. "image[1,.75;1,2;"..u_skins.u_skins[name].."_back.png]" .."image[6,1;2,1;"..u_skins.u_skins[name]..".png]")
end
local meta = u_skins.meta[u_skins.u_skins[name]] local meta = u_skins.meta[u_skins.u_skins[name]]
if meta then if meta then
if meta.name then if meta.name ~= "" then
formspec = formspec .. "label[2,.5;Name: "..meta.name.."]" formspec = formspec.."label[2,.5;Name: "..minetest.formspec_escape(meta.name).."]"
end end
if meta.author then if meta.author ~= "" then
formspec = formspec .. "label[2,1;Author: "..meta.author.."]" formspec = formspec.."label[2,1;Author: "..minetest.formspec_escape(meta.author).."]"
end end
if meta.description then if meta.license ~= "" then
formspec = formspec .. "label[2,1.5;"..meta.description.."]" formspec = formspec.."label[2,1.5;License: "..minetest.formspec_escape(meta.license).."]"
end end
if meta.comment then if meta.description ~= "" then --what's that??
formspec = formspec .. 'label[2,2;"'..meta.comment..'"]' formspec = formspec.."label[2,2;Description: "..minetest.formspec_escape(meta.description).."]"
end end
end end
local page = 0
formspec = formspec .. "button[.75,3;6.5,.5;u_skins_page_0;Change]" if u_skins.pages[name] then
page = u_skins.pages[name]
end
formspec = formspec .. "button[.75,3;6.5,.5;u_skins_page$"..page..";Change]"
return {formspec=formspec} return {formspec=formspec}
end, end,
}) })
@ -89,67 +95,81 @@ unified_inventory.register_button("u_skins", {
}) })
-- Create all of the skin-picker pages. -- Create all of the skin-picker pages.
for x = 0, math.floor(#u_skins.list/16+1) do
unified_inventory.register_page("u_skins_page_"..x, { u_skins.generate_pages = function(texture)
get_formspec = function(player) local page = 0
page = u_skins.pages[player:get_player_name()] local pages = {}
if page == nil then page = 0 end
local formspec = "background[0.06,0.99;7.92,7.52;ui_misc_form.png]"
local index = 0
local skip = 0 -- Skip u_skins, used for pages
-- skin thumbnails
for i, skin in ipairs(u_skins.list) do for i, skin in ipairs(u_skins.list) do
if skip < page*16 then skip = skip + 1 else local p_index = (i - 1) % 16
if index < 16 then if p_index == 0 then
formspec = formspec .. "image_button["..(index%8)..","..((math.floor(index/8))*2)..";1,2;"..skin page = page + 1
if u_skins.get_type(skin) == u_skins.type.MODEL then pages[page] = {}
formspec = formspec .. "_preview"
end end
formspec = formspec .. ".png;u_skins_set_"..i..";]" pages[page][p_index + 1] = {i, skin}
end end
index = index +1 local total_pages = page
page = 1
for page, arr in ipairs(pages) do
local formspec = "background[0.06,0.99;7.92,7.52;ui_misc_form.png]"
local y = -0.1
for i, skin in ipairs(arr) do
local x = (i - 1) % 8
if i > 1 and x == 0 then
y = 1.8
end end
formspec = (formspec.."image_button["..x..","..y..";1,2;"..
skin[2].."_preview.png;u_skins_set$"..skin[1]..";]"..
"tooltip[u_skins_set$"..skin[1]..";"..u_skins.meta[skin[2]].name.."]")
end end
-- prev next page buttons local page_prev = page - 2
if page > 0 then local page_next = page
formspec = formspec .. "button[0,4;1,.5;u_skins_page_"..(page-1)..";<<]" if page_prev < 0 then
else page_prev = total_pages - 1
formspec = formspec .. "button[0,4;1,.5;u_skins_page_"..page..";<<]"
end end
formspec = formspec .. "button[.75,4;6.5,.5;u_skins_page_"..page..";Page "..(page+1).."/"..math.floor(#u_skins.list/16+1).."]" -- a button is used so text is centered if page_next >= total_pages then
if index > 16 then page_next = 0
formspec = formspec .. "button[7,4;1,.5;u_skins_page_"..(page+1)..";>>]"
else
formspec = formspec .. "button[7,4;1,.5;u_skins_page_"..page..";>>]"
end end
formspec = (formspec
.."button[0,3.8;1,.5;u_skins_page$"..page_prev..";<<]"
.."button[.75,3.8;6.5,.5;u_skins_null;Page "..page.."/"..total_pages.."]"
.."button[7,3.8;1,.5;u_skins_page$"..page_next..";>>]")
unified_inventory.register_page("u_skins_page$"..(page - 1), {
get_formspec = function(player)
return {formspec=formspec} return {formspec=formspec}
end, end
}) })
end end
end
-- click button handlers -- click button handlers
minetest.register_on_player_receive_fields(function(player, formname, fields) minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.u_skins then if fields.u_skins then
unified_inventory.set_inventory_formspec(player, "craft") unified_inventory.set_inventory_formspec(player, "craft")
return
end end
for field, _ in pairs(fields) do for field, _ in pairs(fields) do
if string.sub(field,0,string.len("u_skins_set_")) == "u_skins_set_" then local current = string.split(field, "$", 2)
u_skins.u_skins[player:get_player_name()] = u_skins.list[tonumber(string.sub(field,string.len("u_skins_set_")+1))] if current[1] == "u_skins_set" then
u_skins.u_skins[player:get_player_name()] = u_skins.list[tonumber(current[2])]
u_skins.update_player_skin(player) u_skins.update_player_skin(player)
u_skins.file_save = true
unified_inventory.set_inventory_formspec(player, "u_skins") unified_inventory.set_inventory_formspec(player, "u_skins")
end elseif current[1] == "u_skins_page" then
if string.sub(field,0,string.len("u_skins_page_")) == "u_skins_page_" then u_skins.pages[player:get_player_name()] = current[2]
u_skins.pages[player:get_player_name()] = tonumber(string.sub(field,string.len("u_skins_page_")+1)) unified_inventory.set_inventory_formspec(player, "u_skins_page$"..current[2])
unified_inventory.set_inventory_formspec(player,"u_skins_page_"..u_skins.pages[player:get_player_name()])
end end
end end
end) end)
-- set defaults -- Change skin on join - reset if invalid
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
if not u_skins.u_skins[player:get_player_name()] then local player_name = player:get_player_name()
u_skins.u_skins[player:get_player_name()] = "character_1" if not u_skins.is_skin(u_skins.u_skins[player_name]) then
u_skins.u_skins[player_name] = u_skins.default
end end
u_skins.update_player_skin(player) u_skins.update_player_skin(player)
end) end)
u_skins.generate_pages()
u_skins.load_players()

View File

@ -1,15 +0,0 @@
u_skins.meta = {}
for _, i in ipairs(u_skins.list) do
u_skins.meta[i] = {}
local f = io.open(u_skins.modpath.."/meta/"..i..".txt")
local data = nil
if f then
data = minetest.deserialize("return {"..f:read('*all').."}")
f:close()
end
data = data or {}
u_skins.meta[i].name = data.name or ""
u_skins.meta[i].author = data.author or ""
u_skins.meta[i].description = data.description or nil
u_skins.meta[i].comment = data.comment or nil
end

View File

@ -1,3 +1,3 @@
name = "Sam 0", Sam 0
author = "Jordach", Jordach
comment = "CC BY-SA 3.0", CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
name = "Tuxedo Sam",
author = "Jordach",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Ladyvioletkitty",
author = "lordphoenixmh",
comment = "CC BY 4.0",

View File

@ -1,3 +0,0 @@
name = "4&deg;district",
author = "Ferdi Napoli",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Chop",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Franklin",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Trevor",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Bart Simpson",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Creeper",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "War Machine",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Gangnam Style",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Sonic The Hedgehog",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Semmett9",
author = "Infinatum",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Charizard",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Scarlet Spider-man",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Ferdi Napoli",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Finn The Adventured",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Jake",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Ferdi Napoli Reserve",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Joker",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Bleau Steve",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Deadpool Bleau",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Seth Rollins",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "John",
author = "Evergreen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Daffy Duck",
author = "LuxAtheris",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "DareDevil",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Clone",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Banana Guy",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Rubber",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Gothic Sam",
author = "GingerHunter797",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Tails",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Aguia Explorer",
author = "Davizinho",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Toad",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "oOChainLynxOo",
author = "oOChainLynxOo",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "rotor112",
author = "rotor112",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "amazing spiderman",
author = "mateus",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "black spiderman",
author = "mateus",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Sam Mese Tee",
author = "oOChainLynxOo",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Jesus",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Wires",
author = "Geopbyte",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Vector",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Fire Mario",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "skin minecraft",
author = "lestouem",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "santa",
author = "https://dl.dropbox.com/s/cs0vhq8kkzpcvre/santa.zip?dl=1",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "PenguinDad",
author = "PenguinDad",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Older Man Sam",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Army",
author = "Ragnar",
comment = "CC BY-NC-SA 4.0",

View File

@ -1,3 +0,0 @@
name = "New Ferdi Napoli Skin",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Mcc457",
author = "Ferdi Napoli",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Jan",
author = "Jan",
comment = "CC BY 4.0",

View File

@ -1,3 +0,0 @@
name = "PilzAdam",
author = "PilzAdam",
comment = "CC BY 4.0",

View File

@ -1,3 +0,0 @@
name = "Renan123",
author = "sou o melhor",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "PenguinDad with Cape",
author = "PenguinDad",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Adarqet",
author = "Adarqet",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Adarqet(Cape)",
author = "Adarqet",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "wither",
author = "mario alberto",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "G-Robo v5000",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Cywalk Sam",
author = "w_laenger",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "rantathe",
author = "ranta",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "ranta mk 2",
author = "ranta",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "jojoa1997",
author = "jojoa1997",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Zenohelds default player",
author = "sdzen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Sdzen",
author = "sdzen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "horrible spring sdzen",
author = "sdzen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +1,3 @@
name = "Sam I", Sam I
author = "Jordach", Jordach
comment = "CC BY-SA 3.0", CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
name = "B",
author = "sdzen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Demon Farmer Sam (ray8888 server)",
author = "sdzen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Tree",
author = "Evergreen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Interstella 5555 guitarist",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Brett Favre",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Summer Sam",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Female Sam II",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Space Sam",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Tree",
author = "Evergreen",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "steel man",
author = "rotor112",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Sam II",
author = "Jordach",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "philipbenr",
author = "philipbenr",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "vf",
author = "vf",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Summer",
author = "lizzie",
comment = "CC BY-NC-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "jojoa1997 2",
author = "jojoa1997",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "warrior",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "NERD",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "pj time",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "adventure",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "marthon",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "DASHING",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "Zeg9",
author = "Zeg9",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "ALTNINJA",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "NK",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

View File

@ -1,3 +0,0 @@
name = "BORN",
author = "DJOZZY",
comment = "CC BY-SA 3.0",

Some files were not shown because too many files have changed in this diff Show More