Skip to content

Extend inventory actor functionality #101

@petterarvidsson

Description

@petterarvidsson

To accommodate more advanced use cases such as machines extend the inventory actor with new functionality.

As a first step, add three different types of inventories that can be associated with a UUID (block):

  • STORAGE, generic multi purpose storage
  • INPUT, inventory designated for input
  • OUTPUT, inventory designated for output

Then add (or rework existing) messages:

  • GetInventories(uuid) -> [uuid, storage, input, output]
  • AddToInventory(uuid, inventoryType, stack) -> [uuid, inventoryType, stack]
  • RemoveFromInventory(uuid, inventoryType, blockTypeId, amount) -> [uuid, inventoryType, stack]
  • ReplaceInventorySlot(uuid, inventoryType, slot, stack) -> [uuid, inventoryType, slot, stack]
  • TryToReplaceInventorySlot(uuid, inventoryType, slot, stack) -> [uuid, inventoryType, slot, stack]
  • TransferBetweenInventories(fromUuid. fromInventoryType, toUuid, toInvenotryType, blockTypeId, amount) -> [?]
  • RegisterForInventoriesEvents(uuid)
  • DeregisterForInventoriesEvents(uuid)
  • InventoryEvent(uuid)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions