Repository navigation
[Accessories Part I] Slots! - #3061
codemob-dev wants to merge 26 commits into
Conversation
|
there's check issues it needs some fixes according to github |
|
Oh no. Now that even such a pr is out I finnally need to go back to the callbacks (no we have two accessorie pr series) |
|
Can we have the items in columns instead of rows? Inventory already takes a lot of horizontal space. |
|
it's still having an issue with 1 check failing |
|
yeah |
|
Definitely suboptimal layout for presentation, but yeah I guess thats what I described. |
I feel like this would scale really badly once we add armor and other slots |
Why? Just add a row above or below. Well, unless you want to have character presentation.
Which is almost what you made... |
How would you suggest we specify the slot order in the zon? |
|
This is how I would think to lay it out. @IntegratedQuantum 's input here would be helpful, like specifically how many slots do we want, what kind of labeled slots do we want |
that looks better |
I think addons should be able to add custom accessory slots, so we should have a GUI that is expandable. I would suggest maybe putting the main body slots on the left and have a scrollable list on the right (maybe 2 slots wide, following your desing) with all the other slots.
For now I would suggest to keep the list small (mabye 1 necklace slot for the healing accessories and 2 ring slots) and expand it when we need to. |
Would the armor slots be hardcoded then? If not, how would we specify their location in the zon? |
|
You'll probably need some sort of priority hint for the order, you can just make the first accessories appear in the four armor slots |
Not exactly what you asked, but this is what I came up with: The window currently expands infinitely to the left as you add more slots, and you can specify an index to try to order the slots by. Once I get textures from @careeoki and get armor slots it will look a lot better. |
|
Alright, here you go, as requested
Next you should do this:
|
* body slots * acc icon
IntegratedQuantum
left a comment
There was a problem hiding this comment.
A few things to consider:
- you added migrations, but you are not using them
- what about accessory slots that aren't unlocked by default or for every player/player type?
| @@ -0,0 +1,5 @@ | |||
| .{ | |||
| .texture = "feet.png", | |||
There was a problem hiding this comment.
Please also give them some tags
| if (version != entityComponentVersion) return error.InvalidComponentVersion; | ||
| const accessories = &components.add(main.globalAllocator, @enumFromInt(entityId)).accessories; | ||
| accessories.* = .init(main.globalAllocator, items.accessory_slots.getTotalSlotCount(), .serverShared, .{.playerAccessories = entityId}, .{}); | ||
| accessories.super.fromBytes(reader); |
There was a problem hiding this comment.
Not necessary, init will already load it using the sync system.
|
What if we want a material that adds more accessory slots 🙃 |






The icons and slots are just placeholders for testing until @careeoki makes some better textures. Currently, any item can be placed in the slots for testing purposes but can change that to allow no items if needed.