Class AddRaidObjective.CustomRaidObjectiveAdder
java.lang.Object
com.fs.starfarer.api.impl.campaign.rulecmd.salvage.AddRaidObjective.CustomRaidObjectiveAdder
- All Implemented Interfaces:
GroundRaidObjectivesListener
,EveryFrameScript
- Enclosing class:
- AddRaidObjective
public static class AddRaidObjective.CustomRaidObjectiveAdder
extends Object
implements EveryFrameScript, GroundRaidObjectivesListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fs.starfarer.api.campaign.listeners.GroundRaidObjectivesListener
GroundRaidObjectivesListener.RaidResultData
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCustomRaidObjectiveAdder
(MarketAPI market, SectorEntityToken entity, String icon, String name, String trigger, int xp, MarketCMD.RaidDangerLevel danger, boolean showInCustomOnly, String tooltip) -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) Use SectorAPI.getClock() to convert to campaign days.boolean
isDone()
void
modifyRaidObjectives
(MarketAPI market, SectorEntityToken entity, List<GroundRaidObjectivePlugin> objectives, MarketCMD.RaidType type, int marineTokens, int priority) Called 10 times with priority from 0 to 9.void
reportRaidObjectivesAchieved
(GroundRaidObjectivesListener.RaidResultData data, InteractionDialogAPI dialog, Map<String, MemoryAPI> memoryMap) boolean
-
Field Details
-
done
protected boolean done -
icon
-
name
-
trigger
-
tooltip
-
xp
public int xp -
showInCustomOnly
public boolean showInCustomOnly -
danger
-
market
-
entity
-
-
Constructor Details
-
CustomRaidObjectiveAdder
public CustomRaidObjectiveAdder(MarketAPI market, SectorEntityToken entity, String icon, String name, String trigger, int xp, MarketCMD.RaidDangerLevel danger, boolean showInCustomOnly, String tooltip)
-
-
Method Details
-
advance
public void advance(float amount) Description copied from interface:EveryFrameScript
Use SectorAPI.getClock() to convert to campaign days.- Specified by:
advance
in interfaceEveryFrameScript
- Parameters:
amount
- seconds elapsed during the last frame.
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceEveryFrameScript
- Returns:
- true when the script is finished and can be cleaned up by the engine.
-
runWhilePaused
public boolean runWhilePaused()- Specified by:
runWhilePaused
in interfaceEveryFrameScript
- Returns:
- whether advance() should be called while the campaign engine is paused.
-
modifyRaidObjectives
public void modifyRaidObjectives(MarketAPI market, SectorEntityToken entity, List<GroundRaidObjectivePlugin> objectives, MarketCMD.RaidType type, int marineTokens, int priority) Description copied from interface:GroundRaidObjectivesListener
Called 10 times with priority from 0 to 9. An implementation should generally only modify objectives in one of those callse.- Specified by:
modifyRaidObjectives
in interfaceGroundRaidObjectivesListener
-
reportRaidObjectivesAchieved
public void reportRaidObjectivesAchieved(GroundRaidObjectivesListener.RaidResultData data, InteractionDialogAPI dialog, Map<String, MemoryAPI> memoryMap) - Specified by:
reportRaidObjectivesAchieved
in interfaceGroundRaidObjectivesListener
-