Skip to content

Commit

Permalink
WIP #12: bugfix for moving when no team selected
Browse files Browse the repository at this point in the history
- DAMCON team movement orders seem to work, although the team then goes
  haywire shortly thereafter
- Selection when a DAMCON team shares a node location with a system is
  not yet fixed (picking should be only damcon teams when selected ==
  null and prioritize DAMCON teams when selected != null)
  • Loading branch information
jacobmaxfrank committed Jan 30, 2016
1 parent c96a811 commit 72d9854
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ protected void updateSystemCoolantAllocated(ShipSystem system, int amount) {
}

public void moveDamconTeam(int teamId, GridCoord coord) {
System.out.println("Moving DAMCON team " + teamId + " to grid " + coord);
this.worldAwareRobustProxyListener.getServer().send(new EngSendDamconPacket(teamId, coord));
}
}
12 changes: 7 additions & 5 deletions src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,13 @@ public void mouseClicked(MouseEvent e) {
}
}

if (internal.getClass().equals(InternalTeam.class)) {
selected = (InternalTeam)internal;
} else { // if (internal.getClass().equals(InternalNode.class))
if (selected != null) {
this.engineeringConsoleManager.moveDamconTeam(selected.getTeamID(), ((InternalNode)internal).getGridCoords());
if (internal != null) {
if (internal.getClass().equals(InternalTeam.class)) {
selected = (InternalTeam) internal;
} else { // if (internal.getClass().equals(InternalNode.class))
if (selected != null) {
this.engineeringConsoleManager.moveDamconTeam(selected.getTeamID(), ((InternalNode) internal).getGridCoords());
}
}
}
}
Expand Down

0 comments on commit 72d9854

Please sign in to comment.