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

User avatar
linushsao
Member
 
Posts: 331
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus

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

by linushsao » Sun Apr 17, 2016 09:14

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?
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Sun Apr 17, 2016 09:34

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.
 

User avatar
linushsao
Member
 
Posts: 331
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus

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

by linushsao » Sun Apr 17, 2016 10:05

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).
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Sun Apr 17, 2016 13:33

zeg's skin mod NEEDS inventory_plus... it's my own Simple_Skins mod that doesnt, but will use it if found.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 11 guests

cron