Made ammo consumed available in scope as ~ammo
This commit is contained in:
@@ -243,6 +243,9 @@ function spendResources(prop, actionContext) {
|
|||||||
gainLog.push(logName + ': ' + -itemConsumed.quantity.value);
|
gainLog.push(logName + ': ' + -itemConsumed.quantity.value);
|
||||||
}
|
}
|
||||||
ammoChildren.push(...getItemChildren(item, actionContext, prop));
|
ammoChildren.push(...getItemChildren(item, actionContext, prop));
|
||||||
|
// simulate the increment and add the item to the action scope
|
||||||
|
item.quantity -= itemConsumed.quantity.value;
|
||||||
|
actionContext.scope['~ammo'] = item;
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
actionContext.addLog({
|
actionContext.addLog({
|
||||||
|
|||||||
Reference in New Issue
Block a user