diff --git a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js index 3b6ac32e..776e2f15 100644 --- a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js +++ b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js @@ -147,20 +147,23 @@ function spendResources({prop, log, scope}){ if (!item.equipped){ throw 'The selected ammo is not equipped'; } - if (!itemConsumed.quantity) return; + if ( + !itemConsumed.quantity.value || + !isFinite(itemConsumed.quantity.value) + ) return; itemQuantityAdjustments.push({ property: item, operation: 'increment', - value: itemConsumed.quantity, + value: itemConsumed.quantity.value, }); let logName = item.name; - if (itemConsumed.quantity > 1 || itemConsumed.quantity < -1){ + if (itemConsumed.quantity.value > 1 || itemConsumed.quantity.value < -1){ logName = item.plural || logName; } - if (itemConsumed.quantity > 0){ - spendLog.push(logName + ': ' + itemConsumed.quantity); - } else if (itemConsumed.quantity < 0){ - gainLog.push(logName + ': ' + -itemConsumed.quantity); + if (itemConsumed.quantity.value > 0){ + spendLog.push(logName + ': ' + itemConsumed.quantity.value); + } else if (itemConsumed.quantity.value < 0){ + gainLog.push(logName + ': ' + -itemConsumed.quantity.value); } }); } catch (e){ diff --git a/app/imports/ui/components/propertyToolbar.vue b/app/imports/ui/components/propertyToolbar.vue index c6b474be..32282734 100644 --- a/app/imports/ui/components/propertyToolbar.vue +++ b/app/imports/ui/components/propertyToolbar.vue @@ -102,21 +102,26 @@ /> + + {{ editing ? 'Done' : 'Edit' }} + mdi-check mdi-pencil diff --git a/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue b/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue index 93692c6b..f3dfc0b4 100644 --- a/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue +++ b/app/imports/ui/creature/creatureProperties/CreaturePropertyDialog.vue @@ -41,18 +41,23 @@ This property can't be viewed yet.

- - - + + + +
- mdi-plus - Property + + mdi-plus + + Child Property - Done + Close
diff --git a/app/imports/ui/properties/components/actions/ItemConsumedView.vue b/app/imports/ui/properties/components/actions/ItemConsumedView.vue index 083292e6..3363c5a4 100644 --- a/app/imports/ui/properties/components/actions/ItemConsumedView.vue +++ b/app/imports/ui/properties/components/actions/ItemConsumedView.vue @@ -12,12 +12,11 @@ >