WIP: More skins
@ -13,10 +13,6 @@ player_skins = {}
|
|||||||
player_skins.skin_names = {NS("male"), NS("female")}
|
player_skins.skin_names = {NS("male"), NS("female")}
|
||||||
player_skins.default_skins = {male=true, female=true}
|
player_skins.default_skins = {male=true, female=true}
|
||||||
|
|
||||||
if minetest.settings:get("player_skins_names") then
|
|
||||||
player_skins.skin_names = util.split(minetest.settings:get("player_skins_names"), ",")
|
|
||||||
end
|
|
||||||
|
|
||||||
player_skins.old_skins = {}
|
player_skins.old_skins = {}
|
||||||
player_skins.skins = {}
|
player_skins.skins = {}
|
||||||
|
|
||||||
@ -227,4 +223,40 @@ minetest.register_chatcommand(
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local genders = { "male", "female" }
|
||||||
|
local cloth_colors = { "red", "redviolet", "magenta", "purple", "blue", "cyan", "green", "yellow", "orange" }
|
||||||
|
local band_colors = { "red", "redviolet", "magenta", "purple", "blue", "skyblue", "cyan", "green", "lime", "turquoise", "yellow", "orange" }
|
||||||
|
local hairs = { "male", "female" }
|
||||||
|
local eye_colors = { "green", "blue", "brown" }
|
||||||
|
|
||||||
|
minetest.register_chatcommand(
|
||||||
|
"random_skin",
|
||||||
|
{
|
||||||
|
params = get_chatparams(),
|
||||||
|
description = S("Set random player skin"),
|
||||||
|
privs = {},
|
||||||
|
func = function(name, param)
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
if not player then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local scol = math.random(0,9)
|
||||||
|
local gender = genders[math.random(1, #genders)]
|
||||||
|
local ccol = cloth_colors[math.random(1, #cloth_colors)]
|
||||||
|
local bcol = band_colors[math.random(1, #band_colors)]
|
||||||
|
local hair = hairs[math.random(1, #hairs)]
|
||||||
|
local ecol = eye_colors[math.random(1, #eye_colors)]
|
||||||
|
default.player_set_textures(
|
||||||
|
player, {
|
||||||
|
"player_skins_skin_"..scol.."_male.png" .. "^" ..
|
||||||
|
"player_skins_eyes_"..ecol..".png" .. "^" ..
|
||||||
|
"player_skins_hair_"..hair..".png" .. "^" ..
|
||||||
|
"player_skins_clothes_"..ccol..".png" .. "^" ..
|
||||||
|
"player_skins_bands_"..bcol..".png"
|
||||||
|
})
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
default.log("mod:player_skins", "loaded")
|
default.log("mod:player_skins", "loaded")
|
||||||
|
BIN
mods/player_skins/textures/player_skins_bands_blue.png
Normal file
After Width: | Height: | Size: 517 B |
BIN
mods/player_skins/textures/player_skins_bands_cyan.png
Normal file
After Width: | Height: | Size: 526 B |
BIN
mods/player_skins/textures/player_skins_bands_green.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
mods/player_skins/textures/player_skins_bands_lime.png
Normal file
After Width: | Height: | Size: 515 B |
BIN
mods/player_skins/textures/player_skins_bands_magenta.png
Normal file
After Width: | Height: | Size: 519 B |
BIN
mods/player_skins/textures/player_skins_bands_orange.png
Normal file
After Width: | Height: | Size: 518 B |
BIN
mods/player_skins/textures/player_skins_bands_purple.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
mods/player_skins/textures/player_skins_bands_red.png
Normal file
After Width: | Height: | Size: 517 B |
BIN
mods/player_skins/textures/player_skins_bands_redviolet.png
Normal file
After Width: | Height: | Size: 518 B |
BIN
mods/player_skins/textures/player_skins_bands_skyblue.png
Normal file
After Width: | Height: | Size: 526 B |
BIN
mods/player_skins/textures/player_skins_bands_turquoise.png
Normal file
After Width: | Height: | Size: 515 B |
BIN
mods/player_skins/textures/player_skins_bands_yellow.png
Normal file
After Width: | Height: | Size: 522 B |
BIN
mods/player_skins/textures/player_skins_base_female.png
Normal file
After Width: | Height: | Size: 369 B |
BIN
mods/player_skins/textures/player_skins_base_male.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
mods/player_skins/textures/player_skins_clothes_blue.png
Normal file
After Width: | Height: | Size: 472 B |
BIN
mods/player_skins/textures/player_skins_clothes_cyan.png
Normal file
After Width: | Height: | Size: 471 B |
BIN
mods/player_skins/textures/player_skins_clothes_green.png
Normal file
After Width: | Height: | Size: 471 B |
BIN
mods/player_skins/textures/player_skins_clothes_magenta.png
Normal file
After Width: | Height: | Size: 473 B |
BIN
mods/player_skins/textures/player_skins_clothes_orange.png
Normal file
After Width: | Height: | Size: 479 B |
BIN
mods/player_skins/textures/player_skins_clothes_purple.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
mods/player_skins/textures/player_skins_clothes_red.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
mods/player_skins/textures/player_skins_clothes_redviolet.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
mods/player_skins/textures/player_skins_clothes_yellow.png
Normal file
After Width: | Height: | Size: 471 B |
BIN
mods/player_skins/textures/player_skins_eyes_blue.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
mods/player_skins/textures/player_skins_eyes_brown.png
Normal file
After Width: | Height: | Size: 259 B |
BIN
mods/player_skins/textures/player_skins_eyes_green.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
mods/player_skins/textures/player_skins_face_female.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
mods/player_skins/textures/player_skins_face_male.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
mods/player_skins/textures/player_skins_hair_female.png
Normal file
After Width: | Height: | Size: 294 B |
BIN
mods/player_skins/textures/player_skins_hair_male.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
mods/player_skins/textures/player_skins_skin_0_male.png
Normal file
After Width: | Height: | Size: 522 B |
BIN
mods/player_skins/textures/player_skins_skin_1_female.png
Normal file
After Width: | Height: | Size: 369 B |
BIN
mods/player_skins/textures/player_skins_skin_1_male.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
mods/player_skins/textures/player_skins_skin_2_male.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
mods/player_skins/textures/player_skins_skin_3_male.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
mods/player_skins/textures/player_skins_skin_4_male.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
mods/player_skins/textures/player_skins_skin_5_male.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
mods/player_skins/textures/player_skins_skin_6_male.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
mods/player_skins/textures/player_skins_skin_7_male.png
Normal file
After Width: | Height: | Size: 510 B |
BIN
mods/player_skins/textures/player_skins_skin_8_male.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
mods/player_skins/textures/player_skins_skin_9_male.png
Normal file
After Width: | Height: | Size: 506 B |
@ -15,14 +15,6 @@ give_initial_enable (Enable initial items) bool false
|
|||||||
# Comma-separated list of initial items to give to new players. You must use itemstrings as the item identifiers. This only works if give_initial_enable is active.
|
# Comma-separated list of initial items to give to new players. You must use itemstrings as the item identifiers. This only works if give_initial_enable is active.
|
||||||
give_initial_items (Initial items) string default:pick_stone,default:torch_weak 10
|
give_initial_items (Initial items) string default:pick_stone,default:torch_weak 10
|
||||||
|
|
||||||
# Here you can add your custom player skins. List each skin by name here, separated by commas.
|
|
||||||
# The player skin files are read from mods/player_skins/textures in the game's directory.
|
|
||||||
# Each skin requires two PNG files, where <name> is the skin name:
|
|
||||||
#
|
|
||||||
# * player_skins_<name>.png: Player skin
|
|
||||||
# * player_skins_icon_<name>.png: Player skin icon
|
|
||||||
player_skins_names (Player skin list) string male,female
|
|
||||||
|
|
||||||
[World]
|
[World]
|
||||||
# If enabled, the weather will change from time to time.
|
# If enabled, the weather will change from time to time.
|
||||||
weather_enable (Enable dynamic weather) bool true
|
weather_enable (Enable dynamic weather) bool true
|
||||||
|