MrRar / edit_skin

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

Player-specific wardrobe items #5

Closed chrbinder closed 1 year ago

chrbinder commented 1 year ago

Hi! I really like being able to do custom avatars in-game! It would be really nice if you could add the possibility to have player-specific wardrobe items for purposes like game moderation or use in educational contexts as well!

SkinsDB does this by using custom filenames like player_[playername]_[name or number].png.

MrRar commented 1 year ago

@chrbinder So some items could only be selected by a user with a specific user name? How is this useful for game moderation or use in educational contexts as you say?

chrbinder commented 1 year ago

exactly. Staff or teachers could immediately be recognized by players through their avatar. For example, they could be wearing a shirt that says 'staff' or shows a specific logo. On role-playing / story servers, the villain or a specific player could wear something that identifies them but isn't available to regular players.

MrRar commented 1 year ago

I'm going to try to work on this. I will try adding the ability for specific items to only be available to specific player names. I also want to try adding a privilege that can be used to restrict skin item access.

I've been wanting to reformat the item storage from arrays to sets for a while so I can probably do that at the same time.

MrRar commented 1 year ago

I have now added support for player specific items. items can be registered with the for_player property. Which will be a player name or an array of player names.

Items can also be restricted by registering them with the restricted_to_admin property set to true. These items can only be accessed by players with the edit_skin_admin privilege.

chrbinder commented 1 year ago

Thanks a lot! I will take a look at the changes :)