public DummyStationExchange(String name, CampaignFleetAPI source, boolean includeFlagShip) { if (name == null) name = source.getName(); dummy = createDummyStation(name); this.source = source; this.includeFlagShip = includeFlagShip; CargoSupport.setCargo(dummy.getCargo(), source, includeFlagShip); // sync cargo to dummy }
/** * sync station's cargo and ships to fleet * * @param fleet * @param dummyStation * @param includeFlagShip * @return */ public void sync() { CargoSupport.clear(source, includeFlagShip); CargoSupport.takeAll(source, dummy.getCargo()); removeDummyStation(dummy); }