Skip to content

Item Stack

zcaliptium edited this page Mar 2, 2021 · 3 revisions

File: GDInv_ItemStack.gd

Description

Item instance inside of some sort of inventory. That has such fields:

  • Stack Size (int)
  • Item (Reference)
  • Capabilities (Dictionary)

Stack Capabilities

Capabilities have nearly-same purpose as Attributes. Just called with another word to be less confusing. Designed store stuff specific for one stack instance.

Case of usage: RPG game can have items enchanted. Then you make something with key enchantements at capabilities dictionary.
Then you can easilly get it from stack from any place of your game logic code.

Clone this wiki locally