コード例 #1
0
 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
 }
コード例 #2
0
 /**
  * remove dummy station and its containning system
  *
  * @param dummy
  */
 private void removeDummyStation(OrbitalStationAPI dummy) {
   LocationAPI sys = dummy.getContainingLocation();
   sys.removeEntity(dummy);
 }
コード例 #3
0
 /**
  * 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);
 }