public class BaseModPlugin extends java.lang.Object implements ModPlugin
Constructor and Description |
---|
BaseModPlugin() |
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.
|
public void afterGameSave()
ModPlugin
afterGameSave
in interface ModPlugin
public void beforeGameSave()
ModPlugin
beforeGameSave
in interface ModPlugin
public void onGameSaveFailed()
ModPlugin
onGameSaveFailed
in interface ModPlugin
public void onApplicationLoad() throws java.lang.Exception
ModPlugin
onApplicationLoad
in interface ModPlugin
java.lang.Exception
public void onEnabled(boolean wasEnabledBefore)
ModPlugin
public void onGameLoad(boolean newGame)
ModPlugin
onGameLoad
in interface ModPlugin
public void onNewGame()
ModPlugin
public void onNewGameAfterEconomyLoad()
ModPlugin
onNewGameAfterEconomyLoad
in interface ModPlugin
public PluginPick<ShipAIPlugin> pickShipAI(FleetMemberAPI member, ShipAPI ship)
ModPlugin
pickShipAI
in interface ModPlugin
member
- Can be null.ship
- Can not be null. Could be a ship or a fighter.public PluginPick<AutofireAIPlugin> pickWeaponAutofireAI(WeaponAPI weapon)
ModPlugin
pickWeaponAutofireAI
in interface ModPlugin
public PluginPick<ShipAIPlugin> pickDroneAI(ShipAPI drone, ShipAPI mothership, DroneLauncherShipSystemAPI system)
ModPlugin
pickDroneAI
in interface ModPlugin
system
- use getSpecJson() to get at the system spec, if needed.public PluginPick<MissileAIPlugin> pickMissileAI(MissileAPI missile, ShipAPI launchingShip)
ModPlugin
pickMissileAI
in interface ModPlugin
public void onNewGameAfterTimePass()
ModPlugin
onNewGameAfterTimePass
in interface ModPlugin
public void configureXStream(XStream x)
configureXStream
in interface ModPlugin
public void onNewGameAfterProcGen()
onNewGameAfterProcGen
in interface ModPlugin
public void onDevModeF8Reload()
ModPlugin
onDevModeF8Reload
in interface ModPlugin
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.