way more than enough. I was browsing through mods to find references. I kept running across stuff like this:
//Calc Supplies
while (playerStorageCargo.removeItems(CargoAPI.CargoItemType.RESOURCES, "supplies", 1)) {
totalSupplies = totalSupplies + 1;
}
//Return resources
playerStorageCargo.addItems(CargoAPI.CargoItemType.RESOURCES, "supplies", totalSupplies);
and was having panic attacks.
OK so I was browsing the API reference, and I noticed that .addMothballedShip() is deprecated.
With a comment saying: * Use Global.getFactory().createFleetMember() and CargoAPI.getMothballedShips().addFleetMember() instead.
So instead of: GDcargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "gedune_chua_wing");
we go: GDcargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.FIGHTER_WING, "gedune_chua_wing"));
or more concisely for multiple members: FactoryAPI fac = Global.getFactory();
FleetDataAPI GDmoths = GDcargo.getMothballedShips();
GDmoths.addFleetMember(fac.createFleetMember(FleetMemberType.FIGHTER_WING, "gedune_chua_wing"));
right?
...
*twitch*