public class FleetInteractionDialogPluginImpl extends java.lang.Object implements InteractionDialogPlugin, RuleBasedDialog
| Modifier and Type | Class and Description |
|---|---|
static class |
FleetInteractionDialogPluginImpl.BaseFIDDelegate |
static class |
FleetInteractionDialogPluginImpl.FIDConfig |
static interface |
FleetInteractionDialogPluginImpl.FIDConfigGen |
static interface |
FleetInteractionDialogPluginImpl.FIDDelegate |
static class |
FleetInteractionDialogPluginImpl.OptionId |
protected static class |
FleetInteractionDialogPluginImpl.VisualType |
| Constructor and Description |
|---|
FleetInteractionDialogPluginImpl() |
FleetInteractionDialogPluginImpl(FleetInteractionDialogPluginImpl.FIDConfig params) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEmergencyRepairsOption() |
protected void |
addPostBattleAttitudeText() |
protected void |
addText(java.lang.String text) |
protected void |
addText(java.lang.String text,
java.awt.Color color) |
protected void |
addText(java.lang.String text,
java.lang.String hl,
java.awt.Color hlColor) |
void |
advance(float amount)
Get's called every frame.
|
protected boolean |
alliedCanDisengage() |
protected boolean |
alliedFleetHoldingVsStrongerEnemy() |
protected boolean |
alliedFleetWantsToDisengage() |
boolean |
alliedFleetWantsToFight() |
protected void |
appendText(java.lang.String text) |
void |
backFromEngagement(EngagementResultAPI result)
Get's called after a fleet battle connected to this dialog ends.
|
static boolean |
canDisengage() |
protected boolean |
canDisengageCleanly(CampaignFleetAPI fleet) |
protected boolean |
canDisengageWithoutPursuit(CampaignFleetAPI fleet) |
void |
cleanUpBattle() |
protected java.lang.String |
createShipNameListString(java.util.List<FleetMemberAPI> members) |
protected boolean |
didEnoughToDisengage(CampaignFleetAPI fleet) |
protected boolean |
fleetCanDisengage(CampaignFleetAPI fleet) |
protected boolean |
fleetHoldingVsStrongerEnemy(CampaignFleetAPI fleet,
CampaignFleetAPI other) |
protected boolean |
fleetWantsToDisengage(CampaignFleetAPI fleet,
CampaignFleetAPI other) |
protected boolean |
fleetWantsToFight(CampaignFleetAPI fleet,
CampaignFleetAPI other) |
protected boolean |
fleetWantsToFight(CampaignFleetAPI fleet,
CampaignFleetAPI other,
boolean assumeHostile) |
protected java.lang.String |
getApproximate(float value) |
protected java.lang.String |
getApproximateNumOnly(float value) |
java.lang.Object |
getContext()
Usually, simply returning null is fine
|
protected java.util.List<FleetMemberAPI> |
getCrashMothballable(java.util.List<FleetMemberAPI> all) |
static float |
getDisengageSize() |
protected java.lang.String |
getIntOrNo(float value) |
java.util.Map<java.lang.String,MemoryAPI> |
getMemoryMap()
Usually, simply returning null or an empty map is fine.
|
FactionAPI |
getNonHostileOtherFaction() |
FactionAPI |
getNonHostileOtherFaction(java.util.List<CampaignFleetAPI> otherSide) |
protected FleetEncounterContextPlugin.PursueAvailability |
getPursuitAvailability(CampaignFleetAPI fleet) |
java.util.List<FleetMemberAPI> |
getPursuitCapablePlayerShips() |
protected java.lang.String |
getString(java.lang.String id) |
protected void |
goToEncounterEndPath() |
void |
init(InteractionDialogAPI dialog)
Initialize your GUI in here, by populating options, texts and images *
|
protected boolean |
isFightingOver() |
protected boolean |
isValidTransferCommandTarget(FleetMemberAPI member) |
protected void |
losingPath() |
void |
notifyActivePersonChanged() |
void |
optionMousedOver(java.lang.String optionText,
java.lang.Object optionData)
Get's called when the player hovers over an option.
|
void |
optionSelected(java.lang.String text,
java.lang.Object optionData)
This gets called when the player clicks on an option.
|
protected boolean |
otherCanDisengage() |
protected boolean |
otherFleetHoldingVsStrongerEnemy() |
protected boolean |
otherFleetWantsToDisengage() |
boolean |
otherFleetWantsToFight() |
boolean |
otherFleetWantsToFight(boolean assumeHostile) |
protected CampaignFleetAIAPI.PursuitOption |
pickPursuitOption(CampaignFleetAPI fleet,
CampaignFleetAPI other,
FleetEncounterContext context) |
protected boolean |
playerOutBeforeAllies() |
void |
printOngoingBattleInfo() |
protected void |
pullInNearbyFleets() |
void |
reinit(boolean withContinueOnRuleFound) |
void |
reinitPostContinue() |
protected void |
rememberWasBeaten() |
protected void |
restoreOrigCaptains() |
void |
setActiveMission(CampaignEventPlugin mission) |
void |
setPlayerFleet(CampaignFleetAPI playerFleet) |
protected void |
showFleetInfo() |
protected void |
updateDialogState() |
protected void |
updateEngagementChoice(boolean withText) |
protected void |
updateMainState(boolean withText) |
void |
updateMemory() |
protected void |
updatePreCombat() |
protected void |
winningPath() |
public static float EMERGENCY_REPAIRS_MAX_DP
public static java.lang.String DO_NOT_AUTO_SHOW_FC_PORTRAIT
protected InteractionDialogAPI dialog
protected TextPanelAPI textPanel
protected OptionPanelAPI options
protected VisualPanelAPI visual
protected CampaignFleetAPI playerFleet
protected CampaignFleetAPI otherFleet
protected FleetGoal playerGoal
protected FleetInteractionDialogPluginImpl.VisualType currVisualType
protected FleetEncounterContext context
protected static final java.awt.Color HIGHLIGHT_COLOR
protected static final java.awt.Color FRIEND_COLOR
protected static final java.awt.Color ENEMY_COLOR
protected RuleBasedInteractionDialogPluginImpl conversationDelegate
protected boolean ongoingBattle
protected boolean firstEngagement
protected boolean joinedBattle
protected boolean forceEngage
protected boolean shownTooLargeToRetreatMessage
public static boolean inConversation
public static boolean directToComms
protected FleetInteractionDialogPluginImpl.FIDConfig config
protected java.util.List<FleetMemberAPI> membersInOrderPreEncounter
protected java.util.List<CampaignFleetAPI> pulledIn
protected EngagementResultAPI lastResult
protected boolean cleanedUp
protected boolean okToLeave
protected boolean didRepairs
protected boolean didBoardingCheck
protected boolean didRecoveryCheck
protected boolean pickedMemberToBoard
protected FleetMemberAPI toBoard
protected java.lang.String repairedShipList
protected int boardingPhase
protected float boardingPercentSuccess
protected java.lang.String crashMothballList
protected CrewCompositionAPI maxBoardingParty
protected CrewCompositionAPI boardingParty
protected FleetEncounterContext.BoardingResult boardingResult
protected FleetMemberAPI selectedFlagship
protected FleetMemberAPI origFlagship
protected java.util.Map<FleetMemberAPI,PersonAPI> origCaptains
protected CampaignFleetAIAPI.InitialBoardingResponse aiBoardingResponse
protected boolean shownKnownStatus
protected boolean recoveredCrew
protected boolean lootedCredits
protected boolean firedVictoryTriggers
protected java.lang.String creditsLooted
protected FleetInteractionDialogPluginImpl.OptionId lastOptionMousedOver
protected boolean allyEngagementChoiceNoBattle
protected boolean harryEndedBattle
public FleetInteractionDialogPluginImpl()
public FleetInteractionDialogPluginImpl(FleetInteractionDialogPluginImpl.FIDConfig params)
public java.util.Map<java.lang.String,MemoryAPI> getMemoryMap()
InteractionDialogPlugingetMemoryMap in interface InteractionDialogPlugingetMemoryMap in interface RuleBasedDialogpublic void reinit(boolean withContinueOnRuleFound)
reinit in interface RuleBasedDialogpublic void reinitPostContinue()
public void init(InteractionDialogAPI dialog)
InteractionDialogPlugininit in interface InteractionDialogPlugindialog - entry point for interacting with the dialog. You should probably store this in a member variablepublic void printOngoingBattleInfo()
protected void pullInNearbyFleets()
public void backFromEngagement(EngagementResultAPI result)
InteractionDialogPluginbackFromEngagement in interface InteractionDialogPluginprotected void addPostBattleAttitudeText()
public java.util.List<FleetMemberAPI> getPursuitCapablePlayerShips()
public void optionSelected(java.lang.String text, java.lang.Object optionData)
InteractionDialogPluginoptionSelected in interface InteractionDialogPlugintext - the name of the option, i.e. the first argument passed to addOptionoptionData - the data/identifier of the selected option. Cast this to the correct type. Don't forget to
null-check the result of the cast.protected void rememberWasBeaten()
protected void restoreOrigCaptains()
public void cleanUpBattle()
protected void goToEncounterEndPath()
protected void losingPath()
protected void winningPath()
protected java.util.List<FleetMemberAPI> getCrashMothballable(java.util.List<FleetMemberAPI> all)
public void optionMousedOver(java.lang.String optionText, java.lang.Object optionData)
InteractionDialogPluginoptionMousedOver in interface InteractionDialogPluginprotected void showFleetInfo()
public void advance(float amount)
InteractionDialogPluginadvance in interface InteractionDialogPluginprotected void addText(java.lang.String text)
protected void addText(java.lang.String text, java.awt.Color color)
protected void addText(java.lang.String text, java.lang.String hl, java.awt.Color hlColor)
protected void appendText(java.lang.String text)
protected void updateDialogState()
protected boolean isValidTransferCommandTarget(FleetMemberAPI member)
protected void updatePreCombat()
protected java.lang.String createShipNameListString(java.util.List<FleetMemberAPI> members)
protected void updateMainState(boolean withText)
protected void updateEngagementChoice(boolean withText)
protected void addEmergencyRepairsOption()
protected CampaignFleetAIAPI.PursuitOption pickPursuitOption(CampaignFleetAPI fleet, CampaignFleetAPI other, FleetEncounterContext context)
public FactionAPI getNonHostileOtherFaction()
public FactionAPI getNonHostileOtherFaction(java.util.List<CampaignFleetAPI> otherSide)
protected boolean playerOutBeforeAllies()
public static boolean canDisengage()
protected boolean otherCanDisengage()
protected boolean alliedCanDisengage()
protected boolean fleetCanDisengage(CampaignFleetAPI fleet)
public static float getDisengageSize()
protected boolean didEnoughToDisengage(CampaignFleetAPI fleet)
protected boolean canDisengageCleanly(CampaignFleetAPI fleet)
protected boolean canDisengageWithoutPursuit(CampaignFleetAPI fleet)
protected FleetEncounterContextPlugin.PursueAvailability getPursuitAvailability(CampaignFleetAPI fleet)
protected java.lang.String getString(java.lang.String id)
protected java.lang.String getIntOrNo(float value)
protected java.lang.String getApproximate(float value)
protected java.lang.String getApproximateNumOnly(float value)
protected boolean isFightingOver()
public boolean alliedFleetWantsToFight()
public boolean otherFleetWantsToFight()
public boolean otherFleetWantsToFight(boolean assumeHostile)
protected boolean fleetWantsToFight(CampaignFleetAPI fleet, CampaignFleetAPI other)
protected boolean fleetWantsToFight(CampaignFleetAPI fleet, CampaignFleetAPI other, boolean assumeHostile)
protected boolean alliedFleetHoldingVsStrongerEnemy()
protected boolean otherFleetHoldingVsStrongerEnemy()
protected boolean fleetHoldingVsStrongerEnemy(CampaignFleetAPI fleet, CampaignFleetAPI other)
protected boolean alliedFleetWantsToDisengage()
protected boolean otherFleetWantsToDisengage()
protected boolean fleetWantsToDisengage(CampaignFleetAPI fleet, CampaignFleetAPI other)
public java.lang.Object getContext()
InteractionDialogPlugingetContext in interface InteractionDialogPluginpublic void updateMemory()
updateMemory in interface RuleBasedDialogpublic void notifyActivePersonChanged()
notifyActivePersonChanged in interface RuleBasedDialogpublic void setActiveMission(CampaignEventPlugin mission)
setActiveMission in interface RuleBasedDialogpublic void setPlayerFleet(CampaignFleetAPI playerFleet)