public interface ModPlugin
Modifier and Type | Method and Description |
---|---|
void |
afterGameSave()
Called after a game is saved.
|
void |
beforeGameSave()
Called before a game is saved.
|
void |
configureXStream(XStream x) |
void |
onApplicationLoad()
Called after all the core loading has finished and all the scripts have finished being compiled.
|
void |
onDevModeF8Reload()
Called after F8 is pressed in combat while in devMode.
|
void |
onEnabled(boolean wasEnabledBefore)
Called before onGameLoad() and only if this mod was not previously enabled for the loaded saved game, or if this is
a new game.
|
void |
onGameLoad(boolean newGame)
Called after a game has been loaded.
|
void |
onGameSaveFailed()
Called if saving the game failed for some reason, such as running out of memory.
|
void |
onNewGame()
Called when a new game is being created.
|
void |
onNewGameAfterEconomyLoad()
Called after the economy is loaded from economy.json and the initial steps are taken.
|
void |
onNewGameAfterProcGen() |
void |
onNewGameAfterTimePass()
After the new game has stepped through its initial 2 months.
|
PluginPick<ShipAIPlugin> |
pickDroneAI(ShipAPI drone,
ShipAPI mothership,
DroneLauncherShipSystemAPI system)
Called to pick drone AI implementation.
|
PluginPick<MissileAIPlugin> |
pickMissileAI(MissileAPI missile,
ShipAPI launchingShip)
Called to pick missile AI implementation.
|
PluginPick<ShipAIPlugin> |
pickShipAI(FleetMemberAPI member,
ShipAPI ship)
Called to pick an AI implementation for a specific ship.
|
PluginPick<AutofireAIPlugin> |
pickWeaponAutofireAI(WeaponAPI weapon)
Called to pick an AI implementation for a specific weapon.
|
void onApplicationLoad() throws java.lang.Exception
java.lang.Exception
void onNewGame()
void onEnabled(boolean wasEnabledBefore)
wasEnabledBefore
- true if the mod was enabled for this saved game at some point in the past, though not immediately prior (or this method wouldn't be called at all).void onGameLoad(boolean newGame)
void beforeGameSave()
void afterGameSave()
void onGameSaveFailed()
void onNewGameAfterProcGen()
void onNewGameAfterEconomyLoad()
void onNewGameAfterTimePass()
void onDevModeF8Reload()
PluginPick<ShipAIPlugin> pickShipAI(FleetMemberAPI member, ShipAPI ship)
member
- Can be null.ship
- Can not be null. Could be a ship or a fighter.PluginPick<AutofireAIPlugin> pickWeaponAutofireAI(WeaponAPI weapon)
weapon
- PluginPick<ShipAIPlugin> pickDroneAI(ShipAPI drone, ShipAPI mothership, DroneLauncherShipSystemAPI system)
drone
- mothership
- system
- use getSpecJson() to get at the system spec, if needed.PluginPick<MissileAIPlugin> pickMissileAI(MissileAPI missile, ShipAPI launchingShip)
drone
- launchingShip
- void configureXStream(XStream x)
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.