minetest-mods / skinsdb

Player skin mod, supporting unified_inventory, sfinv and smart_inventory
28 stars 41 forks source link

API: make skins.register_skin public #106

Closed SmallJoker closed 3 months ago

SmallJoker commented 3 months ago

Fixes #102

@Bastrabun Please feel free to provide feedback. Does it work as you'd expect?

Bastrabun commented 3 months ago

For the usecase of having a separate mod govern the real textures: yes. I didn't do a full test including meta and everything though.

For the usecase of retrofitting skins into a running server: No, because the hand apparently registers a block of its own. I do not have a suggestion on how to prevent this or do it differently, for my retrofitting attempt I will most likely overwrite this function and replace it with one that temporarily registers a "default" hand until the next server restart.

Also to be noted: Servers that import the whole skins database and have an awesome 250 pages of skins to select from also require 250 x 16 = 4000 nodedefinitions they must expend

SmallJoker commented 3 months ago

For the usecase of retrofitting skins into a running server:

Media files must also be known after on_mods_loaded so that they can be distributed to players - unless delayed media sending is used, which is yet not supported by all common clients.

I'll go ahead and merge this PR in a week unless there's objections.