MrRar / edit_skin

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

Added lite formspec version and sorting by gender #6

Closed dark-steveneq closed 6 months ago

dark-steveneq commented 1 year ago

Related to #3

MrRar commented 1 year ago

There are a lot of issues with this. First, I would greatly prefer if you would tell me exactly what you are planning to do before doing it so I don't end up in an uncomfortable situation where I have to reject something that someone put a lot of time and effort into.

Concept

Gender Filters

This PR adds male and female buttons. The problem with them is that they don't show their state. This is why checkboxes should be used. Also I think they should show up on top of the list of items. A lot of things will need to be moved down Sorry I'm picky.

Some items should show up under both male and female like all the mouths. There is also no way to show all items.

lite command

I don't see the merits of having a separate simpler formspec. What's wrong with having all the options? I think it should use the word light not lite. I googled the definition of lite and it has to do with foods.

Readme file

The API needs to specify the new "gender" property. Also the data type of "lite" is not specified.

Code

Adding filter options is tricky. I have an idea of how to do it. I will have tables for each type of item for each player. There will be a function like edit_skin.filter_player_tab(player, tab). This function will be called to generate a list of items the player can see given the player's filter options and permissions. I am planning to work on this to fix https://github.com/MrRar/edit_skin/issues/5. So maybe hold off on trying to add this feature until I have that done.

chrbinder commented 1 year ago

While the idea of having more fine-grained filters sounds very nice, sorting items in either this or that gender seems like a conservative approach to me. So I wanted to show my support for the possibility of having unspecified items. Should there be no gender-specific items in the directory, no filter buttons should be shown in the formspec. This pertains to servers where there are more or less than two playable genders or non-human skins which would not fit either category.