mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-22 23:40:18 +01:00
Add uv wrapped 1.8 hand model (#74)
This commit is contained in:
parent
b769824d24
commit
e275159dd0
3
API.md
3
API.md
@ -59,7 +59,8 @@ Could be redefined for dynamic texture generation
|
||||
Set the hand node to be used with this skin
|
||||
|
||||
## skin:set_hand_from_texture()
|
||||
Register and set hand node based on skin texture
|
||||
Register and set hand node based on skin texture.
|
||||
Uses different model depending on get_meta("format") ("1.0" or "1.8")
|
||||
Only works on mod load
|
||||
|
||||
## skin:get_hand()
|
||||
|
BIN
models/skinsdb_hand_18.b3d
Normal file
BIN
models/skinsdb_hand_18.b3d
Normal file
Binary file not shown.
BIN
models/skinsdb_hand_18.blend
Normal file
BIN
models/skinsdb_hand_18.blend
Normal file
Binary file not shown.
@ -69,7 +69,11 @@ function skin_class:set_hand_from_texture()
|
||||
hand_def.wield_scale = {x=1,y=1,z=1}
|
||||
hand_def.paramtype = "light"
|
||||
hand_def.drawtype = "mesh"
|
||||
if(self:get_meta("format") == "1.0") then
|
||||
hand_def.mesh = "skinsdb_hand.b3d"
|
||||
else
|
||||
hand_def.mesh = "skinsdb_hand_18.b3d"
|
||||
end
|
||||
hand_def.use_texture_alpha = ALPHA_CLIP
|
||||
minetest.register_node(hand, hand_def)
|
||||
self:set_hand(hand)
|
||||
|
@ -51,9 +51,7 @@ for _, fn in pairs(skins_dir_list) do
|
||||
local skin_format = skins.get_skin_format(file)
|
||||
skin_obj:set_meta("format", skin_format)
|
||||
file:close()
|
||||
if skin_format == "1.0" then
|
||||
skin_obj:set_hand_from_texture()
|
||||
end
|
||||
file = io.open(skins.modpath.."/meta/"..name..".txt", "r")
|
||||
if file then
|
||||
local data = string.split(file:read("*all"), "\n", 3)
|
||||
|
Loading…
Reference in New Issue
Block a user