diff --git a/src/Mods/SpecialForce/FirebaseTour.js b/src/Mods/SpecialForce/FirebaseTour.js index 6a629077790361e4bdf0c90622a8ff6372136de2..db99b63fffa4513aeda3d1c8c4a50b5592155239 100644 --- a/src/Mods/SpecialForce/FirebaseTour.js +++ b/src/Mods/SpecialForce/FirebaseTour.js @@ -177,31 +177,29 @@ App.UI.firebaseTour = function() { App.UI.DOM.appendNewElement("h3", node, `Launch Bay`); if (V.SF.Squad.Satellite > 0) { r.push(App.SF.UnitText('sat')); - if (V.SF.SatLaunched < 1) { - r.push("div", node, App.UI.DOM.link( - "Launch it into geostationary orbit.", + const t = new DocumentFragment(); + t.append("You ", App.UI.DOM.makeElement("span", `cannot`, "red"), " upgrade the satellite once it has been launched."); + const inOrbit = V.SF.SatLaunched < 1; + const link = App.UI.DOM.makeElement("div", + App.UI.DOM.link( + (inOrbit ? "Recall the satellite." : "Launch it into geostationary orbit."), () => { - V.SF.SatLaunched = 1; + V.SF.SatLaunched = (inOrbit ? 1 : 0); App.UI.reload(); }, [], "", - `You <span class='red'>cannot</span> upgrade the satellite once it has been launched.` - )); - } else { - r.push("div", node, App.UI.DOM.link( - "Recall the satellite.", - () => { - V.SF.SatLaunched = 0; - App.UI.reload(); - } - )); - } + (inOrbit ? t : ``) + ) + ); + r.push(link); } r.push( App.SF.UnitText('GR'), App.SF.UnitText('ms') ); + App.Events.addParagraph(node, r); + r = []; } if (App.SF.unlocked.navalYard()) { diff --git a/src/Mods/SpecialForce/SpecialForce.js b/src/Mods/SpecialForce/SpecialForce.js index 633404b9f0966c154ecd5730bfba950b74fc0bce..dec0588b4e56f2f5783b16984504f59eb3a38aed 100644 --- a/src/Mods/SpecialForce/SpecialForce.js +++ b/src/Mods/SpecialForce/SpecialForce.js @@ -1313,11 +1313,11 @@ App.SF.AAR = function(endWeekCall = 1) { Multiplier.unit += 12 * S.GunS + 3 * Math.pow(S.GunS, 2) * cost.a; upkeep += (70 * S.GunS) * cost.b; } - if (S.Satellite.lv > 0 && S.Satellite.InOrbit > 0) { - FNG += S.Satellite.lv; - Trade += 0.25 * S.Satellite.lv; - Multiplier.unit += 15 * S.Satellite.lv + 5 * Math.pow(S.Satellite.lv, 2) * cost.a; - upkeep += (85 * S.Satellite.lv) * cost.b; + if (S.Satellite > 0 && S.SatLaunched > 0) { + FNG += S.Satellite; + Trade += 0.25 * S.Satellite; + Multiplier.unit += 15 * S.Satellite + 5 * Math.pow(S.Satellite, 2) * cost.a; + upkeep += (85 * S.Satellite) * cost.b; } if (S.GiantRobot > 0) { FNG += S.GiantRobot; @@ -1570,7 +1570,7 @@ App.SF.UpgradeCost = function(cost, unit) { "use strict"; const S = V.SF.Squad; let value = cost * App.SF.env() * Math.pow(1.15, unit + 1); - if ([S.AircraftCarrier, S.Drones, S.GiantRobot, S.GunS, S.MissileSilo, S.Satellite.lv, S.SpacePlane, S.Sub].includes(unit)) { + if ([S.AircraftCarrier, S.Drones, S.GiantRobot, S.GunS, S.MissileSilo, S.Satellite, S.SpacePlane, S.Sub].includes(unit)) { value *= V.HackingSkillMultiplier; } return Math.ceil(value); @@ -2320,9 +2320,9 @@ App.SF.UnitText = function(input) { } return text; case 'sat': - if (S.Satellite.lv >= 1) { + if (S.Satellite >= 1) { const text12 = `<br> <b>Satellite:</b>`; - if (S.Satellite.lv >= 2) { + if (S.Satellite >= 2) { if (V.SF.SatLaunched === 0) { loc1 = `The satellite is being worked on in the Launch Bay.`; } else { @@ -2330,30 +2330,30 @@ App.SF.UnitText = function(input) { } gyro = `A suite of sensors have been installed to ensure the satellite can detect attitude and orbital altitude.`; } - if (S.Satellite.lv >= 3) { + if (S.Satellite >= 3) { telemetry = `Telemetry systems have been installed to communicate with the satellite in orbit, with strong encryption measures.`; } - if (S.Satellite.lv >= 4) { + if (S.Satellite >= 4) { thrusters = `Thrusters have been installed to control satellite attitude and orbit.`; } - if (S.Satellite.lv >= 5) { + if (S.Satellite >= 5) { solar = `A massive folding solar panel array, combined with the latest in battery technology allow the satellite to store an enormous amount of energy relatively quickly.`; surviv = `Enough of the satellite has been finished that it can expect to survive for a significant period of time in space.`; } - if (S.Satellite.lv >= 6) { + if (S.Satellite >= 6) { laser1 = `A laser cannon has been mounted facing the earth, capable of cutting through steel in seconds`; heat = ` while generating a large amount of heat.`; } - if (S.Satellite.lv >= 7) { + if (S.Satellite >= 7) { heat = `. The installed heatsink allows the laser cannon to fire more frequently without damaging the satellite.`; } - if (S.Satellite.lv >= 8) { + if (S.Satellite >= 8) { reactor = `A small, efficient nuclear reactor has been installed to continue generating energy while in the Earth's shadow.`; } - if (S.Satellite.lv >= 9) { + if (S.Satellite >= 9) { lens = `A higher quality and adjustable lens has been installed on the laser, allowing scalpel precision on armor or wide-area blasts on unarmored targets.`; } - if (S.Satellite.lv >= 10) { + if (S.Satellite >= 10) { kin = `A magazine of directable tungsten rods have been mounted to the exterior of the satellite, allowing for kinetic bombardment roughly equal to a series of nuclear blasts.`; } text += `${text12} ${loc1} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser1} ${heat} ${lens} ${kin}`;