public enum BaseCommand.CommandContext
Represents what screen the player was on when they used the command.
org.lazywizard.console.BaseCommand.CommandContext CAMPAIGN_MAP
Command was entered on the campaign map.
org.lazywizard.console.BaseCommand.CommandContext CAMPAIGN_MARKET
Command was entered in a market.
org.lazywizard.console.BaseCommand.CommandContext COMBAT_CAMPAIGN
Command was entered during a battle in the campaign (doesn't include simulation battles).
org.lazywizard.console.BaseCommand.CommandContext COMBAT_MISSION
Command was entered during a mission.
org.lazywizard.console.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