diff --git a/FreeSpacer/FreeSpacer.css b/FreeSpacer/FreeSpacer.css
index b3d794da0f..6df7785e27 100644
--- a/FreeSpacer/FreeSpacer.css
+++ b/FreeSpacer/FreeSpacer.css
@@ -1868,11 +1868,11 @@ input.sheet-toolDeselect:checked ~ .sheet-threatDirection
}
/*Hide Charge or Supply box by tool*/
-.sheet-shipSheet input.sheet-colorChanger[value="Launcher"] ~ .sheet-salvoChargeBox,
-.sheet-shipSheet input.sheet-colorChanger[value="Sensors"] ~ .sheet-salvoSupplyBox,
-.sheet-shipSheet input.sheet-colorChanger[value="Grav Drive"] ~ .sheet-salvoSupplyBox,
-.sheet-shipSheet input.sheet-colorChanger[value="Pulse Array"] ~ .sheet-salvoSupplyBox,
-.sheet-shipSheet input.sheet-colorChanger[value="Shields"] ~ .sheet-salvoSupplyBox
+.sheet-shipSheet input.sheet-colorChanger[value="Launcher"] + div.sheet-salvoChargeBox,
+.sheet-shipSheet input.sheet-colorChanger[value="Sensors"] + div.sheet-salvoSupplyBox,
+.sheet-shipSheet input.sheet-colorChanger[value="Grav Drive"] + div.sheet-salvoSupplyBox,
+.sheet-shipSheet input.sheet-colorChanger[value="Pulse Array"] + div.sheet-salvoSupplyBox,
+.sheet-shipSheet input.sheet-colorChanger[value="Shields"] + div.sheet-salvoSupplyBox
{
display: none;
}
diff --git a/FreeSpacer/FreeSpacer.html b/FreeSpacer/FreeSpacer.html
index 490482b4b4..a71ffa208a 100644
--- a/FreeSpacer/FreeSpacer.html
+++ b/FreeSpacer/FreeSpacer.html
@@ -2158,7 +2158,7 @@
- Atmospheric Thrusters: 2
+ Atmospheric Thrusters: 2
Orbital Injectors: 1
Kinetic Deflector: 2
Energy Dissipater: 2
@@ -2177,7 +2177,7 @@
Atmospheric Thrusters: 2
Orbital Injectors: 3
- Wake Generator: 3
+ Wake Generator: 3
Kinetic Deflector: 2
Energy Dissipater: 2
Tractor Lifter: 3
@@ -2200,7 +2200,7 @@
Survey Sensors: 4
Depth Analyser: 3
-
+
@@ -2220,6 +2220,7 @@
+
@@ -2227,6 +2228,7 @@
+
@@ -10023,6 +10025,7 @@
setObj.salvoSpecialty = "Choose a Specialty";
setObj.salvoTool = "Choose a Tool";
setObj.salvoAdvantage = 0;
+ setObj.salvoCharge = 0;
//Reset the basic Reactor settings
setObj.salvoChargeDirection = "Charged";
@@ -10055,6 +10058,8 @@
setObj.salvoToolShip = "Choose a Tool";
setObj.salvoAdvantageShip = 0;
setObj.salvoShuttleTrailerPrinter = 0;
+ setObj.salvoChargeShip = 0;
+ setObj.salvoSupply = 0;
//Reset Operator List
let index = 1;
@@ -10273,6 +10278,8 @@
setObj.salvoMod19 = 0;
setObj.salvoMod20 = 0;
+ setObj.salvoCharge = 0;
+
setObj.salvoChargeDirection = "Charged";
if (values.ReactorOvercharge == "1")
@@ -10302,30 +10309,32 @@
setObj.salvoModuleFitting = 0;
setObj.salvoShuttleTrailerPrinter = 0;
setObj.salvoShuttleTrailer = "Choose a Trailer";
-
- //Determine the Reactor to be monitored
- let overcharge = 0;
- let charge = 0;
+ setObj.salvoChargeShip = 0;
+ setObj.salvoSupply = 0;
+
+ //Reset the basic Reactor settings for the Reactor to be monitored
+ setObj.salvoChargeDirection = "Charged";
if (values.salvoToolShip == "Launch Bay")
{
- overcharge = parseInt(values.tugReactorOvercharge) || 0;
- charge = parseInt(values.tugReactorCharge) || 0;
+ if (values.tugReactorOvercharge == 1)
+ {
+ setObj.salvoChargeDirection = "Overcharged";
+ }
+ else if (values.tugReactorCharge <= 0)
+ {
+ setObj.salvoChargeDirection = "Uncharged";
+ }
}
else
{
- overcharge = parseInt(values.shipReactorOvercharge) || 0;
- charge = parseInt(values.shipReactorCharge) || 0;
- }
-
- //Reset the basic Reactor settings
- setObj.salvoChargeDirection = "Charged";
- if (overcharge == "1")
- {
- setObj.salvoChargeDirection = "Overcharged";
- }
- else if (charge <= 0)
- {
- setObj.salvoChargeDirection = "Uncharged";
+ if (values.shipReactorOvercharge == 1)
+ {
+ setObj.salvoChargeDirection = "Overcharged";
+ }
+ else if (values.shipReactorCharge <= 0)
+ {
+ setObj.salvoChargeDirection = "Uncharged";
+ }
}
//Reset the basic Supply settings
@@ -10351,6 +10360,8 @@
setObj.salvoShipMod3 = 0;
setObj.salvoShipMod4 = 0;
setObj.salvoShuttleSystem = "Select System";
+ setObj.salvoChargeShip = 0;
+ setObj.salvoSupply = 0;
setAttrs(setObj);
});
@@ -11598,7 +11609,7 @@
"supply", "salvoShuttleTrailerPrinter",
"tugReactorCharge", "tugReactorOvercharge",
"salvoShipMod1", "salvoShipMod2", "salvoShipMod3", "salvoShipMod4",
- "salvoModuleFitting", "salvoShuttleTrailer","salvoShuttleSystem",
+ "salvoModuleFitting", "salvoShuttleTrailer", "salvoShuttleSystem",
"SensorsSurveySensor", "SensorsDepthAnalyser", "SensorsAreaEffect", "SensorsRangeCompensator",
"gravDriveAtmosphericThrusters", "gravDriveOrbitalInjectors", "gravDriveFoldInducer", "gravDriveWakeGenerator",
"PulseArraySpaceTargeter", "PulseArraySurfaceTargeter", "PulseArrayTractorLifter",
@@ -11607,41 +11618,52 @@
const setObj = {};
let rating = 0;
+ let charge = 0;
+
+ //Set Reactor Max
+ let maxCharge = 0;
+ //console.log("Max Charge: ", maxCharge);
//Determine the Reactor to be monitored
- let overcharge = 0;
- let charge = 0;
if (values.salvoToolShip == "Launch Bay")
{
- overcharge = parseInt(values.tugReactorOvercharge) || 0;
- charge = parseInt(values.tugReactorCharge) || 0;
+ maxCharge = parseInt(values.tugReactorCharge) || 0;
+ maxCharge += parseInt(values.tugReactorOvercharge) || 0;
+
+ //Reset the basic Reactor settings
+ setObj.salvoChargeDirection = "Charged";
+
+ if (values.tugReactorOvercharge == "1")
+ {
+ setObj.salvoChargeDirection = "Overcharged";
+ }
+ else if (values.tugReactorCharge <= 0)
+ {
+ setObj.salvoChargeDirection = "Uncharged";
+ }
}
else
{
- overcharge = parseInt(values.shipReactorOvercharge) || 0;
- charge = parseInt(values.shipReactorCharge) || 0;
- }
+ maxCharge = parseInt(values.shipReactorCharge) || 0;
+ maxCharge += parseInt(values.shipReactorOvercharge) || 0;
- //Set Reactor Max
- let maxCharge = charge;
- maxCharge += overcharge;
- //console.log("Max Charge: ", maxCharge);
+ //Reset the basic Reactor settings
+ setObj.salvoChargeDirection = "Charged";
+
+ if (values.shipReactorOvercharge == "1")
+ {
+ setObj.salvoChargeDirection = "Overcharged";
+ }
+ else if (values.shipReactorCharge <= 0)
+ {
+ setObj.salvoChargeDirection = "Uncharged";
+ }
+ }
//Set Supply and supplyTotal
let supplySpent = 0;
let supplyTotal = parseInt(values.supply) || 0;
- //Reset the basic Reactor settings
- setObj.salvoChargeDirection = "Charged";
- if (overcharge == "1")
- {
- setObj.salvoChargeDirection = "Overcharged";
- }
- else if (charge <= 0)
- {
- setObj.salvoChargeDirection = "Uncharged";
- }
-
//Set the status of the Supply box
setObj.salvoSupplyDirection = "Supplied";
if (values.supply <= 0)
@@ -12149,19 +12171,93 @@
console.log(setObj);
setAttrs(setObj);
}
- //Shuttle
+ //Shuttle
else if (values.salvoToolShip == "Launch Bay")
{
let printTrailer = parseInt(values.salvoShuttleTrailerPrinter) || 0;
//Equip Trailer, set supply Spent, set rating from Mods
+ //Transport Trailer
if (values.salvoShuttleTrailer == "Transport")
{
if (printTrailer == 1)
{
supplySpent = 6;
}
+ //Set rating if Pulse Drive is selected
+ if (values.salvoShuttleSystem == "Pulse Drive")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++; setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 1;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Shields is selected
+ else if (values.salvoShuttleSystem == "Shields")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 2;
+ charge++; setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
}
+ //Flight Trailer
else if (values.salvoShuttleTrailer == "Flight")
{
//Spend Supply if Trailer printer is checked
@@ -12175,7 +12271,8 @@
if (values.salvoShipMod1 == "1")
{
rating += 4;
- charge++; setObj.salvoChargeDirection = "Charged";
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
@@ -12191,11 +12288,12 @@
if (values.salvoShipMod2 == "1")
{
rating += 3;
- charge++; setObj.salvoChargeDirection = "Charged";
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
- setObj.salvoShipMod1 = 0;
+ setObj.salvoShipMod2 = 0;
setObj.salvoChargeDirection = "Insufficient Charge";
}
else if (charge == maxCharge)
@@ -12210,7 +12308,8 @@
if (values.salvoShipMod1 == "1")
{
rating += 2;
- charge++; setObj.salvoChargeDirection = "Charged";
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
@@ -12226,7 +12325,304 @@
if (values.salvoShipMod2 == "1")
{
rating += 2;
- charge++; setObj.salvoChargeDirection = "Charged";
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ }
+ //Drop Trailer
+ else if (values.salvoShuttleTrailer == "Drop")
+ {
+ if (printTrailer == 1)
+ {
+ supplySpent = 12;
+ }
+ //Set rating if Pulse Drive is selected
+ if (values.salvoShuttleSystem == "Pulse Drive")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 1;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Shields is selected
+ else if (values.salvoShuttleSystem == "Shields")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ }
+ //Boarding Trailer
+ else if (values.salvoShuttleTrailer == "Boarding")
+ {
+ if (printTrailer == 1)
+ {
+ supplySpent = 12;
+ }
+ //Set rating if Pulse Drive is selected
+ if (values.salvoShuttleSystem == "Pulse Drive")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 1;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Shields is selected
+ else if (values.salvoShuttleSystem == "Shields")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod3 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod3 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ }
+ //Tractor Trailer
+ else if (values.salvoShuttleTrailer == "Tractor")
+ {
+ if (printTrailer == 1)
+ {
+ supplySpent = 12;
+ }
+ //Set rating if Pulse Drive is selected
+ if (values.salvoShuttleSystem == "Pulse Drive")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ if (values.salvoShipMod3 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod3 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Shields is selected
+ else if (values.salvoShuttleSystem == "Shields")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ else if (values.salvoShuttleSystem == "Pulse Array")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
//Unclick the Mod if insuficient charge
if (charge > maxCharge)
{
@@ -12240,44 +12636,318 @@
}
}
}
-
- else if (values.salvoShuttleTrailer == "Drop")
- {
- if (printTrailer == 1)
- {
- supplySpent = 12;
- }
- }
- else if (values.salvoShuttleTrailer == "Boarding")
- {
- if (printTrailer == 1)
- {
- supplySpent = 12;
- }
- }
- else if (values.salvoShuttleTrailer == "Tractor")
- {
- if (printTrailer == 1)
- {
- supplySpent = 12;
- }
- }
+ //Survey Trailer
else if (values.salvoShuttleTrailer == "Survey")
{
if (printTrailer == 1)
{
supplySpent = 15;
}
+ //Set rating if Pulse Drive is selected
+ if (values.salvoShuttleSystem == "Pulse Drive")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 1;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Shields is selected
+ else if (values.salvoShuttleSystem == "Shields")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Sensors is selected
+ else if (values.salvoShuttleSystem == "Sensors")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 4;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
}
+ //Fighter Trailer
else if (values.salvoShuttleTrailer == "Fighter")
{
if (printTrailer == 1)
{
supplySpent = 18;
}
+ //Set rating if Pulse Drive is selected
+ if (values.salvoShuttleSystem == "Pulse Drive")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Shields is selected
+ else if (values.salvoShuttleSystem == "Shields")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Pulse Array is selected
+ else if (values.salvoShuttleSystem == "Pulse Array")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 3;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
}
+ else
+ {
+ //Set rating if Pulse Drive is selected
+ if (values.salvoShuttleSystem == "Pulse Drive")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
-
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 1;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ //Set rating if Shields is selected
+ else if (values.salvoShuttleSystem == "Shields")
+ {
+ if (values.salvoShipMod1 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod1 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+
+ if (values.salvoShipMod2 == "1")
+ {
+ rating += 2;
+ charge++;
+ setObj.salvoChargeDirection = "Charged";
+ //Unclick the Mod if insuficient charge
+ if (charge > maxCharge)
+ {
+ setObj.salvoShipMod2 = 0;
+ setObj.salvoChargeDirection = "Insufficient Charge";
+ }
+ else if (charge == maxCharge)
+ {
+ setObj.salvoChargeDirection = "Expended";
+ }
+ }
+ }
+ }
setObj.salvoToolRatingShip = rating;
setObj.salvoChargeShip = charge;