Player skin mod, supporting unified_inventory, sfinv and smart_inventory https://content.minetest.net/packages/bell07/skinsdb/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
714B

  1. local S = minetest.get_translator("skinsdb")
  2. -- generate the current formspec
  3. local function get_formspec(player, context)
  4. local skin = skins.get_player_skin(player)
  5. local formspec = skins.get_skin_info_formspec(skin)
  6. formspec = formspec..skins.get_skin_selection_formspec(player, context, 4)
  7. return formspec
  8. end
  9. sfinv.register_page("skins:overview", {
  10. title = S("Skins"),
  11. get = function(self, player, context)
  12. -- collect skins data
  13. return sfinv.make_formspec(player, context, get_formspec(player, context))
  14. end,
  15. on_player_receive_fields = function(self, player, context, fields)
  16. skins.on_skin_selection_receive_fields(player, context, fields)
  17. sfinv.set_player_inventory_formspec(player)
  18. end
  19. })