made npc_talk:npc less dependant on skinsdb
This commit is contained in:
parent
dad2e50e71
commit
1149193f5b
@ -67,6 +67,10 @@ end
|
||||
|
||||
|
||||
npc_talk.add_skins_from_skinsdb = function(mob_name_string)
|
||||
if(not(yl_speak_up.mob_skins[mob_name_string])
|
||||
or(#yl_speak_up.mob_skins[mob_name_string] < 1)) then
|
||||
yl_speak_up.mob_skins[mob_name_string] = {"character.png"}
|
||||
end
|
||||
-- read skins from skinsdb
|
||||
if(not(minetest.get_modpath("skinsdb"))) then
|
||||
return
|
||||
|
@ -1,5 +1,17 @@
|
||||
|
||||
npc_talk.register_example_npc = function()
|
||||
local mesh = npc_talk.talking_npc_mesh
|
||||
local textures = {npc_talk.talking_npc_texture}
|
||||
if(minetest.get_modpath("skinsdb")) then
|
||||
mesh = "skinsdb_3d_armor_character_5.b3d"
|
||||
-- this mesh has a diffrent texture setup as well
|
||||
textures = {{
|
||||
"blank.png", -- cape?
|
||||
"npc_talk_default_skin.png", -- 64x64 skin
|
||||
"3d_armor_trans.png", -- shield?!
|
||||
"3d_armor_trans.png", -- item right hand
|
||||
}}
|
||||
end
|
||||
-- register the new mob
|
||||
mobs:register_mob("npc_talk:npc", {
|
||||
type = "npc",
|
||||
@ -16,15 +28,9 @@ npc_talk.register_example_npc = function()
|
||||
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
-- TODO: mesh, textures
|
||||
mesh = "skinsdb_3d_armor_character_5.b3d",
|
||||
mesh = mesh,
|
||||
drawtype = "front",
|
||||
textures = {{
|
||||
"blank.png", -- cape?
|
||||
"yl_speak_up_main_default.png", -- 64x64 skin
|
||||
"3d_armor_trans.png", -- shield?!
|
||||
"3d_armor_trans.png", -- item right hand
|
||||
}},
|
||||
textures = textures,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {},
|
||||
walk_velocity = 2,
|
||||
|
Loading…
Reference in New Issue
Block a user