diff --git a/mods/player_skins/init.lua b/mods/player_skins/init.lua index 1d6014d..fb0a485 100644 --- a/mods/player_skins/init.lua +++ b/mods/player_skins/init.lua @@ -13,10 +13,6 @@ player_skins = {} player_skins.skin_names = {NS("male"), NS("female")} 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.skins = {} @@ -227,4 +223,40 @@ minetest.register_chatcommand( 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") diff --git a/mods/player_skins/textures/player_skins_bands_blue.png b/mods/player_skins/textures/player_skins_bands_blue.png new file mode 100644 index 0000000..5e51da2 Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_blue.png differ diff --git a/mods/player_skins/textures/player_skins_bands_cyan.png b/mods/player_skins/textures/player_skins_bands_cyan.png new file mode 100644 index 0000000..e55ed7d Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_cyan.png differ diff --git a/mods/player_skins/textures/player_skins_bands_green.png b/mods/player_skins/textures/player_skins_bands_green.png new file mode 100644 index 0000000..6c747ed Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_green.png differ diff --git a/mods/player_skins/textures/player_skins_bands_lime.png b/mods/player_skins/textures/player_skins_bands_lime.png new file mode 100644 index 0000000..ba42358 Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_lime.png differ diff --git a/mods/player_skins/textures/player_skins_bands_magenta.png b/mods/player_skins/textures/player_skins_bands_magenta.png new file mode 100644 index 0000000..6628456 Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_magenta.png differ diff --git a/mods/player_skins/textures/player_skins_bands_orange.png b/mods/player_skins/textures/player_skins_bands_orange.png new file mode 100644 index 0000000..9caedf2 Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_orange.png differ diff --git a/mods/player_skins/textures/player_skins_bands_purple.png b/mods/player_skins/textures/player_skins_bands_purple.png new file mode 100644 index 0000000..329e5bc Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_purple.png differ diff --git a/mods/player_skins/textures/player_skins_bands_red.png b/mods/player_skins/textures/player_skins_bands_red.png new file mode 100644 index 0000000..e62831f Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_red.png differ diff --git a/mods/player_skins/textures/player_skins_bands_redviolet.png b/mods/player_skins/textures/player_skins_bands_redviolet.png new file mode 100644 index 0000000..fa593ab Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_redviolet.png differ diff --git a/mods/player_skins/textures/player_skins_bands_skyblue.png b/mods/player_skins/textures/player_skins_bands_skyblue.png new file mode 100644 index 0000000..5cbc385 Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_skyblue.png differ diff --git a/mods/player_skins/textures/player_skins_bands_turquoise.png b/mods/player_skins/textures/player_skins_bands_turquoise.png new file mode 100644 index 0000000..a989ed9 Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_turquoise.png differ diff --git a/mods/player_skins/textures/player_skins_bands_yellow.png b/mods/player_skins/textures/player_skins_bands_yellow.png new file mode 100644 index 0000000..9dd86a0 Binary files /dev/null and b/mods/player_skins/textures/player_skins_bands_yellow.png differ diff --git a/mods/player_skins/textures/player_skins_base_female.png b/mods/player_skins/textures/player_skins_base_female.png new file mode 100644 index 0000000..4da1949 Binary files /dev/null and b/mods/player_skins/textures/player_skins_base_female.png differ diff --git a/mods/player_skins/textures/player_skins_base_male.png b/mods/player_skins/textures/player_skins_base_male.png new file mode 100644 index 0000000..8643552 Binary files /dev/null and b/mods/player_skins/textures/player_skins_base_male.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_blue.png b/mods/player_skins/textures/player_skins_clothes_blue.png new file mode 100644 index 0000000..f1f4fd3 Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_blue.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_cyan.png b/mods/player_skins/textures/player_skins_clothes_cyan.png new file mode 100644 index 0000000..26c9691 Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_cyan.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_green.png b/mods/player_skins/textures/player_skins_clothes_green.png new file mode 100644 index 0000000..8508e0a Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_green.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_magenta.png b/mods/player_skins/textures/player_skins_clothes_magenta.png new file mode 100644 index 0000000..480d8cc Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_magenta.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_orange.png b/mods/player_skins/textures/player_skins_clothes_orange.png new file mode 100644 index 0000000..b8b36d5 Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_orange.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_purple.png b/mods/player_skins/textures/player_skins_clothes_purple.png new file mode 100644 index 0000000..528122f Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_purple.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_red.png b/mods/player_skins/textures/player_skins_clothes_red.png new file mode 100644 index 0000000..c555e7a Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_red.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_redviolet.png b/mods/player_skins/textures/player_skins_clothes_redviolet.png new file mode 100644 index 0000000..0ea6c34 Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_redviolet.png differ diff --git a/mods/player_skins/textures/player_skins_clothes_yellow.png b/mods/player_skins/textures/player_skins_clothes_yellow.png new file mode 100644 index 0000000..c80c1d5 Binary files /dev/null and b/mods/player_skins/textures/player_skins_clothes_yellow.png differ diff --git a/mods/player_skins/textures/player_skins_eyes_blue.png b/mods/player_skins/textures/player_skins_eyes_blue.png new file mode 100644 index 0000000..b969398 Binary files /dev/null and b/mods/player_skins/textures/player_skins_eyes_blue.png differ diff --git a/mods/player_skins/textures/player_skins_eyes_brown.png b/mods/player_skins/textures/player_skins_eyes_brown.png new file mode 100644 index 0000000..b9017a9 Binary files /dev/null and b/mods/player_skins/textures/player_skins_eyes_brown.png differ diff --git a/mods/player_skins/textures/player_skins_eyes_green.png b/mods/player_skins/textures/player_skins_eyes_green.png new file mode 100644 index 0000000..99b2a3c Binary files /dev/null and b/mods/player_skins/textures/player_skins_eyes_green.png differ diff --git a/mods/player_skins/textures/player_skins_face_female.png b/mods/player_skins/textures/player_skins_face_female.png new file mode 100644 index 0000000..1b1c416 Binary files /dev/null and b/mods/player_skins/textures/player_skins_face_female.png differ diff --git a/mods/player_skins/textures/player_skins_face_male.png b/mods/player_skins/textures/player_skins_face_male.png new file mode 100644 index 0000000..a164b3a Binary files /dev/null and b/mods/player_skins/textures/player_skins_face_male.png differ diff --git a/mods/player_skins/textures/player_skins_hair_female.png b/mods/player_skins/textures/player_skins_hair_female.png new file mode 100644 index 0000000..b918094 Binary files /dev/null and b/mods/player_skins/textures/player_skins_hair_female.png differ diff --git a/mods/player_skins/textures/player_skins_hair_male.png b/mods/player_skins/textures/player_skins_hair_male.png new file mode 100644 index 0000000..55b6fbf Binary files /dev/null and b/mods/player_skins/textures/player_skins_hair_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_0_male.png b/mods/player_skins/textures/player_skins_skin_0_male.png new file mode 100644 index 0000000..21c4a52 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_0_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_1_female.png b/mods/player_skins/textures/player_skins_skin_1_female.png new file mode 100644 index 0000000..6132906 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_1_female.png differ diff --git a/mods/player_skins/textures/player_skins_skin_1_male.png b/mods/player_skins/textures/player_skins_skin_1_male.png new file mode 100644 index 0000000..59bf787 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_1_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_2_male.png b/mods/player_skins/textures/player_skins_skin_2_male.png new file mode 100644 index 0000000..9144c40 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_2_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_3_male.png b/mods/player_skins/textures/player_skins_skin_3_male.png new file mode 100644 index 0000000..622c1c1 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_3_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_4_male.png b/mods/player_skins/textures/player_skins_skin_4_male.png new file mode 100644 index 0000000..7ad1346 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_4_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_5_male.png b/mods/player_skins/textures/player_skins_skin_5_male.png new file mode 100644 index 0000000..78cb848 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_5_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_6_male.png b/mods/player_skins/textures/player_skins_skin_6_male.png new file mode 100644 index 0000000..0c63cfc Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_6_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_7_male.png b/mods/player_skins/textures/player_skins_skin_7_male.png new file mode 100644 index 0000000..19d8bbe Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_7_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_8_male.png b/mods/player_skins/textures/player_skins_skin_8_male.png new file mode 100644 index 0000000..458ef21 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_8_male.png differ diff --git a/mods/player_skins/textures/player_skins_skin_9_male.png b/mods/player_skins/textures/player_skins_skin_9_male.png new file mode 100644 index 0000000..56c0e99 Binary files /dev/null and b/mods/player_skins/textures/player_skins_skin_9_male.png differ diff --git a/settingtypes.txt b/settingtypes.txt index 877068d..6b115f8 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -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. 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 is the skin name: -# -# * player_skins_.png: Player skin -# * player_skins_icon_.png: Player skin icon -player_skins_names (Player skin list) string male,female - [World] # If enabled, the weather will change from time to time. weather_enable (Enable dynamic weather) bool true