-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
equipment implementation ideas #53
Comments
Reworking Objects ( see #42 ) will help with this issue |
equippable is for something. this could be used for automatic detection if it's equipment or consumable |
Add an iota for slots. Keep objects unified. So, dungeon features like barrels and items like cake or sword are Objects. But test booleans with slots. Like, if it's not equippable, it has to slot set to SlotNA. This comment will be posted in #42 as well. |
In that case, small rework of inventory will be necessary. For now, EquipmentComponent takes consumables (Objects pickable but not equippable) into slice of *Object (ie Objects), and Slot takes single *Object. It has to match Slot(s) in Eq with Object property Slot. |
Equipment could be just slice with fixed number of fields. Then it would be possible to use already implemented iotas for EQ-related stuff. Like, Equipment[1] is always weapon, because SlotWeapon == 1. |
It will differ in various implementation. For now (looking at ed730d9 ) it works like that:
|
So, instead of lots of different fields as now:
type EquipmentComponent struct {
Slot1 *Object
Slot2 *Object
Slot3 *Object
}
Use something different.
At first, I had some ideas (hashmaps, embedded structs, etc) but all of them have major flaws.
The text was updated successfully, but these errors were encountered: