001package com.fs.starfarer.api.impl.campaign.econ;
002
003
004/**
005 * Unused.
006 */
007public class TradeDisruption extends BaseMarketConditionPlugin {
008        
009        public TradeDisruption() {
010        }
011
012        public void apply(String id) {
013//              for (AffectedCommodity com : event.getDisruptedCommodities()) {
014//                      com.commodity.removeFromAverageStockpile(com.disruptionQuantity);
015//                      com.commodity.setAverageStockpileAfterDemand(0f);
016//              }
017//              for (AffectedCommodity com : event.getDisruptedCommodities()) {
018//                      com.commodity.getPlayerPriceMod().modifyPercent(id, com.pricePercent);
019//                      com.commodity.getPlayerPriceMod().modifyFlat(id, com.priceFlat);
020//              }
021        }
022
023        public void unapply(String id) {
024//              for (AffectedCommodity com : event.getDisruptedCommodities()) {
025//                      float dq = Math.min(com.disruptionQuantity, com.preDisruptionStockpile - com.commodity.getAverageStockpile());
026//                      if (dq < 0) dq = 0;
027//                      com.commodity.addToAverageStockpile(dq);
028//                      com.disruptionQuantity = dq;
029//              }
030//              for (CommodityOnMarketAPI com : market.getAllCommodities()) {
031//                      com.getPlayerPriceMod().unmodify(id);
032//              }
033        }
034        
035        
036        @Override
037        public boolean isTransient() {
038                return false;
039        }
040}
041
042
043
044
045