Package com.fs.starfarer.api.campaign
Interface CargoAPI
public interface CargoAPI
- Author:
- Alex Mosolov Copyright 2012 Fractal Softworks, LLC
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
static enum
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
addCommodity
(String commodityId, float quantity) void
addCrew
(int quantity) void
addFighters
(String id, int count) void
addFromStack
(CargoStackAPI stack) void
addFuel
(float quantity) void
addHullmods
(String id, int count) void
addItems
(CargoAPI.CargoItemType itemType, Object data, float quantity) void
addMarines
(int quantity) void
addMothballedShip
(FleetMemberType type, String variantOrWingId, String optionalName) void
addSpecial
(SpecialItemData data, float quantity) void
addSupplies
(float quantity) void
addWeapons
(String id, int count) void
clear()
void
gainCrewXP
(float xp) float
int
getCrew()
int
int
float
getFuel()
int
float
float
float
Call initMothballedShips(String factionId) before using this method.int
getNumFighters
(String id) int
getNumWeapons
(String id) float
getQuantity
(CargoAPI.CargoItemType type, Object data) float
float
float
int
int
void
initMothballedShips
(String factionId) void
boolean
isEmpty()
boolean
Deprecated.boolean
void
void
removeCommodity
(String id, float quantity) void
removeCrew
(int quantity) void
void
removeFighters
(String id, int count) void
removeFuel
(float quantity) boolean
removeItems
(CargoAPI.CargoItemType itemType, Object data, float quantity) void
removeMarines
(int quantity) void
removeStack
(CargoStackAPI stack) void
removeSupplies
(float quantity) void
removeWeapons
(String id, int count) void
setFreeTransfer
(boolean freeTransfer) Deprecated.void
setOrigSource
(CargoAPI origSource) void
setUnlimitedStacks
(boolean unlimitedStacks) void
sort()
void
-
Method Details
-
getWeapons
List<CargoAPI.CargoItemQuantity<String>> getWeapons() -
getNumWeapons
-
removeWeapons
-
addWeapons
-
getSupplies
float getSupplies() -
getFuel
float getFuel() -
getTotalCrew
int getTotalCrew() -
addCrew
void addCrew(int quantity) -
getCrew
int getCrew() -
getMarines
int getMarines() -
addMarines
void addMarines(int quantity) -
removeMarines
void removeMarines(int quantity) -
addFuel
void addFuel(float quantity) -
removeFuel
void removeFuel(float quantity) -
addSupplies
void addSupplies(float quantity) -
removeSupplies
void removeSupplies(float quantity) -
removeCrew
void removeCrew(int quantity) -
addItems
-
removeItems
-
getQuantity
-
addMothballedShip
-
initMothballedShips
-
getMothballedShips
FleetDataAPI getMothballedShips()Call initMothballedShips(String factionId) before using this method.- Returns:
-
clear
void clear() -
setFreeTransfer
Deprecated.Use SectorEntityToken.setFreeTransfer() instead. Whether moving items to and from this entity has a cost.- Parameters:
freeTransfer
-
-
isFreeTransfer
Deprecated. -
getCredits
MutableValue getCredits() -
getStacksCopy
List<CargoStackAPI> getStacksCopy() -
gainCrewXP
void gainCrewXP(float xp) -
sort
void sort() -
getMaxFuel
float getMaxFuel() -
getMaxCapacity
float getMaxCapacity() -
getMaxPersonnel
float getMaxPersonnel() -
getSpaceUsed
float getSpaceUsed() -
getSpaceLeft
float getSpaceLeft() -
isEmpty
boolean isEmpty() -
removeEmptyStacks
void removeEmptyStacks() -
addFromStack
-
addCommodity
-
getCommodityQuantity
-
getTotalPersonnel
int getTotalPersonnel() -
removeCommodity
-
removeStack
-
getFighters
List<CargoAPI.CargoItemQuantity<String>> getFighters() -
getNumFighters
-
addAll
-
addFighters
-
addHullmods
-
getFreeCrewSpace
int getFreeCrewSpace() -
getFreeFuelSpace
int getFreeFuelSpace() -
addSpecial
-
createCopy
CargoAPI createCopy() -
initPartialsIfNeeded
void initPartialsIfNeeded() -
removeAll
-
addAll
-
getOrigSource
CargoAPI getOrigSource() -
setOrigSource
-
getFleetData
FleetDataAPI getFleetData() -
updateSpaceUsed
void updateSpaceUsed() -
removeFighters
-
isUnlimitedStacks
boolean isUnlimitedStacks() -
setUnlimitedStacks
void setUnlimitedStacks(boolean unlimitedStacks)
-