Dump needless code in player_skins mod

This commit is contained in:
Wuzzy 2021-08-07 21:28:42 +02:00
parent ce31b57a1c
commit 3cf850ef3d
4 changed files with 4 additions and 35 deletions

View File

@ -81,25 +81,10 @@ local components = {
} }
function player_skins.get_formspec(playername) function player_skins.get_formspec(playername)
local form = default.ui.get_page("default:default") local form = default.ui.get_page("default:default")
form = form .. "model[0,0.1;10.5,8;player_skins_skin_select_model;character.b3d;"..player_skins.skins[playername]..";0,180;false;false;0,0;0]"
form = form .. "model[0,0.1;10.5,8;player_skins_skin_select_model;character.b3d;"..player_skins.skins[playername]..";0,180;false;false;0,0;0]" form = form .. default.ui.button(2.75, 7.75, 3, 1, "player_skins_skin_select_random", S("New skin"))
return form
--[[ TODO: Add skin selection buttons
local x, y = 0.1, 0.1
for c,component in pairs(components) do
for c=1, #component do
local color = component[c]
form = form .. default.ui.button(x, y, 1, 1, "skin_select_" .. color, color)
x = x + 0.7
end
x = 0.1
y = y + 1
end
]]
form = form .. default.ui.button(2.75, 7.75, 3, 1, "player_skins_skin_select_random", S("New skin"))
return form
end end
minetest.register_on_player_receive_fields(function(player, form_name, fields) minetest.register_on_player_receive_fields(function(player, form_name, fields)
@ -134,17 +119,4 @@ function player_skins.set_random_skin(name)
player_skins.set_skin(name, scol, ccol, bcol, hair, ecol) player_skins.set_skin(name, scol, ccol, bcol, hair, ecol)
end end
minetest.register_chatcommand(
"random_skin",
{
params = "",
description = S("Set random player skin"),
privs = {},
func = function(name, param)
player_skins.set_random_skin(name)
return true
end
})
default.log("mod:player_skins", "loaded") default.log("mod:player_skins", "loaded")

View File

@ -1,3 +1,2 @@
# textdomain: player_skins # textdomain: player_skins
New skin=Neues Aussehen New skin=Neues Aussehen
Set random player skin=Zufälliges Spieleraussehen auswählen

View File

@ -1,3 +1,2 @@
# textdomain: player_skins # textdomain: player_skins
New skin= New skin=
Set random player skin=

View File

@ -1,3 +1,2 @@
# textdomain: player_skins # textdomain: player_skins
New skin= New skin=
Set random player skin=