MrRar / edit_skin

Advanced skin editor mod for Minetest
MIT License
7 stars 5 forks source link

Sort items by gender #3

Open dark-steveneq opened 2 years ago

dark-steveneq commented 2 years ago

Hi. Long time ago I made very scuffed modifications to add this functionality to the mod, but by doing this I locked myself out from getting new features.

MrRar commented 2 years ago

What would that look like? I would be curious to see your code.

dark-steveneq commented 2 years ago

I have 2 almost identical copies of the mod. The only difference between them are function names, so if I want to open formspec for female copy, I have to use female_edit_skin.show_formspec() instead of edit_skin.show_formspec(). For displaying formspecs, I'm checking value of gender metadata. I replaced "Templates" tab with "Gender" tab, which added funny side-effect - players were able to quickly switch from one skin to another. Hmm... This is quite a good idea! Few slots for players to save their skins I also added "lite" version of formspec. It's almost the same as regular version but with less customization options. In my introduction mod (I'll maybe make it public) on the last slide, there's a button which opens "full" version, after that, you can only access "lite" version.

MrRar commented 2 years ago

Maybe it would be useful to have a toggle to display male, female or all. This could display on every page. There could be a checkbox for male and a checkbox for female. When both are checked it shows all skins. If nether are checked, only sex neutral skin items are shown.

dark-steveneq commented 2 years ago

This would make sense for clothes, but not for hair or eyes for example.

MrRar commented 2 years ago

At this point adding sorting options is not very useful since there aren't a lot of options to choose from.

dark-steveneq commented 2 years ago

It might not be useful for you, but it might be for other people (like me).