Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.campaign.GenericPluginManagerAPI Interface Reference

Classes

interface  GenericPlugin
 

Public Member Functions

boolean hasPlugin (Class c)
 
void addPlugin (GenericPlugin plugin)
 
void addPlugin (GenericPlugin plugin, boolean isTransient)
 
void removePlugin (GenericPlugin plugin)
 
List< GenericPlugin > getPluginsOfClass (Class c)
 
< T > T pickPlugin (Class< T > c, Object params)
 

Static Public Attributes

static int CORE_GENERAL = 0
 
static int MOD_GENERAL = 100
 
static int CORE_SUBSET = 200
 
static int MOD_SUBSET = 300
 
static int CORE_SPECIFIC = 400
 
static int MOD_SPECIFIC = 500
 
static int HIGHEST = Integer.MAX_VALUE
 

Detailed Description

Definition at line 5 of file GenericPluginManagerAPI.java.

Member Function Documentation

◆ addPlugin() [1/2]

void com.fs.starfarer.api.campaign.GenericPluginManagerAPI.addPlugin ( GenericPlugin  plugin)

◆ addPlugin() [2/2]

void com.fs.starfarer.api.campaign.GenericPluginManagerAPI.addPlugin ( GenericPlugin  plugin,
boolean  isTransient 
)

◆ getPluginsOfClass()

List< GenericPlugin > com.fs.starfarer.api.campaign.GenericPluginManagerAPI.getPluginsOfClass ( Class  c)

◆ hasPlugin()

boolean com.fs.starfarer.api.campaign.GenericPluginManagerAPI.hasPlugin ( Class  c)

◆ pickPlugin()

< T > T com.fs.starfarer.api.campaign.GenericPluginManagerAPI.pickPlugin ( Class< T >  c,
Object  params 
)

◆ removePlugin()

void com.fs.starfarer.api.campaign.GenericPluginManagerAPI.removePlugin ( GenericPlugin  plugin)

Member Data Documentation

◆ CORE_GENERAL

int com.fs.starfarer.api.campaign.GenericPluginManagerAPI.CORE_GENERAL = 0
static

Lowest priority. Should only be used by core code, a modded plugin with this priority may not end up being used anywhere, as what gets picked when multiple plugins have the same priority is undefined.

Definition at line 11 of file GenericPluginManagerAPI.java.

◆ CORE_SPECIFIC

int com.fs.starfarer.api.campaign.GenericPluginManagerAPI.CORE_SPECIFIC = 400
static

Should be used by core code only for specific encounters. For example, a "special" planet or fleet could have their own dialog, and the priority of this would override a mod that replaces the general interactions with all planets or fleets.

Definition at line 35 of file GenericPluginManagerAPI.java.

◆ CORE_SUBSET

int com.fs.starfarer.api.campaign.GenericPluginManagerAPI.CORE_SUBSET = 200
static

Should only be used by core code.

Definition at line 21 of file GenericPluginManagerAPI.java.

◆ HIGHEST

int com.fs.starfarer.api.campaign.GenericPluginManagerAPI.HIGHEST = Integer.MAX_VALUE
static

Absolute highest priority; shouldn't be used without good reason. A mod compilation might use this to resolve conflicts introduced by mods it contains.

Definition at line 48 of file GenericPluginManagerAPI.java.

◆ MOD_GENERAL

int com.fs.starfarer.api.campaign.GenericPluginManagerAPI.MOD_GENERAL = 100
static

Should be used by mods for wholesale replacement of campaign features.

Definition at line 16 of file GenericPluginManagerAPI.java.

◆ MOD_SPECIFIC

int com.fs.starfarer.api.campaign.GenericPluginManagerAPI.MOD_SPECIFIC = 500
static

Should be used by mods for specific encounters, that is, encounters that aren't handled by any of the _GENERAL and _SET priority plugins. For example, if a specific fleet has a special encounter dialog, it would be returned using this priority.

Definition at line 42 of file GenericPluginManagerAPI.java.

◆ MOD_SUBSET

int com.fs.starfarer.api.campaign.GenericPluginManagerAPI.MOD_SUBSET = 300
static

For a plugin that handles a set of circumstances. For example "interaction with all jungle worlds". Overrides any _GENERAL prioritiy implementations (i.e. "interaction with all planets"). Is overriden by _SPECIFIC priority ("interaction with this particular planet").

Definition at line 28 of file GenericPluginManagerAPI.java.


The documentation for this interface was generated from the following file: