mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-25 08:50:18 +01:00
Merge branch 'master' into contentdb
This commit is contained in:
commit
dcca582ef3
@ -1,4 +1,4 @@
|
|||||||
local S = skins.S
|
local S = minetest.get_translator("skinsdb")
|
||||||
|
|
||||||
local function show_selection_formspec(player)
|
local function show_selection_formspec(player)
|
||||||
local context = skins.get_formspec_context(player)
|
local context = skins.get_formspec_context(player)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
default
|
default
|
||||||
intllib?
|
|
||||||
unified_inventory?
|
unified_inventory?
|
||||||
3d_armor?
|
3d_armor?
|
||||||
clothing?
|
clothing?
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local S = skins.S
|
local S = minetest.get_translator("skinsdb")
|
||||||
|
|
||||||
function skins.get_formspec_context(player)
|
function skins.get_formspec_context(player)
|
||||||
if player then
|
if player then
|
||||||
|
65
init.lua
65
init.lua
@ -3,18 +3,13 @@
|
|||||||
-- Copyright (c) 2012 cornernote, Dean Montgomery
|
-- Copyright (c) 2012 cornernote, Dean Montgomery
|
||||||
-- Rework 2017 by bell07
|
-- Rework 2017 by bell07
|
||||||
-- License: GPLv3
|
-- License: GPLv3
|
||||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
|
||||||
|
|
||||||
skins = {}
|
skins = {}
|
||||||
skins.modpath = minetest.get_modpath(minetest.get_current_modname())
|
skins.modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||||
skins.default = "character"
|
skins.default = "character"
|
||||||
|
|
||||||
local S
|
local S = minetest.get_translator("skinsdb")
|
||||||
if minetest.get_modpath("intllib") then
|
print("Translator:", dump(S))
|
||||||
skins.S = intllib.Getter()
|
|
||||||
else
|
|
||||||
skins.S = function(s) return s end
|
|
||||||
end
|
|
||||||
|
|
||||||
dofile(skins.modpath.."/skin_meta_api.lua")
|
dofile(skins.modpath.."/skin_meta_api.lua")
|
||||||
dofile(skins.modpath.."/api.lua")
|
dofile(skins.modpath.."/api.lua")
|
||||||
@ -73,42 +68,20 @@ minetest.register_on_leaveplayer(function(player)
|
|||||||
skins.ui_context[player:get_player_name()] = nil
|
skins.ui_context[player:get_player_name()] = nil
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if minetest.global_exists("player_api") then
|
player_api.register_model("skinsdb_3d_armor_character_5.b3d", {
|
||||||
-- Minetest-5 and above compatible
|
animation_speed = 30,
|
||||||
player_api.register_model("skinsdb_3d_armor_character_5.b3d", {
|
textures = {
|
||||||
animation_speed = 30,
|
"blank.png",
|
||||||
textures = {
|
"blank.png",
|
||||||
"blank.png",
|
"blank.png",
|
||||||
"blank.png",
|
"blank.png"
|
||||||
"blank.png",
|
},
|
||||||
"blank.png"
|
animations = {
|
||||||
},
|
stand = {x=0, y=79},
|
||||||
animations = {
|
lay = {x=162, y=166},
|
||||||
stand = {x=0, y=79},
|
walk = {x=168, y=187},
|
||||||
lay = {x=162, y=166},
|
mine = {x=189, y=198},
|
||||||
walk = {x=168, y=187},
|
walk_mine = {x=200, y=219},
|
||||||
mine = {x=189, y=198},
|
sit = {x=81, y=160},
|
||||||
walk_mine = {x=200, y=219},
|
},
|
||||||
sit = {x=81, y=160},
|
})
|
||||||
},
|
|
||||||
})
|
|
||||||
else
|
|
||||||
-- Minetest-0.4 compatible
|
|
||||||
default.player_register_model("skinsdb_3d_armor_character.b3d", {
|
|
||||||
animation_speed = 30,
|
|
||||||
textures = {
|
|
||||||
"blank.png",
|
|
||||||
"blank.png",
|
|
||||||
"blank.png",
|
|
||||||
"blank.png",
|
|
||||||
},
|
|
||||||
animations = {
|
|
||||||
stand = {x=0, y=79},
|
|
||||||
lay = {x=162, y=166},
|
|
||||||
walk = {x=168, y=187},
|
|
||||||
mine = {x=189, y=198},
|
|
||||||
walk_mine = {x=200, y=219},
|
|
||||||
sit = {x=81, y=160},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
# Translation by Xanthin
|
|
||||||
|
|
||||||
Raw texture = Rohtextur
|
|
||||||
Name = Name
|
|
||||||
Author = Autor
|
|
||||||
Change = Wechseln
|
|
||||||
Page = Seite
|
|
||||||
License = Lizenz
|
|
||||||
Description = Beschreibung
|
|
||||||
Show, list or set player's skin = Anzeigen oder setzen der Spieler-Skins
|
|
||||||
Player not found = Spieler nicht da
|
|
||||||
unknown command = unbekannter Befehl
|
|
||||||
see /help skinsdb for supported parameters = Lese /help für erlaubte Parameter
|
|
||||||
skin set to = Skin ist jetzt
|
|
||||||
invalid skin = unbekannter Skin
|
|
||||||
unknown parameter = unbekannter Parameter
|
|
@ -1,18 +0,0 @@
|
|||||||
# Template
|
|
||||||
|
|
||||||
Raw texture = Texture
|
|
||||||
Name = Nom
|
|
||||||
Author = Auteur
|
|
||||||
Change = Changer
|
|
||||||
Page = Page
|
|
||||||
License = Licence
|
|
||||||
Description = Description
|
|
||||||
Show, list or set player's skin = Afficher, lister ou définir le skin du joueur
|
|
||||||
Player not found = Joueur non trouvé
|
|
||||||
unknown command = commande inconnue
|
|
||||||
see /help skinsdb for supported parameters = voir /help skinsdb pour les paramètres supportés
|
|
||||||
skin set to = skin définie sur
|
|
||||||
invalid skin = skin peau invalide
|
|
||||||
unknown parameter = paramètre inconnu
|
|
||||||
unknown skin = skin inconnue
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
# Malay translation by muhdnurhidayat
|
|
||||||
|
|
||||||
Raw texture = Tekstur mentah
|
|
||||||
Name = Nama
|
|
||||||
Author = Pencipta
|
|
||||||
Change = Ubah
|
|
||||||
Page = Halaman
|
|
||||||
License = Lesen
|
|
||||||
Description = Keterangan
|
|
||||||
Show, list or set player's skin = Tunjukkan, senaraikan atau tetapkan kulit pemain
|
|
||||||
Player not found = Pemain tidak dijumpai
|
|
||||||
unknown command = perintah tidak diketahui
|
|
||||||
see /help skinsdb for supported parameters = lihat /help skinsdb untuk parameter yang disokong
|
|
||||||
skin set to = kulit ditetapkan kepada
|
|
||||||
invalid skin = kulit tidak sah
|
|
||||||
unknown parameter = parameter tidak diketahui
|
|
||||||
unknown skin = kulit tidak diketahui
|
|
17
locale/skinsdb.de.tr
Normal file
17
locale/skinsdb.de.tr
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# textdomain: skinsdb
|
||||||
|
# Translation by Xanthin
|
||||||
|
|
||||||
|
Raw texture=Rohtextur
|
||||||
|
Name=Name
|
||||||
|
Author=Autor
|
||||||
|
Change=Wechseln
|
||||||
|
Page=Seite
|
||||||
|
License=Lizenz
|
||||||
|
Description=Beschreibung
|
||||||
|
Show, list or set player's skin=Anzeigen oder setzen der Spieler-Skins
|
||||||
|
Player not found=Spieler nicht da
|
||||||
|
unknown command=unbekannter Befehl
|
||||||
|
see /help skinsdb for supported parameters=Lese /help für erlaubte Parameter
|
||||||
|
skin set to=Skin ist jetzt
|
||||||
|
invalid skin=unbekannter Skin
|
||||||
|
unknown parameter=unbekannter Parameter
|
18
locale/skinsdb.fr.tr
Normal file
18
locale/skinsdb.fr.tr
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# textdomain: skinsdb
|
||||||
|
|
||||||
|
Raw texture=Texture
|
||||||
|
Name=Nom
|
||||||
|
Author=Auteur
|
||||||
|
Change=Changer
|
||||||
|
Page=Page
|
||||||
|
License=Licence
|
||||||
|
Description=Description
|
||||||
|
Show, list or set player's skin=Afficher, lister ou définir le skin du joueur
|
||||||
|
Player not found=Joueur non trouvé
|
||||||
|
unknown command=commande inconnue
|
||||||
|
see /help skinsdb for supported parameters=voir /help skinsdb pour les paramètres supportés
|
||||||
|
skin set to=skin définie sur
|
||||||
|
invalid skin=skin peau invalide
|
||||||
|
unknown parameter=paramètre inconnu
|
||||||
|
unknown skin=skin inconnue
|
||||||
|
|
18
locale/skinsdb.ms.tr
Normal file
18
locale/skinsdb.ms.tr
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# textdomain: skinsdb
|
||||||
|
# Malay translation by muhdnurhidayat
|
||||||
|
|
||||||
|
Raw texture=Tekstur mentah
|
||||||
|
Name=Nama
|
||||||
|
Author=Pencipta
|
||||||
|
Change=Ubah
|
||||||
|
Page=Halaman
|
||||||
|
License=Lesen
|
||||||
|
Description=Keterangan
|
||||||
|
Show, list or set player's skin=Tunjukkan, senaraikan atau tetapkan kulit pemain
|
||||||
|
Player not found=Pemain tidak dijumpai
|
||||||
|
unknown command=perintah tidak diketahui
|
||||||
|
see /help skinsdb for supported parameters=lihat /help skinsdb untuk parameter yang disokong
|
||||||
|
skin set to=kulit ditetapkan kepada
|
||||||
|
invalid skin=kulit tidak sah
|
||||||
|
unknown parameter=parameter tidak diketahui
|
||||||
|
unknown skin=kulit tidak diketahui
|
19
locale/skinsdb.zh_CN.tr
Normal file
19
locale/skinsdb.zh_CN.tr
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# textdomain: skinsdb
|
||||||
|
#Translation by IFRFSX(BingFengFSX)
|
||||||
|
|
||||||
|
Raw texture=自然状态的纹理
|
||||||
|
Name=名称
|
||||||
|
Author=作者
|
||||||
|
Change=更换
|
||||||
|
Page=页面
|
||||||
|
License=许可证
|
||||||
|
Description=说明
|
||||||
|
Show, list or set player's skin=显示,列出或者设置玩家的皮肤
|
||||||
|
Player not found=玩家未找到
|
||||||
|
unknown command=未知命令
|
||||||
|
see /help skinsdb for supported parameters=有关skinsdb支持的参数,参见 /help
|
||||||
|
skin set to=皮肤设置为
|
||||||
|
invalid skin=无效皮肤
|
||||||
|
unknown parameter=未知参数
|
||||||
|
unknown skin=未知皮肤
|
||||||
|
Downloads the specified range of skins and shuts down the server=下载指定范围的皮肤并关闭服务器
|
@ -1,17 +1,17 @@
|
|||||||
# Template
|
# textdomain: skinsdb
|
||||||
|
|
||||||
Raw texture =
|
Raw texture=
|
||||||
Name =
|
Name=
|
||||||
Author =
|
Author=
|
||||||
Change =
|
Change=
|
||||||
Page =
|
Page=
|
||||||
License =
|
License=
|
||||||
Description =
|
Description=
|
||||||
Show, list or set player's skin =
|
Show, list or set player's skin=
|
||||||
Player not found =
|
Player not found=
|
||||||
unknown command =
|
unknown command=
|
||||||
see /help skinsdb for supported parameters =
|
see /help skinsdb for supported parameters=
|
||||||
skin set to =
|
skin set to=
|
||||||
invalid skin =
|
invalid skin=
|
||||||
unknown parameter =
|
unknown parameter=
|
||||||
unknown skin =
|
unknown skin=
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -73,13 +73,9 @@ function skin_class:apply_skin_to_player(player)
|
|||||||
|
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
local ver = self:get_meta("format") or "1.0"
|
local ver = self:get_meta("format") or "1.0"
|
||||||
if minetest.global_exists("player_api") then
|
|
||||||
-- Minetest-5 compatible
|
player_api.set_model(player, "skinsdb_3d_armor_character_5.b3d")
|
||||||
player_api.set_model(player, "skinsdb_3d_armor_character_5.b3d")
|
|
||||||
else
|
|
||||||
-- Minetest-0.4 compatible
|
|
||||||
default.player_set_model(player, "skinsdb_3d_armor_character.b3d")
|
|
||||||
end
|
|
||||||
local v10_texture = "blank.png"
|
local v10_texture = "blank.png"
|
||||||
local v18_texture = "blank.png"
|
local v18_texture = "blank.png"
|
||||||
local armor_texture = "blank.png"
|
local armor_texture = "blank.png"
|
||||||
@ -114,23 +110,12 @@ function skin_class:apply_skin_to_player(player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.global_exists("player_api") then
|
player_api.set_textures(player, {
|
||||||
-- Minetest-5 compatible
|
v10_texture,
|
||||||
player_api.set_textures(player, {
|
v18_texture,
|
||||||
v10_texture,
|
armor_texture,
|
||||||
v18_texture,
|
wielditem_texture,
|
||||||
armor_texture,
|
})
|
||||||
wielditem_texture,
|
|
||||||
})
|
|
||||||
else
|
|
||||||
-- Minetest-0.4 compatible
|
|
||||||
default.player_set_textures(player, {
|
|
||||||
v10_texture,
|
|
||||||
v18_texture,
|
|
||||||
armor_texture,
|
|
||||||
wielditem_texture,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
player:set_properties({
|
player:set_properties({
|
||||||
visual_size = {
|
visual_size = {
|
||||||
|
@ -71,8 +71,8 @@ end
|
|||||||
|
|
||||||
local function skins_sort(skinslist)
|
local function skins_sort(skinslist)
|
||||||
table.sort(skinslist, function(a,b)
|
table.sort(skinslist, function(a,b)
|
||||||
local a_id = a:get_meta("_sort_id")
|
local a_id = a:get_meta("_sort_id") or 10000
|
||||||
local b_id = b:get_meta("_sort_id")
|
local b_id = b:get_meta("_sort_id") or 10000
|
||||||
if a_id ~= b_id then
|
if a_id ~= b_id then
|
||||||
return a:get_meta("_sort_id") < b:get_meta("_sort_id")
|
return a:get_meta("_sort_id") < b:get_meta("_sort_id")
|
||||||
else
|
else
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
-- Skins update script
|
-- Skins update script
|
||||||
|
|
||||||
local S = skins.S
|
local S = minetest.get_translator("skinsdb")
|
||||||
local _ID_ = "Lua Skins Updater"
|
local _ID_ = "Lua Skins Updater"
|
||||||
|
|
||||||
local internal = {}
|
local internal = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user