Convert ZIP version to git repo
commit
8080516bc6
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
default
|
|
@ -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
|
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue