summaryrefslogtreecommitdiff
path: root/resources/js/classes/Item.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/classes/Item.js')
-rw-r--r--resources/js/classes/Item.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/resources/js/classes/Item.js b/resources/js/classes/Item.js
index e274a20..6207cc2 100644
--- a/resources/js/classes/Item.js
+++ b/resources/js/classes/Item.js
@@ -1 +1,21 @@
-class Item {}
+class Item {
+ constructor (slug) {
+ this.slug = slug;
+ }
+
+ get name () {
+ return slugToName(this.slug);
+ }
+
+ get category () {
+ return DB.items[this.slug].category;
+ }
+
+ get type () {
+ return DB.items[this.slug].type;
+ }
+
+ get sprite () {
+ return DB.items[this.slug].sprite;
+ }
+}