public enum BaseCommand.CommandContext
Represents what screen the player was on when they used the command.
Enum Constant and Description |
---|
CAMPAIGN_MAP
Command was entered on the campaign map.
|
CAMPAIGN_MARKET
Command was entered in a market.
|
COMBAT_CAMPAIGN
Command was entered during a battle in the campaign (doesn't include simulation battles).
|
COMBAT_MISSION
Command was entered during a mission.
|
COMBAT_SIMULATION
Command was entered during a refit simulation battle.
|
Modifier and Type | Method and Description |
---|---|
com.fs.starfarer.api.campaign.SectorEntityToken |
getEntityInteractedWith()
Returns the
SectorEntityToken the player is in a dialog with, if any. |
com.fs.starfarer.api.campaign.econ.MarketAPI |
getMarket()
Returns the
MarketAPI of the The |
boolean |
isCampaignAccessible()
Returns whether the player is in campaign mode, including in campaign battles (even refit simulation battles).
|
boolean |
isInCampaign()
Returns whether this context is on the campaign map.
|
boolean |
isInCombat()
Returns whether this context is on the combat map.
|
boolean |
isInMarket()
Returns whether the player is interacting with a market-containing entity.
|
BaseCommand.CommandContext CAMPAIGN_MAP
Command was entered on the campaign map.
BaseCommand.CommandContext CAMPAIGN_MARKET
Command was entered in a market.
BaseCommand.CommandContext COMBAT_CAMPAIGN
Command was entered during a battle in the campaign (doesn't include simulation battles).
BaseCommand.CommandContext COMBAT_MISSION
Command was entered during a mission.
BaseCommand.CommandContext COMBAT_SIMULATION
Command was entered during a refit simulation battle.
public boolean isInCombat()
Returns whether this context is on the combat map.
true
if the game is on the combat map, false
otherwise.public boolean isInCampaign()
Returns whether this context is on the campaign map.
true
if the game is on the campaign map, false
otherwise.public boolean isInMarket()
Returns whether the player is interacting with a market-containing entity.
true
if the player is in dialog with a market-containing entity, false
otherwise.public boolean isCampaignAccessible()
Returns whether the player is in campaign mode, including in campaign battles (even refit simulation battles).
true
if the player is on the campaign map, in a campaign battle, or running a simulation in a campaign refit screen.@Nullable public com.fs.starfarer.api.campaign.SectorEntityToken getEntityInteractedWith()
Returns the SectorEntityToken
the player is in a dialog with, if any.
SectorEntityToken
the player is currently in dialog with, or null
if they are not in a dialog.@Nullable public com.fs.starfarer.api.campaign.econ.MarketAPI getMarket()
Returns the MarketAPI
of the The