Small progress on tabletop

This commit is contained in:
Stefan Zermatten
2021-10-16 19:05:35 +02:00
parent ea68cdf86f
commit 247353f0ed
22 changed files with 202 additions and 224 deletions

View File

@@ -10,13 +10,13 @@ export default function computeAction(computation, node){
if (!prop.resources) return;
prop.resources.itemsConsumed.forEach(itemConsumed => {
if (!itemConsumed.itemId) return;
if (itemConsumed.available < itemConsumed.quantity.value){
if (itemConsumed.available < itemConsumed.quantity?.value){
prop.insufficientResources = true;
}
});
prop.resources.attributesConsumed.forEach(attConsumed => {
if (!attConsumed.variableName) return;
if (attConsumed.available < attConsumed.quantity.value){
if (attConsumed.available < attConsumed.quantity?.value){
prop.insufficientResources = true;
}
});