Use Computer
-
+
+
+
+
=
@@ -4211,7 +4249,7 @@
For help, please see the wiki page.
-Last updated : 31 August 2023
+Last updated : 19 September 2023
@@ -5229,6 +5267,21 @@
setAttrs({"Status": status});
});
});
+
+on('change:QueryAttackModifier', () => {
+ const section = 'attack';
+ repeatingSectionIds(`repeating_${section}`, idarray => {
+ const fieldnames = idarray.reduce((rows,id) => [...rows, `repeating_${section}_${id}_vehicle-AttackModifierCheckbox`], '');
+ getAttrs(['vehicle-AttackModifierCheckbox', ...fieldnames], v => {
+ const output = {};
+ idarray.forEach(id => {
+ output[`repeating_${section}_${id}_vehicle-AttackModifierCheckbox`] = v['vehicle-AttackModifierPrompt'];
+ });
+ setAttrs(output);
+ });
+ });
+});
+
on("change:FocusHouseRule", function() {
getAttrs(["FocusHouseRule","AcrobaticsFormula","AthleticsFormula","ClimbFormula","DeceptionFormula","EnduranceFormula","GatherInformationFormula","InitiativeFormula","JumpFormula","Knowledge-BureaucracyFormula","Knowledge-GalacticLoreFormula","Knowledge-LifeSciencesFormula","Knowledge-PhysicalScienceFormula","Knowledge-SocialScienceFormula","Knowledge-TacticsFormula","Knowledge-TechnologyFormula","MechanicsFormula","PerceptionFormula","PersuasionFormula","PilotFormula","RideFormula","StealthFormula","SurvivalFormula","SwimFormula","TreatInjuryFormula","UseComputerFormula","UsetheForceFormula"], function(values) {
let FHR = values.FocusHouseRule||0;
@@ -5560,6 +5613,38 @@
setAttrs({"repeating_attack_vehicle-WeaponPosition":weaponposition});
});
});
+/* THIS SECTION IS NO LONGER NEEDED, BUT SOMETHING LIKE IT WILL BE NECESSARY FOR replace IN THE REPEATING ATTACKS
+on("change:vehicle-AttackModifierPrompt", function(v) {
+ getAttrs(["vehicle-AttackModifierPrompt"], function(v) {
+ let VehicleAttackModPrompt = v["vehicle-AttackModifierPrompt"];
+ console.log("Checkbox: " + VehicleAttackModPrompt);
+ getSectionIDs("repeating_attack", function(IDArray) {
+ var fieldNames = [];
+ var output = [];
+ for (var i=0; i < IDArray.length; i++) {
+ fieldNames.push("repeating_attack_" + IDArray[i] + "_vehicle-AttackModifierCheckbox");
+ output.push("repeating_attack_" + IDArray[i] + "_vehicle-AttackModifierCheckbox" + ":" + VehicleAttackModPrompt);
+ }
+ console.log(output);
+ setAttrs({output});
+ });
+ });
+});
+
+on('change:vehicle-AttackModifierPrompt', () => {
+ const section = 'attack';
+ repeatingSectionIds(`repeating_${section}`, idarray => {
+ const fieldnames = idarray.reduce((rows,id) => [...rows, `repeating_${section}_${id}_vehicle-AttackModifierCheckbox`], '');
+ getAttrs(['vehicle-AttackModifierCheckbox', ...fieldnames], v => {
+ const output = {};
+ idarray.forEach(id => {
+ output[`repeating_${section}_${id}_vehicle-AttackModifierCheckbox`] = v['vehicle-AttackModifierPrompt'];
+ });
+ setAttrs(output);
+ });
+ });
+});
+*/
// ====== Functions ====== \\
var ArmorPerception = function() {