Interface CargoAPI


public interface CargoAPI
Author:
Alex Mosolov Copyright 2012 Fractal Softworks, LLC
  • Method Details

    • getWeapons

    • getNumWeapons

      int getNumWeapons(String id)
    • removeWeapons

      void removeWeapons(String id, int count)
    • addWeapons

      void addWeapons(String id, int count)
    • 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

      void addItems(CargoAPI.CargoItemType itemType, Object data, float quantity)
    • removeItems

      boolean removeItems(CargoAPI.CargoItemType itemType, Object data, float quantity)
    • getQuantity

      float getQuantity(CargoAPI.CargoItemType type, Object data)
    • addMothballedShip

      void addMothballedShip(FleetMemberType type, String variantOrWingId, String optionalName)
    • initMothballedShips

      void initMothballedShips(String factionId)
    • getMothballedShips

      FleetDataAPI getMothballedShips()
      Call initMothballedShips(String factionId) before using this method.
      Returns:
    • clear

      void clear()
    • setFreeTransfer

      @Deprecated void setFreeTransfer(boolean freeTransfer)
      Deprecated.
      Use SectorEntityToken.setFreeTransfer() instead. Whether moving items to and from this entity has a cost.
      Parameters:
      freeTransfer -
    • isFreeTransfer

      @Deprecated boolean 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

      void addFromStack(CargoStackAPI stack)
    • addCommodity

      void addCommodity(String commodityId, float quantity)
    • getCommodityQuantity

      float getCommodityQuantity(String id)
    • getTotalPersonnel

      int getTotalPersonnel()
    • removeCommodity

      void removeCommodity(String id, float quantity)
    • removeStack

      void removeStack(CargoStackAPI stack)
    • getFighters

    • getNumFighters

      int getNumFighters(String id)
    • addAll

      void addAll(CargoAPI other)
    • addFighters

      void addFighters(String id, int count)
    • addHullmods

      void addHullmods(String id, int count)
    • getFreeCrewSpace

      int getFreeCrewSpace()
    • getFreeFuelSpace

      int getFreeFuelSpace()
    • addSpecial

      void addSpecial(SpecialItemData data, float quantity)
    • createCopy

      CargoAPI createCopy()
    • initPartialsIfNeeded

      void initPartialsIfNeeded()
    • removeAll

      void removeAll(CargoAPI other)
    • addAll

      void addAll(CargoAPI other, boolean includeMothballedShips)
    • getOrigSource

      CargoAPI getOrigSource()
    • setOrigSource

      void setOrigSource(CargoAPI origSource)
    • getFleetData

      FleetDataAPI getFleetData()
    • updateSpaceUsed

      void updateSpaceUsed()
    • removeFighters

      void removeFighters(String id, int count)
    • isUnlimitedStacks

      boolean isUnlimitedStacks()
    • setUnlimitedStacks

      void setUnlimitedStacks(boolean unlimitedStacks)