Long attribute consumed values fixed, string values disable action
This commit is contained in:
@@ -16,7 +16,7 @@ export default function computeAction(computation, node) {
|
|||||||
});
|
});
|
||||||
prop.resources.attributesConsumed.forEach(attConsumed => {
|
prop.resources.attributesConsumed.forEach(attConsumed => {
|
||||||
if (!attConsumed.variableName) return;
|
if (!attConsumed.variableName) return;
|
||||||
if (attConsumed.available < attConsumed.quantity?.value) {
|
if (!(attConsumed.available >= attConsumed.quantity?.value)) {
|
||||||
prop.insufficientResources = true;
|
prop.insufficientResources = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,12 +4,13 @@
|
|||||||
:class="insufficient && 'error--text'"
|
:class="insufficient && 'error--text'"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="mr-2"
|
class="mr-2 text-no-wrap text-truncate"
|
||||||
style="width: 24px; text-align: center;"
|
style="min-width: 24px; text-align: center;"
|
||||||
>
|
>
|
||||||
{{ model.quantity && model.quantity.value }}
|
{{ model.quantity && model.quantity.value }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
v-if="(typeof model.quantity.value !== 'string')"
|
||||||
class="text-no-wrap text-truncate"
|
class="text-no-wrap text-truncate"
|
||||||
>
|
>
|
||||||
{{ model.statName || model.variableName }}
|
{{ model.statName || model.variableName }}
|
||||||
|
|||||||
Reference in New Issue
Block a user