diff --git a/data/_ui/interfaces.txt b/data/_ui/interfaces.txt index eb0780ea59a8..c9ee6c4e512e 100644 --- a/data/_ui/interfaces.txt +++ b/data/_ui/interfaces.txt @@ -75,6 +75,8 @@ color "escort split fuel" .35 .31 .215 0. color "flagship highlight" .5 .8 .2 0. +color "cloak highlight" .45 0. 0. .65 + color "drag select" .2 1. 0. 0. # Colors used for drawing mission or job pointers on the map, diff --git a/data/_ui/tooltips.txt b/data/_ui/tooltips.txt index 256aa513ecd1..3a60f41cdf13 100644 --- a/data/_ui/tooltips.txt +++ b/data/_ui/tooltips.txt @@ -1395,6 +1395,9 @@ tip "Ship outlines in shops" tip "Ship outlines in HUD" `Controls the display of your flagship and target ship icons in the HUD. When fancy, applies a sobel filter to the sprites. (This can result in high GPU load for some ships on very old or low performance computers.) When fast, just uses the ship's sprite.` +tip "Cloaked ship outlines" + `Controls the display of cloaked escorts. When fancy, causes the ship to become transparent and applies a red outline. When fast, simply shifts the ship to being red.` + tip "Show status overlays" `Display status overlays over top of all ships when in flight. Status overlays display a ship's shields and hull. If the damaged option is chosen, overlays only appear on ships that have taken damage.` diff --git a/data/human/deep missions.txt b/data/human/deep missions.txt index 66ae62b8516a..e90920428f45 100644 --- a/data/human/deep missions.txt +++ b/data/human/deep missions.txt @@ -802,6 +802,9 @@ mission "Deep: Interrogation" attributes "spaceport" to offer has "Deep Archaeology 5: done" + or + not "chosen sides" + has "main plot completed" on offer log `Was interrogated by the Deep for helping Albert Foster. The Deep now knows that Albert Foster thinks that there is an artificial singularity on Midgard.` @@ -1711,6 +1714,9 @@ mission "Deep: Remnant: Continue Research" to offer has "event: deep: remnant: rest period" has "deep: did reveal remnant" + # If the player received subsequent missions prior to the addition of this one in v0.9.15, do not offer this one. + not "Deep: Remnant: Engines: offered" + on offer conversation `You receive a message from Ivan, the Deep scientist who you helped to discover the Remnant in the Ember Waste. "Captain , it's been so long. The Deep has finally finished reviewing our research in the Ember Waste, and we've been approved for further funding! Please meet us on if you wish to assist us again. Your help would be appreciated, but we will make progress even if you're unable to help."` diff --git a/data/human/fleets.txt b/data/human/fleets.txt index 8a4de3ddbdeb..657ae8775f83 100644 --- a/data/human/fleets.txt +++ b/data/human/fleets.txt @@ -2262,6 +2262,8 @@ fleet "Small Core Pirates" "Headhunter" variant 1 "Headhunter (Particle)" + variant 1 + "Headhunter (Tractor Beam)" variant 1 "Quicksilver" 2 variant 1 @@ -2335,12 +2337,16 @@ fleet "Large Core Pirates" "Splinter (Laser)" 2 variant 1 "Splinter (Proton)" 2 + variant 1 + "Splinter (Tractor Beam)" variant 2 "Falcon" variant 1 "Falcon (Heavy)" variant 1 "Falcon (Laser)" + variant 1 + "Falcon (Tractor Beam)" variant 2 "Firebird" variant 2 @@ -2359,6 +2365,8 @@ fleet "Large Core Pirates" "Protector (Laser)" variant 1 "Protector (Proton)" + variant 1 + "Protector (Tractor Beam)" variant 1 "Protector" diff --git a/data/human/variants.txt b/data/human/variants.txt index 1d485f82bbd0..231efb8807e6 100644 --- a/data/human/variants.txt +++ b/data/human/variants.txt @@ -1641,6 +1641,28 @@ ship "Falcon" "Falcon (Laser Chaser)" "Heavy Laser" 4 "Armageddon Core" +ship "Falcon" "Falcon (Tractor Beam)" + outfits + "Proton Gun" 4 + "Quad Blaster Turret" 2 + "Heavy Anti-Missile Turret" + "Tractor Beam" + "Breeder Reactor" + "LP144a Battery Pack" + "D67-TM Shield Generator" + "Cargo Expansion" + "Laser Rifle" 21 + "Impala Plasma Thruster" + "Orca Plasma Steering" + "Hyperdrive" + gun "Proton Gun" + gun "Proton Gun" + gun "Proton Gun" + gun "Proton Gun" + turret "Heavy Anti-Missile Turret" + turret "Tractor Beam" + turret "Quad Blaster Turret" + turret "Quad Blaster Turret" ship "Falcon" "Falcon (Javelin)" outfits @@ -2352,6 +2374,22 @@ ship "Headhunter" "Headhunter (Strike)" "Hyperdrive" +ship "Headhunter" "Headhunter (Tractor Beam)" + outfits + "Twin Modified Blaster" 2 + "Meteor Missile Pod" 2 + "Meteor Missile" 29 + "Meteor Missile Box" + "Tractor Beam" + "RT-I Radiothermal" + "LP072a Battery Pack" + "D23-QP Shield Generator" + "Cargo Expansion" + "Greyhound Plasma Thruster" + "Greyhound Plasma Steering" + "Hyperdrive" + + ship "Heavy Shuttle" "Heavy Shuttle (Armed)" outfits @@ -3092,6 +3130,33 @@ ship "Protector" "Protector (Quad Blaster)" "Hyperdrive" +ship "Protector" "Protector (Tractor Beam)" + outfits + "Torpedo Launcher" + "Torpedo" 30 + "Quad Blaster Turret" 4 + "Anti-Missile Turret" 2 + "Tractor Beam" 2 + "Fusion Reactor" + "D94-YV Shield Generator" + "D67-TM Shield Generator" + "Water Coolant System" + "Large Radar Jammer" + "Cargo Expansion" 2 + "Laser Rifle" 21 + "Impala Plasma Thruster" + "Greyhound Plasma Steering" + "Hyperdrive" + turret "Tractor Beam" + turret "Quad Blaster Turret" + turret "Anti-Missile Turret" + turret "Quad Blaster Turret" + turret "Quad Blaster Turret" + turret "Anti-Missile Turret" + turret "Quad Blaster Turret" + turret "Tractor Beam" + + ship "Quicksilver" "Quicksilver (Mark II)" outfits @@ -3415,6 +3480,27 @@ ship "Splinter" "Splinter (Proton)" turret "Proton Turret" turret "Anti-Missile Turret" turret "Proton Turret" + + +ship "Splinter" "Splinter (Tractor Beam)" + outfits + outfits + "Twin Modified Blaster" 2 + "Proton Turret" 2 + "Tractor Beam" + "Water Coolant System" + "Fission Reactor" + "LP036a Battery Pack" + "D94-YV Shield Generator" + "Small Radar Jammer" + "Cargo Expansion" + "Laser Rifle" 3 + "X3700 Ion Thruster" + "Impala Plasma Steering" + "Hyperdrive" + turret "Proton Turret" + turret "Tractor Beam" + turret "Proton Turret" # Used in the Hai Reveal campaign by a special Syndicated Security team. Should not be used before. diff --git a/source/AI.cpp b/source/AI.cpp index 784dd0a389a6..1013aeaf872e 100644 --- a/source/AI.cpp +++ b/source/AI.cpp @@ -3878,7 +3878,7 @@ void AI::MovePlayer(Ship &ship, Command &activeCommands) for(const Mission &mission : player.Missions()) { // Don't include invisible and failed missions in the check. - if(!mission.IsVisible() || mission.HasFailed(player)) + if(!mission.IsVisible() || mission.IsFailed(player)) continue; // If the accessible destination of a mission is in this system, and you've been diff --git a/source/CargoHold.cpp b/source/CargoHold.cpp index 14d114ea4f10..97ce906bdcb2 100644 --- a/source/CargoHold.cpp +++ b/source/CargoHold.cpp @@ -584,7 +584,7 @@ int64_t CargoHold::Value(const System *system) const // be charged for any illegal outfits plus the sum of the fines for all // missions. If the returned value is negative, you are carrying something so // bad that it warrants a death sentence. -int CargoHold::IllegalCargoFine(const Government *government) const +int CargoHold::IllegalCargoFine(const Government *government, const PlayerInfo &player) const { int totalFine = 0; // Carrying an illegal outfit is only half as bad as having it equipped. @@ -613,7 +613,7 @@ int CargoHold::IllegalCargoFine(const Government *government) const int fine = it.first->IllegalCargoFine(); if(fine < 0) return fine; - if(!it.first->IsFailed()) + if(!it.first->IsFailed(player)) totalFine += fine; } @@ -622,7 +622,7 @@ int CargoHold::IllegalCargoFine(const Government *government) const int fine = it.first->IllegalCargoFine(); if(fine < 0) return fine; - if(!it.first->IsFailed()) + if(!it.first->IsFailed(player)) totalFine += fine; } diff --git a/source/CargoHold.h b/source/CargoHold.h index 825c4bce876a..5c8d4d069d13 100644 --- a/source/CargoHold.h +++ b/source/CargoHold.h @@ -25,6 +25,7 @@ class DataWriter; class Government; class Mission; class Outfit; +class PlayerInfo; class System; @@ -109,7 +110,7 @@ class CargoHold { // be charged for any illegal outfits plus the sum of the fines for all // missions. If the returned value is negative, you are carrying something so // bad that it warrants a death sentence. - int IllegalCargoFine(const Government *government) const; + int IllegalCargoFine(const Government *government, const PlayerInfo &player) const; // Returns the amount tons of illegal cargo. int IllegalCargoAmount() const; diff --git a/source/DrawList.cpp b/source/DrawList.cpp index 2638e8487748..32dd494500fc 100644 --- a/source/DrawList.cpp +++ b/source/DrawList.cpp @@ -80,14 +80,14 @@ bool DrawList::AddUnblurred(const Body &body) -bool DrawList::AddSwizzled(const Body &body, int swizzle) +bool DrawList::AddSwizzled(const Body &body, int swizzle, double cloak) { Point position = body.Position() - center; Point blur = body.Velocity() - centerVelocity; if(Cull(body, position, blur)) return false; - Push(body, position, blur, 0., swizzle); + Push(body, position, blur, cloak, swizzle); return true; } diff --git a/source/DrawList.h b/source/DrawList.h index e4ca7ed0c4f4..32424b76de57 100644 --- a/source/DrawList.h +++ b/source/DrawList.h @@ -46,7 +46,7 @@ class DrawList { // Add an object that should not be drawn with motion blur. bool AddUnblurred(const Body &body); // Add an object using a specific swizzle (rather than its own). - bool AddSwizzled(const Body &body, int swizzle); + bool AddSwizzled(const Body &body, int swizzle, double cloak = 0.); // Draw all the items in this list. void Draw() const; diff --git a/source/Engine.cpp b/source/Engine.cpp index 558e8dd9e1e5..b5aefb7135c0 100644 --- a/source/Engine.cpp +++ b/source/Engine.cpp @@ -602,15 +602,24 @@ void Engine::Step(bool isActive) } } - // Draw a highlight to distinguish the flagship from other ships. + outlines.clear(); + const Color &cloakColor = *GameData::Colors().Get("cloak highlight"); + if(Preferences::Has("Cloaked ship outlines")) + for(const auto &ship : player.Ships()) + { + if(ship->IsParked() || ship->GetSystem() != player.GetSystem() || ship->Cloaking() == 0.) + continue; + + outlines.emplace_back(ship->GetSprite(), (ship->Position() - center) * zoom, ship->Unit() * zoom, + ship->GetFrame(), Color::Multiply(ship->Cloaking(), cloakColor)); + } + + // Add the flagship outline last to distinguish the flagship from other ships. if(flagship && !flagship->IsDestroyed() && Preferences::Has("Highlight player's flagship")) { - highlightSprite = flagship->GetSprite(); - highlightUnit = flagship->Unit() * zoom; - highlightFrame = flagship->GetFrame(); + outlines.emplace_back(flagship->GetSprite(), (flagship->Position() - center) * zoom, flagship->Unit() * zoom, + flagship->GetFrame(), *GameData::Colors().Get("flagship highlight")); } - else - highlightSprite = nullptr; // Any of the player's ships that are in system are assumed to have // landed along with the player. @@ -1206,13 +1215,10 @@ void Engine::Draw() const for(const AlertLabel &label : missileLabels) label.Draw(); - // Draw the flagship highlight, if any. - if(highlightSprite) + for(const auto &outline : outlines) { - Point size(highlightSprite->Width(), highlightSprite->Height()); - const Color &color = *colors.Get("flagship highlight"); - // The flagship is always in the dead center of the screen. - OutlineShader::Draw(highlightSprite, Point(), size, color, highlightUnit, highlightFrame); + Point size(outline.sprite->Width(), outline.sprite->Height()); + OutlineShader::Draw(outline.sprite, outline.position, size, outline.color, outline.unit, outline.frame); } // Draw flagship velocity indicator const shared_ptr flagship = player.FlagshipPtr(); @@ -2664,13 +2670,14 @@ void Engine::DrawShipSprites(const Ship &ship) bool hasFighters = ship.PositionFighters(); double cloak = ship.Cloaking(); bool drawCloaked = (cloak && ship.IsYours()); + bool fancyCloak = Preferences::Has("Cloaked ship outlines"); auto &itemsToDraw = draw[currentCalcBuffer]; - auto drawObject = [&itemsToDraw, cloak, drawCloaked](const Body &body) -> void + auto drawObject = [&itemsToDraw, cloak, drawCloaked, fancyCloak](const Body &body) -> void { - // Draw cloaked/cloaking sprites swizzled red, and overlay this solid - // sprite with an increasingly transparent "regular" sprite. + // Draw cloaked/cloaking sprites swizzled red or transparent (depending on whether we are using fancy + // cloaking effects), and overlay this solid sprite with an increasingly transparent "regular" sprite. if(drawCloaked) - itemsToDraw.AddSwizzled(body, 27); + itemsToDraw.AddSwizzled(body, fancyCloak ? 9 : 27, fancyCloak ? 0.5 : 0.25); itemsToDraw.Add(body, cloak); }; @@ -2843,27 +2850,27 @@ void Engine::CreateStatusOverlays() for(const auto &it : ships) { - if(!it->GetGovernment() || it->GetSystem() != currentSystem || - it->IsCloaked()) + if(!it->GetGovernment() || it->GetSystem() != currentSystem || (!it->IsYours() && it->Cloaking() == 1.)) continue; // Don't show status for dead ships. if(it->IsDestroyed()) continue; if(it == flagship) - EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::FLAGSHIP], 0); + EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::FLAGSHIP], 0, it->Cloaking()); else if(it->GetGovernment()->IsEnemy()) - EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::ENEMY], 2); + EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::ENEMY], 2, it->Cloaking()); else if(it->IsYours() || it->GetPersonality().IsEscort()) - EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::ESCORT], 1); + EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::ESCORT], 1, it->Cloaking()); else - EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::NEUTRAL], 3); + EmplaceStatusOverlay(it, overlaySettings[Preferences::OverlayType::NEUTRAL], 3, it->Cloaking()); } } -void Engine::EmplaceStatusOverlay(const shared_ptr &it, Preferences::OverlayState overlaySetting, int type) +void Engine::EmplaceStatusOverlay(const shared_ptr &it, Preferences::OverlayState overlaySetting, + int type, double cloak) { if(overlaySetting == Preferences::OverlayState::OFF) return; @@ -2886,6 +2893,10 @@ void Engine::EmplaceStatusOverlay(const shared_ptr &it, Preferences::Overl else alpha = 0.f; } + + if(it->IsYours()) + cloak *= 0.6; + statuses.emplace_back(it->Position() - center, it->Shields(), it->Hull(), - min(it->Hull(), it->DisabledHull()), max(20., width * .5), type, alpha); + min(it->Hull(), it->DisabledHull()), max(20., width * .5), type, alpha * (1. - cloak)); } diff --git a/source/Engine.h b/source/Engine.h index aec13dd2e5af..b7c92ec4672a 100644 --- a/source/Engine.h +++ b/source/Engine.h @@ -22,6 +22,7 @@ this program. If not, see . #include "AsteroidField.h" #include "BatchDrawList.h" #include "CollisionSet.h" +#include "Color.h" #include "Command.h" #include "DrawList.h" #include "EscortDisplay.h" @@ -100,6 +101,21 @@ class Engine { private: + class Outline { + public: + constexpr Outline(const Sprite *sprite, const Point &position, const Point &unit, + const float frame, const Color &color) + : sprite(sprite), position(position), unit(unit), frame(frame), color(color) + { + } + + const Sprite *sprite; + const Point position; + const Point unit; + const float frame; + const Color color; + }; + class Target { public: Point center; @@ -167,7 +183,8 @@ class Engine { void DoGrudge(const std::shared_ptr &target, const Government *attacker); void CreateStatusOverlays(); - void EmplaceStatusOverlay(const std::shared_ptr &ship, Preferences::OverlayState overlaySetting, int value); + void EmplaceStatusOverlay(const std::shared_ptr &ship, Preferences::OverlayState overlaySetting, + int value, double cloak); private: @@ -220,15 +237,13 @@ class Engine { int targetSwizzle = -1; EscortDisplay escorts; AmmoDisplay ammoDisplay; + std::vector outlines; std::vector statuses; std::vector labels; std::vector missileLabels; std::vector> ammo; int jumpCount = 0; const System *jumpInProgress[2] = {nullptr, nullptr}; - const Sprite *highlightSprite = nullptr; - Point highlightUnit; - float highlightFrame = 0.f; int step = 0; diff --git a/source/Government.cpp b/source/Government.cpp index 8c8382ecc8d8..04b32928dadd 100644 --- a/source/Government.cpp +++ b/source/Government.cpp @@ -699,13 +699,13 @@ int Government::Fines(const Ship *ship) const -bool Government::FinesContents(const Ship *ship) const +bool Government::FinesContents(const Ship *ship, const PlayerInfo &player) const { for(auto &it : ship->Outfits()) if(this->Fines(it.first) || this->Condemns(it.first)) return true; - return ship->Cargo().IllegalCargoFine(this); + return ship->Cargo().IllegalCargoFine(this, player); } diff --git a/source/Government.h b/source/Government.h index e2441e9d4d44..a1923eb55ad7 100644 --- a/source/Government.h +++ b/source/Government.h @@ -127,7 +127,7 @@ class Government { int Fines(const Outfit *outfit) const; int Fines(const Ship *ship) const; // Check if given ship has illegal outfits or cargo. - bool FinesContents(const Ship *ship) const; + bool FinesContents(const Ship *ship, const PlayerInfo &player) const; // Get or set the player's reputation with this government. double Reputation() const; diff --git a/source/MapPanel.cpp b/source/MapPanel.cpp index 2e6ce90749ff..5125d3d39459 100644 --- a/source/MapPanel.cpp +++ b/source/MapPanel.cpp @@ -888,7 +888,7 @@ bool MapPanel::IsSatisfied(const Mission &mission) const bool MapPanel::IsSatisfied(const PlayerInfo &player, const Mission &mission) { - return mission.IsSatisfied(player) && !mission.HasFailed(player); + return mission.IsSatisfied(player) && !mission.IsFailed(player); } diff --git a/source/Mission.cpp b/source/Mission.cpp index d7963078e204..5f546754bd84 100644 --- a/source/Mission.cpp +++ b/source/Mission.cpp @@ -879,7 +879,7 @@ bool Mission::IsSatisfied(const PlayerInfo &player) const -bool Mission::HasFailed(const PlayerInfo &player) const +bool Mission::IsFailed(const PlayerInfo &player) const { if(!toFail.IsEmpty() && toFail.Test(player.Conditions())) return true; @@ -893,13 +893,6 @@ bool Mission::HasFailed(const PlayerInfo &player) const -bool Mission::IsFailed() const -{ - return hasFailed; -} - - - bool Mission::OverridesCapture() const { return overridesCapture; @@ -1017,7 +1010,7 @@ bool Mission::Do(Trigger trigger, PlayerInfo &player, UI *ui, const shared_ptr &ship) if(it.second.IsAtLocation(location) && it.second.CanOffer(*this, ship)) { boardingMissions.push_back(it.second.Instantiate(*this, ship)); - if(boardingMissions.back().HasFailed(*this)) + if(boardingMissions.back().IsFailed(*this)) boardingMissions.pop_back(); else return &boardingMissions.back(); @@ -2119,9 +2119,9 @@ bool PlayerInfo::CaptureOverriden(const shared_ptr &ship) const // ship again after accepting the mission. if(!mission) for(const Mission &mission : Missions()) - if(mission.OverridesCapture() && !mission.IsFailed() && mission.SourceShip() == ship.get()) + if(mission.OverridesCapture() && !mission.IsFailed(*this) && mission.SourceShip() == ship.get()) return true; - return mission && mission->OverridesCapture() && !mission->IsFailed() && mission->SourceShip() == ship.get(); + return mission && mission->OverridesCapture() && !mission->IsFailed(*this) && mission->SourceShip() == ship.get(); } @@ -3941,7 +3941,7 @@ void PlayerInfo::CreateMissions() it.second.IsAtLocation(Mission::JOB) ? availableJobs : availableMissions; missions.push_back(it.second.Instantiate(*this)); - if(missions.back().HasFailed(*this)) + if(missions.back().IsFailed(*this)) missions.pop_back(); else if(!it.second.IsAtLocation(Mission::JOB)) hasPriorityMissions |= missions.back().HasPriority(); @@ -4138,7 +4138,7 @@ void PlayerInfo::StepMissions(UI *ui) // If this is a stopover for the mission, perform the stopover action. mission.Do(Mission::STOPOVER, *this, ui); - if(mission.HasFailed(*this)) + if(mission.IsFailed(*this)) RemoveMission(Mission::FAIL, mission, ui); else if(mission.CanComplete(*this)) RemoveMission(Mission::COMPLETE, mission, ui); @@ -4176,7 +4176,7 @@ void PlayerInfo::StepMissions(UI *ui) Mission &mission = *mit; ++mit; - if(mission.HasFailed(*this)) + if(mission.IsFailed(*this)) RemoveMission(Mission::FAIL, mission, ui); else if(mission.CanComplete(*this)) RemoveMission(Mission::COMPLETE, mission, ui); diff --git a/source/Politics.cpp b/source/Politics.cpp index a8227c8ee56b..921c437f6767 100644 --- a/source/Politics.cpp +++ b/source/Politics.cpp @@ -260,7 +260,7 @@ string Politics::Fine(PlayerInfo &player, const Government *gov, int scan, const if((!scan || (scan & ShipEvent::SCAN_CARGO)) && !EvadesCargoScan(*ship)) { - int64_t fine = ship->Cargo().IllegalCargoFine(gov); + int64_t fine = ship->Cargo().IllegalCargoFine(gov, player); if((fine > maxFine && maxFine >= 0) || fine < 0) { maxFine = fine; @@ -268,7 +268,7 @@ string Politics::Fine(PlayerInfo &player, const Government *gov, int scan, const for(const Mission &mission : player.Missions()) { - if(mission.IsFailed()) + if(mission.IsFailed(player)) continue; // Append the illegalCargoMessage from each applicable mission, if available diff --git a/source/Preferences.cpp b/source/Preferences.cpp index 767e71b651f5..fb9a9e612503 100644 --- a/source/Preferences.cpp +++ b/source/Preferences.cpp @@ -154,6 +154,7 @@ void Preferences::Load() // values for settings that are off by default. settings["Landing zoom"] = true; settings["Render motion blur"] = true; + settings["Cloaked ship outlines"] = true; settings[FRUGAL_ESCORTS] = true; settings[EXPEND_AMMO] = true; settings["Damaged fighters retreat"] = true; diff --git a/source/PreferencesPanel.cpp b/source/PreferencesPanel.cpp index 0fd77036cb4b..2dee3eb4bf2e 100644 --- a/source/PreferencesPanel.cpp +++ b/source/PreferencesPanel.cpp @@ -57,6 +57,7 @@ namespace { const string AUTO_FIRE_SETTING = "Automatic firing"; const string SCREEN_MODE_SETTING = "Screen mode"; const string VSYNC_SETTING = "VSync"; + const string CLOAK_OUTLINE = "Cloaked ship outlines"; const string STATUS_OVERLAYS_ALL = "Show status overlays"; const string STATUS_OVERLAYS_FLAGSHIP = " Show flagship overlay"; const string STATUS_OVERLAYS_ESCORT = " Show escort overlays"; @@ -649,6 +650,7 @@ void PreferencesPanel::DrawSettings() EXTENDED_JUMP_EFFECTS, SHIP_OUTLINES, HUD_SHIP_OUTLINES, + CLOAK_OUTLINE, "\t", "HUD", STATUS_OVERLAYS_ALL, @@ -791,6 +793,11 @@ void PreferencesPanel::DrawSettings() text = Preferences::StatusOverlaysSetting(Preferences::OverlayType::NEUTRAL); isOn = text != "off" && text != "--"; } + else if(setting == CLOAK_OUTLINE) + { + text = Preferences::Has(CLOAK_OUTLINE) ? "fancy" : "fast"; + isOn = true; + } else if(setting == AUTO_AIM_SETTING) { text = Preferences::AutoAimSetting(); diff --git a/source/Ship.cpp b/source/Ship.cpp index 422cfc887857..4c538a082c35 100644 --- a/source/Ship.cpp +++ b/source/Ship.cpp @@ -1937,7 +1937,7 @@ int Ship::Scan(const PlayerInfo &player) bool isImportant = false; if(target->isYours) - isImportant = target.get() == player.Flagship() || government->FinesContents(target.get()); + isImportant = target.get() == player.Flagship() || government->FinesContents(target.get(), player); if(startedScanning && isYours) {