hestia-rsps / hestia

An open-source Kotlin game server.
BSD 3-Clause "New" or "Revised" License
16 stars 4 forks source link

Container Systems #76

Open GregHib opened 4 years ago

GregHib commented 4 years ago

Item is an entity. It can have a Quantity component.

An item could potentially have a Name, Description, Consumable or Equipable component. However this wouldn't make sense as these values are static and would just be duplicating data.

Degredation would make sense, and Type of course. Is that it? Noted perhaps.

GregHib commented 4 years ago

Will need a system for each action type PickupSystem DropSystem ConsumeSystem ExamineSystem - Surely this could be reusable for objects and mobs too? EquipSystem

Will changes need to be queued and processed or will using non-instant events have the same effect?

GregHib commented 4 years ago

InventorySystem EquipmentSystem BeastOfBurdenSystem etc..

A container component has just an int array of a fixed size.

Separate systems for handling Quantity changes?

GregHib commented 4 years ago

Decided that it doesn't make sense for container items to be entities as the vast majority of items (up to 500 per player in banks alone) would create a lot of overhead and processing to spawn.

Containers interfaces, with addition, subtraction, switching, sorting, stack types and modification composition Task DSL added. The systems themselves are content and will need to be added at a later date.

GregHib commented 4 years ago

Containers would be better in a map than as separate components. Might even be an idea to use string names as key identifiers.