[Megameknet-cvs] MegaMekNET/src/common/visitor XMLLoadVisitor.java,1.8,1.9
Status: Inactive
Brought to you by:
mcwizard
From: Immanuel S. <im...@us...> - 2005-04-09 12:56:46
|
Update of /cvsroot/megameknet/MegaMekNET/src/common/visitor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10580/src/common/visitor Modified Files: XMLLoadVisitor.java Log Message: more cyclops changes Index: XMLLoadVisitor.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/common/visitor/XMLLoadVisitor.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** XMLLoadVisitor.java 9 Apr 2005 09:47:45 -0000 1.8 --- XMLLoadVisitor.java 9 Apr 2005 12:56:38 -0000 1.9 *************** *** 393,403 **** List unitsInHangar = new LinkedList(); ! for (Iterator it = toIdList(toString("unitIds", e)).iterator(); it.hasNext();) ! unitsInHangar.add((Unit)units.get(new Integer((String)it.next()))); data.setUnits(unitsInHangar); List unitsOnMarket = new LinkedList(); ! for (Iterator it = toIdList(toString("unitsOnMarket", e)).iterator(); it.hasNext();) ! unitsOnMarket.add((Unit)units.get(new Integer((String)it.next()))); data.setUnitsOnMarket(unitsOnMarket); --- 393,413 ---- List unitsInHangar = new LinkedList(); ! for (Iterator it = toIdList(toString("unitIds", e)).iterator(); it.hasNext();) { ! String unitId = (String)it.next(); ! Unit u = (Unit)units.get(new Integer(unitId)); ! if (u == null) ! throw new RuntimeException("Unit "+unitId+" not found"); ! unitsInHangar.add(u); ! } data.setUnits(unitsInHangar); List unitsOnMarket = new LinkedList(); ! for (Iterator it = toIdList(toString("unitsOnMarket", e)).iterator(); it.hasNext();) { ! String unitId = (String)it.next(); ! Unit u = (Unit)units.get(new Integer(unitId)); ! if (u == null) ! throw new RuntimeException("Unit "+unitId+" not found"); ! unitsOnMarket.add(u); ! } data.setUnitsOnMarket(unitsOnMarket); |