001package com.fs.starfarer.api.combat;
002
003import com.fs.starfarer.api.campaign.CampaignFleetAPI;
004
005/**
006 * Implement this in addition to HullModEffect, not by itself.
007 * 
008 * Note: the effect class is instantiated once per application session.
009 * Storing campaign data in members of an implementing class is a bad idea,
010 * use SectorAPI.getPersistentData() instead.
011 * 
012 * @author Alex Mosolov
013 *
014 * Copyright 2013 Fractal Softworks, LLC
015 */
016public interface HullModFleetEffect {
017
018        /**
019         * Called for *every* fleet, even fleets that don't have a ship with the specific hullmod.
020         * 
021         * Shouldn't try to do a lot here; could have a lot of performance repercussions.
022         * 
023         * @param fleet
024         */
025        void advanceInCampaign(CampaignFleetAPI fleet);
026        
027        
028        /**
029         * Whether the advanceInCampaign() method should be called for this hullmod.
030         * @return
031         */
032        boolean withAdvanceInCampaign();
033        
034        /**
035         * Whether the withOnFleetSync() method should be called for this hullmod.
036         * @return
037         */
038        boolean withOnFleetSync();
039        
040        
041        /**
042         * Called when anything about the fleet composition changes, including hullmod changes.
043         * Also called for all fleets, including fleets without ships with this hullmod.
044         * @param fleet
045         */
046        void onFleetSync(CampaignFleetAPI fleet);
047}