Page 1 of 1

question about "who inventory plus mod could find skin mod"

PostPosted: Sun Apr 17, 2016 09:14
by linushsao
hi,all

i'm newbie of minetest api,try to launch skin mod(in-game switch skin) by myself.i have some questions,maybe someone could give me advices.

1.how could inventory plus(or unifiels_invenory and else) find the skin mod(or bags mod and else) to show skin mod button in it.
2.has skin mod do something to regist to minetestserver?

Re: question about "who inventory plus mod could find skin m

PostPosted: Sun Apr 17, 2016 09:34
by TenPlus1
Once inventory_plus mod is running other mods like simple_skins or zeg's skins know it's running and add a button to it's menu for you to click and change skin... Note that simple_skins doesn't need inventory_plus to run since it already has a /skin command as well.

Re: question about "who inventory plus mod could find skin m

PostPosted: Sun Apr 17, 2016 10:05
by linushsao
TenPlus1 wrote:Once inventory_plus mod is running other mods like simple_skins or zeg's skins know it's running and add a button to it's menu for you to click and change skin... Note that simple_skins doesn't need inventory_plus to run since it already has a /skin command as well.


tks,TenPlus1.

i've do some tests & find something as following:

1.Zeg9's skin mod needs depends with inventor_plus.without inventory_plus will got error msg and skin_mod will not be loaded.
2.when skin_mod is successful loaded, seems that we has no /skin cmd ?
3.after read your reply,i re-read codes of skin_mod,found some codes maybe the key:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_joinplayer(function(player)
   if not skins.skins[player:get_player_name()] then
      skins.skins[player:get_player_name()] = skins.default()
   end
   skins.update_player_skin(player)
   inventory_plus.register_button(player,"skins","Skin")
end)


it seems like skin_mod call minetest.register_on_joinplayer function to run inventory_plus's API to insert itself's button to inventory_plus's UI(when player login).

Re: question about "who inventory plus mod could find skin m

PostPosted: Sun Apr 17, 2016 13:33
by TenPlus1
zeg's skin mod NEEDS inventory_plus... it's my own Simple_Skins mod that doesnt, but will use it if found.