@Override public Map<MechSummary, ITechnology> call() throws Exception { Map<MechSummary,ITechnology> map = new HashMap<MechSummary,ITechnology>(); for (MechSummary ms : MechSummaryCache.getInstance().getAllMechs()) { map.put(ms, calcTechProgression(ms, techFaction)); } return map; } };
@Override public void doneLoading() { MechSummary[] ms = mechSummaryCache.getAllMechs(); System.out.println("\n");
private void exportList(int connId, String path) { try { PrintWriter pw1 = new PrintWriter(new FileWriter(path)); MechSummary[] msums = MechSummaryCache.getInstance().getAllMechs(); for (MechSummary ms1 : msums) { pw1.println(ms1.getChassis() + ", " + ms1.getModel() + ", " + ms1.getBV()); } pw1.flush(); pw1.close(); server.sendServerChat(server.getPlayer(connId).getName() + " has exported a unit list."); } catch (Exception e) { server.sendServerChat(connId, "/exportlist: execution failed"); server.sendServerChat(connId, e.toString()); } } }
.getAllMechs(); for (MechSummary unit : units) { Entity entity = new MechFileParser(
.getAllMechs(); for (MechSummary unit : units) { Entity entity = new MechFileParser(
@Override public void doneLoading() { MechSummary[] ms = mechSummaryCache.getAllMechs(); MechTileset mechTileset = new MechTileset(Configuration.unitImagesDir()); try {
@Override public void doneLoading() { MechSummary[] ms = mechSummaryCache.getAllMechs();
officialUnitList).getAllMechs(); for (MechSummary unit : units) { String unitType = unit.getUnitType();
/** Creates new form UnitSelectorDialog */ public UnitSelectorDialog(Frame frame, Campaign c, boolean add) { super(frame, true); unitModel = new MechTableModel(); addToCampaign = add; //TODO: the proper way to do this would be to create a listener interface that has //methods like buyUnit, addUnit, etc. that we could register with this dialog //and then update when needed this.campaign = c; formatter = new DecimalFormat(); asd = new AdvancedSearchDialog(frame, campaign.getCalendar().get(GregorianCalendar.YEAR)); initComponents(); MechSummary[] allMechs = MechSummaryCache.getInstance().getAllMechs(); setMechs(allMechs); setLocationRelativeTo(frame); }
return; MechSummary[] mechs = cache.getAllMechs();
@Override public void doneLoading() { MechSummary[] ms = mechSummaryCache.getAllMechs();
public static ArrayList<MechSummary> generateArmy(Parameters p) { int allowedVariance = java.lang.Math.abs(p.maxBV - p.minBV); MechSummary[] all = MechSummaryCache.getInstance().getAllMechs(); ArrayList<MechSummary> allMechs = new ArrayList<MechSummary>(); ArrayList<MechSummary> allTanks = new ArrayList<MechSummary>();
for (MechSummary ms : msc.getAllMechs()) { Entity en = null; try { System.out.println("\t" + et.getName() + " (" + et.getStaticTechLevel().toString() + ")"); System.out.println("Failed: " + bad + "/" + msc.getAllMechs().length);
CampaignOptions options = campaign.getCampaignOptions(); ArrayList<String> variants = new ArrayList<String>(); for(MechSummary summary : MechSummaryCache.getInstance().getAllMechs()) {
mechs = mscInstance.getAllMechs();
private void stockBattleArmorSuits(Campaign c) { //this is just a test for(MechSummary summary : MechSummaryCache.getInstance().getAllMechs()) { if(!summary.getUnitType().equals("BattleArmor")) { continue; } //FIXME: I can't pull entity movement mode and quad shape off of mechsummary //try loading the full entity, but this might take too long if(null != summary) { Entity newEntity = null; try { newEntity = new MechFileParser(summary.getSourceFile(), summary.getEntryName()).getEntity(); } catch (EntityLoadingException e) { e.printStackTrace(); } if(null != newEntity) { BattleArmorSuit ba = new BattleArmorSuit(summary.getChassis(), summary.getModel(), (int)summary.getTons(), 1, summary.getWeightClass(), summary.getWalkMp(), summary.getJumpMp(), newEntity.entityIsQuad(), summary.isClan(), newEntity.getMovementMode(), c); parts.add(ba); } } } }
if (ms == null) { MechSummary[] units = MechSummaryCache.getInstance() .getAllMechs();