Convert ZIP version to git repo

master
OldCoder 2021-07-27 22:01:20 -07:00
commit 8080516bc6
4 changed files with 32 additions and 0 deletions

15
README.txt Normal file
View File

@ -0,0 +1,15 @@
Player Textures Mod for Minetest-c55
====================================
This mod allows players to use different textures. Just place the texture in
the player_textures/textures/ folder like this:
player_<player_name>.png
and the player with the name <player_name> will have this textures.
License of source code:
-----------------------
WTFPL
Original
-----------------------
https://github.com/Calinou/carbone-ng/tree/master/mods/player_textures

1
depends.txt Normal file
View File

@ -0,0 +1 @@
default

16
init.lua Normal file
View File

@ -0,0 +1,16 @@
local modname = minetest.get_current_modname()
minetest.register_on_joinplayer(function(player)
local playername = player:get_player_name() -- get player's name
local filename = minetest.get_modpath(modname).."/textures/player_"..playername..".png"
local f = io.open(filename)
if f then
f:close()
player_api.set_textures(player, {"player_"..playername..".png"})
end
end)
--if minetest.setting_getbool("log_mods") then
if minetest.settings:get("log_mods") then
minetest.log("action", "[".. modpath.. "] loaded.")
end

BIN
textures/player_coyote.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB