[Megameknet-cvs] MegaMekNET/src/server/campaign/commands CyclopsCommand.java,1.4,1.5
Status: Inactive
Brought to you by:
mcwizard
From: Immanuel S. <im...@us...> - 2005-04-09 14:08:41
|
Update of /cvsroot/megameknet/MegaMekNET/src/server/campaign/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15313/src/server/campaign/commands Modified Files: CyclopsCommand.java Log Message: cyclops pilot.* function Index: CyclopsCommand.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/server/campaign/commands/CyclopsCommand.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CyclopsCommand.java 9 Apr 2005 12:56:39 -0000 1.4 --- CyclopsCommand.java 9 Apr 2005 14:08:32 -0000 1.5 *************** *** 17,22 **** --- 17,24 ---- import java.net.URL; import java.util.Collection; + import java.util.Iterator; import java.util.LinkedList; import java.util.List; + import common.Unit; import server.campaign.CampaignMain; import server.cyclops.Cyclops; *************** *** 46,49 **** --- 48,52 ---- " planet.writeFromList - Send all planets to cyclops.<br>" + " planet.write#planet - Send the 'planet' to cyclops.<br>" + + " pilot.writeFromList - Send all pilots in all units to cyclops.<br>" + " house.writeFromList - Send all houses to cyclops.<br>" + " house.updateFromList - Send all houses to cyclops as update.<br>" + *************** *** 87,90 **** --- 90,98 ---- } else if (command.equals("planet.writeFromList")) { o = CampaignMain.cm.getData().getAllPlanets(); + } else if (command.equals("pilot.writeFromList")) { + LinkedList pilots = new LinkedList(); + for (Iterator it = CampaignMain.cm.units.values().iterator(); it.hasNext();) + pilots.add(((Unit)it.next()).getPilot()); + o = pilots; } else if (command.startsWith("house.") && command.endsWith("FromList")) { o = CampaignMain.cm.getData().getAllHouses(); |