summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2017-02-12 22:08:33 -0600
committercheapie <no-email-for-you@example.com>2017-02-12 22:08:33 -0600
commitd3a2eb43eb29c26e18ffcba93cd13c12a2b26bf6 (patch)
treeadbab78d3d6016a210922eac3f335dfcd8badc8d
downloadplayer_textures-d3a2eb43eb29c26e18ffcba93cd13c12a2b26bf6.tar
player_textures-d3a2eb43eb29c26e18ffcba93cd13c12a2b26bf6.tar.gz
player_textures-d3a2eb43eb29c26e18ffcba93cd13c12a2b26bf6.tar.bz2
player_textures-d3a2eb43eb29c26e18ffcba93cd13c12a2b26bf6.tar.xz
player_textures-d3a2eb43eb29c26e18ffcba93cd13c12a2b26bf6.zip
Add content
-rw-r--r--LICENSE24
-rw-r--r--README1
-rw-r--r--depends.txt0
-rw-r--r--init.lua23
-rw-r--r--textures/player_cheapie.pngbin0 -> 679 bytes
5 files changed, 48 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..68a49da
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
diff --git a/README b/README
new file mode 100644
index 0000000..60a6a06
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+Works pretty much the same as every other version of this mod. Put skins in the textures directory, with the name following the pattern "player_%s.png", where %s is the player name
diff --git a/depends.txt b/depends.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/depends.txt
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..90c725c
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,23 @@
+local function pivot(table)
+ local ret = {}
+ for k,v in pairs(table) do
+ ret[v] = k
+ end
+ return ret
+end
+
+local textures = pivot(minetest.get_dir_list(minetest.get_modpath("player_textures")..DIR_DELIM.."textures"))
+
+local function applyskin(player)
+ local name = player:get_player_name()
+ if textures[string.format("player_%s.png",name)] then
+ default.player_set_textures(player,string.format("[combine:64x32:0,0=player_%s.png",name))
+ player:set_properties({textures={string.format("[combine:64x32:0,0=player_%s.png",name)}})
+ end
+ player:set_properties({visual="mesh",visual_scale={x=1,y=1},mesh="character.b3d"})
+end
+
+minetest.register_on_joinplayer(function(player)
+ applyskin(player)
+ minetest.after(10,applyskin,player)
+end)
diff --git a/textures/player_cheapie.png b/textures/player_cheapie.png
new file mode 100644
index 0000000..19c2eff
--- /dev/null
+++ b/textures/player_cheapie.png
Binary files differ