From 0fb7dab0b8832f8032fc6810841fad1649ffdf2a Mon Sep 17 00:00:00 2001 From: Cassie Levett Date: Mon, 25 May 2020 08:52:23 -0500 Subject: [PATCH] fix a bug in primaries (#6567) --- Shadowrun4thEdition/Shadowrun4thEdition.html | 10 +++++----- Shadowrun4thEdition/Shadowrun4thEdition.pug | 2 +- Shadowrun4thEdition/src/js/scripts.js | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Shadowrun4thEdition/Shadowrun4thEdition.html b/Shadowrun4thEdition/Shadowrun4thEdition.html index f4123975c7..05c636e8f2 100644 --- a/Shadowrun4thEdition/Shadowrun4thEdition.html +++ b/Shadowrun4thEdition/Shadowrun4thEdition.html @@ -1,4 +1,4 @@ -
Shadowrun

Character

Player

/w GM

wounds

modifiers

edge

+
Shadowrun

Character

Player

/w GM

wounds

modifiers

edge

Personal Data

@@ -1284,18 +1284,18 @@ const updateRepeatingPrimary = (eventinfo, type) => { if (eventinfo.newValue === undefined) { return false } else if (eventinfo.newValue === 'primary') { - const constructedAttributes = type === 'armor' ? shadowrunFunctions.addRepRow(repRowID, sheetAttributes.armorAttributes) : shadowrunFunctions.contructRepeatingWeaponAttributes(repRowID, type); + const constructedAttributes = type === 'armor' ? processingFunctions.shadowrun.addRepRow(repRowID, sheetAttributes.armorAttributes) : processingFunctions.shadowrun.contructRepeatingWeaponAttributes(repRowID, type); //get the attributes to update primary getAttrs(constructedAttributes, attrs => { - const update = type === 'armor' ? shadowrunFunctions.updatePrimaryArmor(attrs) : shadowrunFunctions.updatePrimaryWeapons(attrs); + const update = type === 'armor' ? processingFunctions.shadowrun.updatePrimaryArmor(attrs) : processingFunctions.shadowrun.updatePrimaryWeapons(attrs); processingFunctions.setAttributes(update) }) //Reset all the other primaries - shadowrunFunctions.resetRepeatingFieldsPrimaries(`repeating_${type}`, repRowID) + processingFunctions.shadowrun.resetRepeatingFieldsPrimaries(`repeating_${type}`, repRowID) } else { - const update = type === 'armor' ? shadowrunFunctions.resetPrimaryArmor() : shadowrunFunctions.resetPrimaryWeapon(type); + const update = type === 'armor' ? processingFunctions.shadowrun.resetPrimaryArmor() : processingFunctions.shadowrun.resetPrimaryWeapon(type); processingFunctions.setAttributes(update) } } diff --git a/Shadowrun4thEdition/Shadowrun4thEdition.pug b/Shadowrun4thEdition/Shadowrun4thEdition.pug index ce13fa24b4..7273467f02 100644 --- a/Shadowrun4thEdition/Shadowrun4thEdition.pug +++ b/Shadowrun4thEdition/Shadowrun4thEdition.pug @@ -1,4 +1,4 @@ -input(name='attr_version' type='hidden' value='1.02') +input(name='attr_version' type='hidden' value='1.03') //- CHARACTER SHEET PAGE input.sheet_type(name='attr_sheet_type' type='hidden' value='pc') diff --git a/Shadowrun4thEdition/src/js/scripts.js b/Shadowrun4thEdition/src/js/scripts.js index b39f76b370..f75b6c592c 100644 --- a/Shadowrun4thEdition/src/js/scripts.js +++ b/Shadowrun4thEdition/src/js/scripts.js @@ -55,18 +55,18 @@ const updateRepeatingPrimary = (eventinfo, type) => { if (eventinfo.newValue === undefined) { return false } else if (eventinfo.newValue === 'primary') { - const constructedAttributes = type === 'armor' ? shadowrunFunctions.addRepRow(repRowID, sheetAttributes.armorAttributes) : shadowrunFunctions.contructRepeatingWeaponAttributes(repRowID, type); + const constructedAttributes = type === 'armor' ? processingFunctions.shadowrun.addRepRow(repRowID, sheetAttributes.armorAttributes) : processingFunctions.shadowrun.contructRepeatingWeaponAttributes(repRowID, type); //get the attributes to update primary getAttrs(constructedAttributes, attrs => { - const update = type === 'armor' ? shadowrunFunctions.updatePrimaryArmor(attrs) : shadowrunFunctions.updatePrimaryWeapons(attrs); + const update = type === 'armor' ? processingFunctions.shadowrun.updatePrimaryArmor(attrs) : processingFunctions.shadowrun.updatePrimaryWeapons(attrs); processingFunctions.setAttributes(update) }) //Reset all the other primaries - shadowrunFunctions.resetRepeatingFieldsPrimaries(`repeating_${type}`, repRowID) + processingFunctions.shadowrun.resetRepeatingFieldsPrimaries(`repeating_${type}`, repRowID) } else { - const update = type === 'armor' ? shadowrunFunctions.resetPrimaryArmor() : shadowrunFunctions.resetPrimaryWeapon(type); + const update = type === 'armor' ? processingFunctions.shadowrun.resetPrimaryArmor() : processingFunctions.shadowrun.resetPrimaryWeapon(type); processingFunctions.setAttributes(update) } }