Skip to content

Commit

Permalink
Update SystemView.java
Browse files Browse the repository at this point in the history
Systems with enemy-fleets will now flash the Alert. Especially usefull when under siege by cloaked enemy fleets.
  • Loading branch information
Xilmi committed Jun 17, 2021
1 parent 9d4cfd4 commit 5a4fa0e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/rotp/model/empires/SystemView.java
Expand Up @@ -29,6 +29,7 @@
import rotp.model.galaxy.StarSystem;
import rotp.model.planet.Planet;
import rotp.model.planet.PlanetType;
import rotp.ui.main.MainUI;
import rotp.util.Base;

public class SystemView implements IMappedObject, Base, Serializable {
Expand Down Expand Up @@ -436,6 +437,16 @@ public boolean isAlert() {
return false;
if (scouted() && system().hasEvent())
return true;
if(system().empire() == player())
{
for (ShipFleet fl: orbitingFleets()) {
if (fl.isPotentiallyArmed(player())) {
if (player().atWarWith(fl.empId())) {
return true;
}
}
}
}
return (scouted() && isColonized() && colony().inRebellion());
}
public String descriptiveName() {
Expand Down

0 comments on commit 5a4fa0e

Please sign in to comment.