Fixed uses left not logging correctly in actions
This commit is contained in:
@@ -178,7 +178,7 @@ function applyChildren(node, args){
|
|||||||
|
|
||||||
function spendResources({prop, log, scope}){
|
function spendResources({prop, log, scope}){
|
||||||
// Check Uses
|
// Check Uses
|
||||||
if (prop.usesLeft < 0){
|
if (prop.usesLeft <= 0){
|
||||||
log.content.push({
|
log.content.push({
|
||||||
name: 'Error',
|
name: 'Error',
|
||||||
value: `${prop.name || 'action'} does not have enough uses left`,
|
value: `${prop.name || 'action'} does not have enough uses left`,
|
||||||
@@ -250,7 +250,7 @@ function spendResources({prop, log, scope}){
|
|||||||
});
|
});
|
||||||
log.content.push({
|
log.content.push({
|
||||||
name: 'Uses left',
|
name: 'Uses left',
|
||||||
value: prop.usesLeft - (prop.usesUsed || 0) - 1,
|
value: prop.usesLeft - 1,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user