From 9d833a1fe301ec6015a22a81e25e3ff3680ba079 Mon Sep 17 00:00:00 2001 From: Thaum Rystra <9525416+ThaumRystra@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:48:48 +0200 Subject: [PATCH] Removed ammo as ~ammo, items should be applied #ammo will be the way to referenced last used ammo --- .../api/engine/actions/applyPropertyByType/applyAction.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js index 433d4ec1..4cdb7d69 100644 --- a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js +++ b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js @@ -243,9 +243,14 @@ function spendResources(prop, actionContext) { gainLog.push(logName + ': ' + -itemConsumed.quantity.value); } ammoChildren.push(...getItemChildren(item, actionContext, prop)); + /* Disabled this for now. Applying an item as ammo should be its own "applyPropertyByType" + * which will set #item correctly before applying the item's children + * and make triggers compatible in the future + // simulate the increment and add the item to the action scope item.quantity -= itemConsumed.quantity.value; actionContext.scope['~ammo'] = item; + */ }); } catch (e) { actionContext.addLog({