From 1ca6bc834a6547ef523fee44e0f23daa0fd3e2ea Mon Sep 17 00:00:00 2001 From: Thaum Rystra Date: Thu, 30 Apr 2020 14:52:41 +0200 Subject: [PATCH] Removed variable names from items, now only use tags. Items can also be attuned --- app/imports/api/properties/Items.js | 15 ++---- app/imports/ui/properties/forms/ItemForm.vue | 55 +++++++++++++------- 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/app/imports/api/properties/Items.js b/app/imports/api/properties/Items.js index 79045071..a1443295 100644 --- a/app/imports/api/properties/Items.js +++ b/app/imports/api/properties/Items.js @@ -1,19 +1,10 @@ import SimpleSchema from 'simpl-schema'; -import VARIABLE_NAME_REGEX from '/imports/constants/VARIABLE_NAME_REGEX.js'; -ItemSchema = new SimpleSchema({ +const ItemSchema = new SimpleSchema({ name: { type: String, optional: true, - defaultValue: "New Item", }, - // Variable name to reference this item as ammunition or in formulae - variableName: { - type: String, - regEx: VARIABLE_NAME_REGEX, - min: 3, - defaultValue: 'newAttribute', - }, // Plural name of the item, if there is more than one plural: { type: String, @@ -47,6 +38,10 @@ ItemSchema = new SimpleSchema({ type: Boolean, optional: true, }, + attuned: { + type: Boolean, + optional: true, + }, // Show increment/decrement buttons in item lists showIncrement: { type: Boolean, diff --git a/app/imports/ui/properties/forms/ItemForm.vue b/app/imports/ui/properties/forms/ItemForm.vue index 9ec18183..1405ec4a 100644 --- a/app/imports/ui/properties/forms/ItemForm.vue +++ b/app/imports/ui/properties/forms/ItemForm.vue @@ -9,22 +9,13 @@ @change="(value, ack) => $emit('change', {path: ['name'], value, ack})" /> -
- + + + +
+ +
+