diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 9298f55..2b22b16 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -194,8 +194,13 @@ export class PegasusActor extends Actor { let comp = this.items.filter(item => item.type == 'vehiclemodule'); return comp; } - getVehicleWeaponModules() { - let comp = this.items.filter(item => item.type == 'vehicleweaponmodule' && item.system.activated); + getVehicleWeaponModules( activated = false ) { + let comp = [] + if (activated ) { + comp = this.items.filter(item => item.type == 'vehicleweaponmodule' && item.system.activated) + } else { + comp = this.items.filter(item => item.type == 'vehicleweaponmodule' ) + } return comp; } @@ -1801,7 +1806,7 @@ export class PegasusActor extends Actor { } addVehicleWeapons(rollData, vehicle) { if (vehicle) { - let modules = vehicle.items.filter(vehicle => vehicle.type == "vehicleweaponmodule") + let modules = vehicle.items.filter(item => item.type == "vehicleweaponmodule" && item.system.activated) if (modules && modules.length > 0) { for (let module of modules) { rollData.vehicleWeapons.push({ label: `Weapon ${module.name}`, type: "item", applied: false, weapon: module, value: module.system.damagedicevalue })