/** * When resolving the battle manually without a resolution file (such as MekHQ + tabletop), * set initial status of units and crew as pre-battle. */ private void initUnitsAndPilotsWithoutBattle() { for (Unit u : units) { UnitStatus status = unitsStatus.get(u.getId()); status.assignFoundEntity(u.getEntity(), false); u.getEntity().setDeployed(true); Crew crew = u.getEntity().getCrew(); if(null != crew && !crew.getExternalIdAsString().equals("-1")) { pilots.put(UUID.fromString(crew.getExternalIdAsString()), crew); } } }
output.write(crew.getPortraitFileName(pos)); if (!crew.getExternalIdAsString(pos).equals("-1")) { output.write("\" externalId=\""); output.write(crew.getExternalIdAsString(pos));
if(!e.getCrew().getExternalIdAsString().equals("-1")) { if(!e.getCrew().isEjected() || e instanceof EjectedCrew) { pilots.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); ejections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); if(!e.getCrew().getExternalIdAsString().equals("-1")) { if(!e.getCrew().isEjected() || e instanceof EjectedCrew) { pilots.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); ejections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); status.assignFoundEntity(e, !control); if(null != e.getCrew()) { if(!e.getCrew().getExternalIdAsString().equals("-1")) { if(e instanceof EjectedCrew) { ejections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); pilots.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); } else { mia.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); if(e instanceof EjectedCrew & null != e.getCrew() && !e.getCrew().getExternalIdAsString().equals("-1")) { enemyEjections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); continue;
if(!e.getCrew().getExternalIdAsString().equals("-1")) { if(!e.getCrew().isEjected() || e instanceof EjectedCrew) { pilots.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); ejections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); enemyEjections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); continue; if(!e.getCrew().getExternalIdAsString().equals("-1")) { pilots.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); if(e instanceof EjectedCrew) { ejections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); if(!e.getCrew().getExternalIdAsString().equals("-1")) { if(e instanceof EjectedCrew) { ejections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); pilots.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); } else { mia.put(UUID.fromString(e.getCrew().getExternalIdAsString()), e.getCrew()); enemyEjections.put(UUID.fromString(e.getCrew().getExternalIdAsString()), (EjectedCrew)e); continue;
if (!en.getCrew().getExternalIdAsString().equals("-1")) { ejected = enemyEjections.get(UUID.fromString(en.getCrew().getExternalIdAsString())); if (p.getId().toString().equals(pilot.getExternalIdAsString(pos))) { slot = pos; break;
Entity ejected = ejections.get(UUID.fromString(en.getCrew().getExternalIdAsString())); pilot = mia.get(UUID.fromString(en.getCrew().getExternalIdAsString())); missingCrew = true; if (p.getId().toString().equals(pilot.getExternalIdAsString(slot))) { status.setHits(pilot.getHits(slot)); break;
+ tgtEnt.getCrew().getExternalIdAsString(i); crew += "\"/>\n";
if (!oldCrew.getExternalIdAsString().equals("-1")) { p.setId(UUID.fromString(oldCrew.getExternalIdAsString(slot)));
pilot.setOptions(crew.getOptions()); pilot.setExternalIdAsString(crew.getExternalIdAsString(0), 0);