summaryrefslogtreecommitdiff
path: root/resources/js/classes/InventoryItem.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/classes/InventoryItem.js')
-rw-r--r--resources/js/classes/InventoryItem.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/resources/js/classes/InventoryItem.js b/resources/js/classes/InventoryItem.js
new file mode 100644
index 0000000..9dfdbcc
--- /dev/null
+++ b/resources/js/classes/InventoryItem.js
@@ -0,0 +1,40 @@
+class InventoryItem {
+ /**
+ * @type {Item}
+ */
+ item = null;
+
+ /**
+ * @type {number}
+ */
+ quantity = 1;
+
+ /**
+ * @param {Item} item
+ */
+ constructor (item) {
+ this.item = item;
+ }
+
+ /* Item */
+
+ get slug () {
+ return this.item.slug;
+ }
+
+ get name () {
+ return this.item.name;
+ }
+
+ get category () {
+ return this.item.category;
+ }
+
+ get type () {
+ return this.item.type;
+ }
+
+ get sprite () {
+ return this.item.sprite;
+ }
+}