001package com.fs.starfarer.api.campaign; 002 003import java.util.List; 004 005import com.fs.starfarer.api.campaign.econ.MarketAPI; 006import com.fs.starfarer.api.combat.ShipHullSpecAPI; 007import com.fs.starfarer.api.loading.FighterWingSpecAPI; 008import com.fs.starfarer.api.loading.WeaponSpecAPI; 009 010public interface FactionProductionAPI { 011 012 public static enum ProductionItemType { 013 SHIP, 014 FIGHTER, 015 WEAPON 016 } 017 018 public interface ItemInProductionAPI { 019 FighterWingSpecAPI getWingSpec(); 020 WeaponSpecAPI getWeaponSpec(); 021 ShipHullSpecAPI getShipSpec(); 022 float getBaseBuildDelay(); 023 int getBaseCost(); 024 ProductionItemType getType(); 025 void setType(ProductionItemType type); 026 String getSpecId(); 027 void setSpecId(String specId); 028 float getBuildDelay(); 029 void setBuildDelay(float buildDelay); 030 float getTimeInterrupted(); 031 void setTimeInterrupted(float timeInterrupted); 032 int getQuantity(); 033 void setQuantity(int quantity); 034 } 035 036 /** 037 * Sum of faction-wide production of Ships & Weapons commodity, times productionCapacityPerSWUnit. In credits. 038 * @return 039 */ 040 int getMonthlyProductionCapacity(); 041 042 boolean addItem(ProductionItemType type, String specId); 043 boolean addItem(ProductionItemType type, String specId, int quantity); 044 void removeItem(ProductionItemType type, String specId, int count); 045 int getCount(ProductionItemType type, String specId); 046 047 List<ItemInProductionAPI> getInterrupted(); 048 List<ItemInProductionAPI> getCurrent(); 049 int getTotalCurrentCost(); 050 051 FactionAPI getFaction(); 052 053 int getUnitCost(ProductionItemType type, String specId); 054 055 void clear(); 056 057 MarketAPI getGatheringPoint(); 058 void setGatheringPoint(MarketAPI gatheringPoint); 059 060 int getAccruedProduction(); 061 void setAccruedProduction(int accruedProduction); 062 063 float getProductionCapacityForMarket(MarketAPI market); 064 065 float getCostMult(); 066 void setCostMult(float costMult); 067 068 ItemInProductionAPI createSampleItem(ProductionItemType type, String specId, int quantity); 069 070 FactionProductionAPI clone(); 071 072 boolean addItem(ProductionItemType type, String specId, int quantity, int maxQuantity); 073 074}