summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Weber <web.alexander@web.de>2017-07-24 17:39:16 +0200
committerAlexander Weber <web.alexander@web.de>2017-07-24 17:39:16 +0200
commite2e2927fe87b0da2844c29d266b62aea6a2d48c4 (patch)
tree4c1e041f74d8c846bb12d350def717225f922bae
parent66043c38754c1327d6d7e3b75b30d4dbdde5d09f (diff)
moved character_1 to character for overriding the default character
-rw-r--r--init.lua2
-rw-r--r--meta/character.txt (renamed from meta/character_1.txt)0
-rw-r--r--meta/readme.txt2
-rw-r--r--skinlist.lua12
-rw-r--r--textures/character.png (renamed from textures/character_1.png)bin1778 -> 1778 bytes
-rw-r--r--textures/character_preview.png (renamed from textures/character_1_preview.png)bin783 -> 783 bytes
6 files changed, 11 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 105a68a..325aa94 100644
--- a/init.lua
+++ b/init.lua
@@ -7,7 +7,7 @@
skins = {}
skins.modpath = minetest.get_modpath(minetest.get_current_modname())
-skins.default = "character_1"
+skins.default = "character"
dofile(skins.modpath.."/skin_meta_api.lua")
dofile(skins.modpath.."/api.lua")
diff --git a/meta/character_1.txt b/meta/character.txt
index b4599e6..b4599e6 100644
--- a/meta/character_1.txt
+++ b/meta/character.txt
diff --git a/meta/readme.txt b/meta/readme.txt
index d91806f..77882e9 100644
--- a/meta/readme.txt
+++ b/meta/readme.txt
@@ -1,4 +1,4 @@
-For each skin in textures folder a metadata file can be applied with "txt" suffilx. See character_1.txt for skin character_1.png for reference.
+For each skin in textures folder a metadata file can be applied with "txt" suffilx. See character.txt for skin character.png for reference.
The file contains:
Skin name
Author
diff --git a/skinlist.lua b/skinlist.lua
index e1be623..5d29fe4 100644
--- a/skinlist.lua
+++ b/skinlist.lua
@@ -6,9 +6,15 @@ for _, fn in pairs(skins_dir_list) do
local name, sort_id, assignment, is_preview
if nameparts[1] == "character" then
- sort_id = tonumber(nameparts[2])+5000
- name = "character_"..nameparts[2]
- is_preview = (nameparts[3] == "preview")
+ if tonumber(nameparts[2]) == nil then --default skin character.png
+ sort_id = 5000
+ name = "character"
+ is_preview = (nameparts[2] == "preview")
+ else
+ sort_id = tonumber(nameparts[2])+5000
+ name = "character_"..nameparts[2]
+ is_preview = (nameparts[3] == "preview")
+ end
elseif nameparts[1] == "player" then
assignment = "player:"..nameparts[2]
name = "player_"..nameparts[2]
diff --git a/textures/character_1.png b/textures/character.png
index 24d794a..24d794a 100644
--- a/textures/character_1.png
+++ b/textures/character.png
Binary files differ
diff --git a/textures/character_1_preview.png b/textures/character_preview.png
index 62a9ff2..62a9ff2 100644
--- a/textures/character_1_preview.png
+++ b/textures/character_preview.png
Binary files differ