Skip to content

Commit

Permalink
Refactor Faction variable naming in map panel
Browse files Browse the repository at this point in the history
Renamed the 'independentFaction' variable to 'indFaction' for brevity and consistency. This change affects multiple locations within the InterstellarMapPanel class where faction checks are performed.
  • Loading branch information
IllianiCBT committed Oct 22, 2024
1 parent 502c0c3 commit 851b1a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MekHQ/src/mekhq/gui/InterstellarMapPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ protected void paintComponent(Graphics g) {
int minY = (int) Math.floor(scr2mapY(getHeight()) / HEX_SIZE);
int maxY = (int) Math.ceil(scr2mapY(0.0) / HEX_SIZE);

Faction independentFaction = Factions.getInstance().getFaction("IND");
Faction indFaction = Factions.getInstance().getFaction("IND");

for (int x = minX; x <= maxX; ++x) {
for (int y = minY; y <= maxY; ++y) {
Expand All @@ -495,7 +495,7 @@ protected void paintComponent(Graphics g) {
for (PlanetarySystem system : nearbySystems) {
if (!isSystemEmpty(system) && path.contains(system.getX(), system.getY())) {
Set<Faction> factions = system.getFactionSet(now);
factions.remove(independentFaction);
factions.remove(indFaction);
hexFactions.addAll(factions);
}
}
Expand All @@ -510,7 +510,7 @@ protected void paintComponent(Graphics g) {
}

if (hexFactions.size() > 1) {
hexFactions.remove(independentFaction);
hexFactions.remove(indFaction);
}

path.transform(transform);
Expand Down

0 comments on commit 851b1a7

Please sign in to comment.