public class Console
The main class of the console mod. Most of its methods aren't publicly accessible, so this is mainly used to display messages to the player.
| Modifier and Type | Method and Description |
|---|---|
static BaseCommand.CommandContext |
getContext() |
static org.lazywizard.lazylib.ui.LazyFont |
getFont() |
static ConsoleSettings |
getSettings() |
static void |
reloadSettings()
Forces the console to reload its settings from the settings file.
|
static void |
showDialogOnClose(com.fs.starfarer.api.campaign.InteractionDialogPlugin dialog,
com.fs.starfarer.api.campaign.SectorEntityToken token) |
static void |
showDialogOnClose(com.fs.starfarer.api.campaign.SectorEntityToken token) |
static void |
showException(java.lang.Object message,
java.lang.Throwable ex)
Displays the stack trace of a
Throwable. |
static void |
showIndentedMessage(java.lang.String preamble,
java.lang.Object message,
int indentation)
Displays an indented message to the user. The message will be formatted and shown to the player when they reach a section of the game where it can be displayed properly (combat/campaign map).
|
static void |
showMessage(java.lang.Object message,
org.apache.log4j.Level logLevel)
Displays a message to the user. The message will be formatted and shown to the player when they reach a section of the game where it can be displayed properly (combat/campaign map).
|
static void |
showMessage(java.lang.Object message)
Displays a message to the user. The message will be formatted and shown to the player when they reach a section of the game where it can be displayed properly (combat/campaign map).
|
public static void reloadSettings()
Forces the console to reload its settings from the settings file.
IOException - if the JSON file at CommonStrings#PATH_SETTINGS does not exist or can't be opened.JSONException - if the JSON is malformed or missing entries.public static ConsoleSettings getSettings()
public static org.lazywizard.lazylib.ui.LazyFont getFont()
public static BaseCommand.CommandContext getContext()
public static void showMessage(java.lang.Object message,
org.apache.log4j.Level logLevel)
Displays a message to the user. The message will be formatted and shown to the player when they reach a section of the game where it can be displayed properly (combat/campaign map).
message - org.jetbrains.dokka.NodeRenderContent@21c0002c: The message to show.logLevel - org.jetbrains.dokka.NodeRenderContent@43271468: If this is equal to/higher than the "consoleLogLevel" setting, this message will be logged in Starsector.log.public static void showMessage(java.lang.Object message)
Displays a message to the user. The message will be formatted and shown to the player when they reach a section of the game where it can be displayed properly (combat/campaign map).
message - org.jetbrains.dokka.NodeRenderContent@66df1e36: The message to show.public static void showIndentedMessage(@Nullable
java.lang.String preamble,
java.lang.Object message,
int indentation)
Displays an indented message to the user. The message will be formatted and shown to the player when they reach a section of the game where it can be displayed properly (combat/campaign map).
preamble - org.jetbrains.dokka.NodeRenderContent@12f33168: An optional argument; this part of the message will not be indented.message - org.jetbrains.dokka.NodeRenderContent@3393827a: The indented message to show.indentation - org.jetbrains.dokka.NodeRenderContent@486c5434: The number of spaces to indent message with.public static void showException(java.lang.Object message,
java.lang.Throwable ex)
Displays the stack trace of a Throwable.
public static void showDialogOnClose(com.fs.starfarer.api.campaign.InteractionDialogPlugin dialog,
com.fs.starfarer.api.campaign.SectorEntityToken token)
public static void showDialogOnClose(com.fs.starfarer.api.campaign.SectorEntityToken token)