### Initialize MagicGuidedProjectileScript for Projectile Guidance Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.weapons/-magic-guided-projectile-script/index.html This example demonstrates how to initialize and add a MagicGuidedProjectileScript instance to the game engine. It requires a projectile (proj) and an optional initial target (target) to begin guiding the projectile mid-flight. Remember to replace 'MagicGuidedProjectileScript' with your custom class name. ```JVM engine.addPlugin(MagicGuidedProjectileScript(proj, target)); ``` -------------------------------- ### Example Implementation of SampleMagicCombatGuiLauncher in Java Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-magic-combat-gui-launcher/index.html A Java example demonstrating how to extend `SampleMagicCombatGuiLauncher` to create a custom GUI launcher. It sets '+' as the hotkey and overrides `constructGui` to return an `ExampleCombatGui` instance, showcasing basic usage. ```Java public class ExampleCombatGuiLauncher extends SampleMagicCombatGuiLauncher{ public ExampleCombatGuiLauncher(){ super('+'); // use + as hotkey to open/close GUI } @Override public @NotNull MagicCombatGuiBase constructGui(){ return new ExampleCombatGui(); // construct and return class that extends [GuiBase] } } ``` -------------------------------- ### Kotlin API: MagicCombatGuiBase.Companion Object Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-magic-combat-gui-base/-companion/index.html API documentation for the `Companion` object within `MagicCombatGuiBase`, which provides utility functions. It includes a function to generate a default GUI layout, useful for quickly getting started with the combat GUI. ```APIDOC object Companion Functions: createDefaultMagicCombatGuiLayout(): MagicCombatGuiLayout Description: Best guess GUI layout, feel free to pass this to MagicCombatGuiBase to get started quickly. In the long term, you probably want to create your own MagicCombatGuiLayout. ``` -------------------------------- ### Java Example Implementation of GuiBase Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-gui-base/index.html An example Java class, ExampleCombatGui, demonstrating how to extend GuiBase to create a custom combat GUI. It shows how to initialize the GUI layout, add individual buttons, and create button groups, along with overriding title and message strings. ```Java public class ExampleCombatGui extends GuiBase { // GUI setup work is done in constructor public ExampleCombatGui(){ super( new GuiLayout(0.05f, 0.8f, 100f, 20f, 0.5f, Color.WHITE,5f, 0.4f, 0.2f, 25f, "graphics/fonts/insignia15LTaa.fnt", 0.4f, 0.4f) ); addButton(new MyButtonAction(), // MyButtonAction is a class you need to write that implements [ButtonAction] "MyButton", // title of the button, i.e. text displayed on the button "my tooltip text", // text to display when user hovers over the button false // if the button should be disabled (usually false) ); addButtonGroup( new MyButtonGroupAction(), // A class you need to write that implements [ButtonGroupAction] new CreateSimpleButtons( // you can also write your own class that implements [CreateButtonsAction] Arrays.asList("button1", "button2"), null, null ), null, "Example button group" ); } @Nullable @Override protected String getTitleString() { return "This is an example title"; } @Nullable @Override protected String getMessageString() { return "This is a sample message"; } } ``` -------------------------------- ### Java Example: Implementing MagicCombatCreateButtonsAction Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-magic-combat-create-buttons-action/index.html This Java example demonstrates how to implement the `MagicCombatCreateButtonsAction` interface. It shows how to override the `createButtons` method to add custom buttons to a `MagicCombatDataButtonGroup`, including specifying button text, data, and tooltips. ```Java public class CreateMyButtons implements MagicCombatCreateButtonsAction{ @Override public void createButtons(MagicCombatDataButtonGroup group){ group.addButton("MyButton", "button data, e.g. a String", "My tooltip", false); // repeat for additional buttons or maybe use a loop } } ``` -------------------------------- ### Java Example for ButtonAction Interface Implementation Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttons/-button-action/index.html An example implementation of the `ButtonAction` interface in Java, demonstrating how to override the `execute` method to perform an action when a button is clicked, logging a message to the Starsector log. ```Java public class ExampleButtonAction implements ButtonAction { @Override public void execute() { Global.getLogger(this.getClass()).info("Button was clicked. This message should show up in starsector.log"); } } ``` -------------------------------- ### Java Example: Implementing MagicCombatButtonAction execute Method Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttons/-magic-combat-button-action/execute.html A concrete Java example demonstrating how to implement the `execute` method for a `MagicCombatButtonAction`. This snippet shows a simple action of logging a message to the Starsector game log when the button is activated. ```Java @Overridepublic void execute() { Global.getLogger(this.getClass()).info("Button was clicked. This message should show up in starsector.log"); } ``` -------------------------------- ### Java Example: Implementing createButtons Method Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-magic-combat-create-simple-buttons/create-buttons.html An example implementation in Java demonstrating how to override the `createButtons` method to add a button to the provided `MagicCombatDataButtonGroup`. This snippet shows how to add a single button with specified text, data, tooltip, and enabled status. ```Java @Overridepublic void createButtons(MagicCombatDataButtonGroup group){ group.addButton("MyButton", "button data, e.g. a String", "My tooltip", false); // repeat for additional buttons or maybe use a loop } ``` -------------------------------- ### Java: Example Implementation of MagicCombatButtonAction Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttons/-magic-combat-button-action/index.html This Java code provides an example implementation of the `MagicCombatButtonAction` interface. The `ExampleButtonAction` class overrides the `execute` method to log a message to `starsector.log` when the associated button is clicked, demonstrating a simple custom action. ```Java public class ExampleButtonAction implements MagicCombatButtonAction { @Override public void execute() { Global.getLogger(this.getClass()).info("Button was clicked. This message should show up in starsector.log"); } } ``` -------------------------------- ### Example Implementation of createButtons in Java/Kotlin Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-magic-combat-create-buttons-action/create-buttons.html Demonstrates how to implement the `createButtons` method, showing how to add a button to the provided `MagicCombatDataButtonGroup` using `group.addButton`. ```Java @Overridepublic void createButtons(MagicCombatDataButtonGroup group){ group.addButton("MyButton", "button data, e.g. a String", "My tooltip", false); // repeat for additional buttons or maybe use a loop } ``` -------------------------------- ### SampleGuiLauncher Constructor API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-gui-launcher/-sample-gui-launcher.html API documentation for the `SampleGuiLauncher` class constructor. It initializes the GUI launcher with a specified hotkey character. ```APIDOC SampleGuiLauncher: constructor(hotkey: Char) Parameters: hotkey: lowercase char representation of hotkey to press to open/close the GUI. Make sure that key is not being used by Starsector! ``` -------------------------------- ### Kotlin: Get elapsed days since game start Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.kotlin/index.html Retrieves the total number of days that have elapsed since the game started. This is useful for time-based events, progression tracking, or calculating durations. ```Kotlin fun .elapsedDaysSinceGameStart(): Float ``` -------------------------------- ### SampleGuiLauncher Class API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-gui-launcher/index.html API documentation for the `SampleGuiLauncher` abstract class, detailing its constructor, parameters, and abstract/open methods for GUI construction and engine integration. ```APIDOC abstract class SampleGuiLauncher(hotkey: Char) Description: Class that, when added to engine via e.g. `addPlugin`, will open/close GUI when specified hotkey is pressed. Extend this class by overriding `constructGui` to construct a GuiObject that extends `GuiBase`. This class is mainly intended as an example or to quickly get started. In the long term, you probably want to implement your own GUI launching logic in order to be able to customize things. Parameters: hotkey: Char Description: lowercase char representation of hotkey to press to open/close the GUI. Make sure that key is not being used by Starsector! Constructors: SampleGuiLauncher(hotkey: Char) Functions: advance(amount: Float, events: MutableList?) constructGui(): GuiBase Description: override this to return a new GUI object from this function, e.g. "return new MyGui()" renderInUICoords(viewport: ?) ``` -------------------------------- ### Kotlin API: Get Elapsed Days Since Game Start Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-misc/get-elapsed-days-since-game-start.html API documentation for the getElapsedDaysSinceGameStart function within the org.magiclib.util.MagicMisc utility class. This function returns the number of elapsed days since the game started as a floating-point number. ```APIDOC Class: org.magiclib.util.MagicMisc Method: open fun getElapsedDaysSinceGameStart(): Float ``` -------------------------------- ### Kotlin API: Get Elapsed Days Since Game Start Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.kotlin/elapsed-days-since-game-start.html API documentation for the `elapsedDaysSinceGameStart` function within the `org.magiclib.kotlin` package. This function returns a `Float` value representing the number of days that have elapsed since the game started. ```APIDOC fun elapsedDaysSinceGameStart(): Float ``` -------------------------------- ### Extend SampleGuiLauncher for Custom GUI Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-gui-launcher/index.html This Java example demonstrates how to extend the `SampleGuiLauncher` abstract class to create a custom GUI launcher. It overrides the `constructGui` method to return an instance of `ExampleCombatGui` and sets '+' as the hotkey for activation. ```Java public class ExampleCombatGuiLauncher extends SampleGuiLauncher{ public ExampleCombatGuiLauncher(){ super('+'); // use + as hotkey to open/close GUI } @Override public @NotNull GuiBase constructGui(){ return new ExampleCombatGui(); // construct and return class that extends [GuiBase] } } ``` -------------------------------- ### SampleMagicCombatGuiLauncher Class API Documentation Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-magic-combat-gui-launcher/index.html Detailed API documentation for the `SampleMagicCombatGuiLauncher` abstract class, outlining its constructor, parameters, and methods. This class is designed to integrate a hotkey-activated GUI into Starsector, requiring custom implementation of the `constructGui` method. ```APIDOC SampleMagicCombatGuiLauncher Class: abstract class SampleMagicCombatGuiLauncher(hotkey: Char) Description: Class that, when added to engine via e.g. `addPlugin`, will open/close GUI when specified hotkey is pressed. Extend this class by overriding constructGui to construct a GuiObject that extends MagicCombatGuiBase. This class is mainly intended as an example or to quickly get started. In the long term, you probably want to implement your own GUI launching logic in order to be able to customize things. Author: Jannes Since: 1.3.0 Constructors: SampleMagicCombatGuiLauncher(hotkey: Char) Parameters: hotkey: Char Description: lowercase char representation of hotkey to press to open/close the GUI. Make sure that key is not being used by Starsector! Functions: advance(amount: Float, events: MutableList?) Description: (No specific description provided in source, just signature) constructGui(): MagicCombatGuiBase Description: Override this to return a new GUI object from this function, e.g. "return new MyGui()" renderInUICoords(viewport: ?) Description: (No specific description provided in source, just signature) ``` -------------------------------- ### MagicLib org.magiclib.subsystems.examples Package API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/index.html This section provides an API reference for the `org.magiclib.subsystems.examples` package, listing various open classes that extend `MagicDroneSubsystem` or provide other subsystem functionalities, such as drone spawning and drive management. ```APIDOC Package: org.magiclib.subsystems.examples Classes: AmmoFeedersSubsystem: Type: open class ChargedDriveSubsystem: Type: open class FormationSwitchPDDroneSubsystem: Type: open class Extends: MagicDroneSubsystem Description: Spawns four PD drones. PDDroneSubsystem: Type: open class Extends: MagicDroneSubsystem Description: Spawns a PD drone. SeparateChargePDDroneSubsystem: Type: open class Extends: MagicDroneSubsystem Description: Spawns two PD drones. ToggledDriveSubsystem: Type: open class ``` -------------------------------- ### Kotlin DataButtonGroup.addButton Usage Example Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-data-button-group/add-button.html An example demonstrating how to call the `addButton` function with specific values for text, data, tooltip, and active state. ```Kotlin addButton("MyButton", "button data, e.g. a String", "My tooltip", false); ``` -------------------------------- ### Kotlin MagicLib map Function Usage Example Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.kotlin/map.html An example demonstrating how to use the 'map' extension function on a 'jsonArray' to process its objects, applying a transformation and an action. ```Kotlin jsonArray.map { obj -> doSomething(obj) } ``` -------------------------------- ### SampleMagicCombatGuiLauncher Constructor API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-magic-combat-gui-launcher/-sample-magic-combat-gui-launcher.html API documentation for the SampleMagicCombatGuiLauncher class constructor. It initializes the GUI launcher with a specified hotkey character. ```APIDOC SampleMagicCombatGuiLauncher: constructor(hotkey: Char) Parameters: hotkey: lowercase char representation of hotkey to press to open/close the GUI. Make sure that key is not being used by Starsector! ``` -------------------------------- ### Example: Call MagicUI.drawSystemBar (Ship-based) Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-u-i/draw-system-bar.html An example demonstrating how to call the `MagicUI.drawSystemBar` function to draw a red system bar next to a ship, with the fill level determined by `shieldTime/MAX_SHIELD_TIME`. ```Java MagicUI.drawSystemBar( ship, new Color(255,0,0), shieldTime/MAX_SHIELD_TIME, 0 ); ``` -------------------------------- ### Kotlin API: SampleGuiLauncher.constructGui Method Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-gui-launcher/construct-gui.html This API documentation describes the abstract `constructGui` function within the `SampleGuiLauncher` class. Developers must override this method to return a new GUI object, specifically an instance of `GuiBase` or its subclass. ```APIDOC Function: constructGui Signature: abstract fun constructGui(): GuiBase Description: override this to return a new GUI object from this function, e.g. "return new MyGui()" ``` -------------------------------- ### MagicDroneSubsystem init() Method API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.drones/-magic-drone-subsystem/init.html API documentation for the `init()` method, an open function within the `org.magiclib.subsystems.drones.MagicDroneSubsystem` class. This method is likely intended for performing necessary setup or initialization tasks for the drone subsystem. ```APIDOC Class: org.magiclib.subsystems.drones.MagicDroneSubsystem Method: init() Visibility: open fun Description: Initializes the subsystem. ``` -------------------------------- ### Kotlin SampleGuiLauncher advance Function API Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-gui-launcher/advance.html API documentation for the `advance` function, an open function within the `org.magiclib.combatgui.SampleGuiLauncher` class. It takes a floating-point number for the amount and a mutable list of events, likely used for advancing game state or UI elements. ```APIDOC open fun advance(amount: Float, events: MutableList<>?) ``` -------------------------------- ### Get Drone Deployment Delay (MagicLib Kotlin API) Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.drones/-magic-drone-subsystem/get-drone-deploy-delay.html Documents the `getDroneDeployDelay` function from the `MagicDroneSubsystem`, which provides the delay in seconds between subsequent drone deployments when multiple drones need to be deployed at once. ```APIDOC MagicDroneSubsystem: getDroneDeployDelay(): Float Returns: Float - Delay between subsequent drone deployments if multiple need to be deployed at once. ``` -------------------------------- ### Kotlin API: SampleMagicCombatGuiLauncher.advance Method Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-magic-combat-gui-launcher/advance.html API documentation for the `advance` method within the `SampleMagicCombatGuiLauncher` class. This is an open Kotlin function designed to process game state or GUI updates, taking a float amount and an optional mutable list of events as parameters. ```APIDOC Class: org.magiclib.combatgui.SampleMagicCombatGuiLauncher Method: advance Signature: open fun advance(amount: Float, events: MutableList?) Parameters: amount: Float events: MutableList? Return Type: Unit ``` -------------------------------- ### Example Usage: Creating a Custom Captain with MagicCampaign Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-campaign/create-captain-builder.html Demonstrates how to use the `createCaptainBuilder` function to instantiate a new captain. The example shows setting the faction, first name, last name, and gender before creating the captain object. ```Kotlin MagicCampaign.createCaptainBuilder(Factions.LUDDIC_CHURCH) .setFirstName("David") .setLastName("Rengel") .setGender(FullName.Gender.MALE) .create(); ``` -------------------------------- ### BountyScriptExample Class Constructor Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty.rulecmd/-bounty-script-example/-bounty-script-example.html Documents the default constructor for the `BountyScriptExample` class. This constructor takes no parameters and is used to instantiate new objects of the class. ```APIDOC BountyScriptExample constructor() ``` -------------------------------- ### Kotlin: Example Usage of forEach Function Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.kotlin/for-each.html Illustrates how to use the `forEach` extension function on a `jsonArray` in Kotlin. This example shows iterating over elements and performing an action `doSomething` on each object, explicitly specifying the type `String` for the elements. ```Kotlin jsonArray.forEach { obj -> doSomething(obj) } ``` -------------------------------- ### BountyScriptExample Class API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty.rulecmd/-bounty-script-example/index.html API documentation for the `BountyScriptExample` class, an example bounty script for Starsector's MagicLib. It details the class constructor and the `execute` method, which is designed to be triggered by entries in rules.csv. ```APIDOC class BountyScriptExample Type: open class Description: Not used. This is an example of a bounty script that can run on accept and on completion. This is triggered by a trigger defined in rules.csv. Author: Wisp Constructors: - BountyScriptExample() Functions: - execute(ruleId: String, dialog: InteractionDialogAPI, params: List, memoryMap: Map): Boolean ``` -------------------------------- ### Java Example for ButtonAction execute Method Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttons/-button-action/execute.html An example implementation of the `execute` method for a `ButtonAction` in Java. This snippet demonstrates how to override the method to log a message to the Starsector game log when the button is activated. ```Java @Overridepublic void execute() { Global.getLogger(this.getClass()).info("Button was clicked. This message should show up in starsector.log");} ``` -------------------------------- ### Java Example: Implementing CreateButtonsAction Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-create-buttons-action/index.html An example Java class demonstrating how to implement the `CreateButtonsAction` interface to add custom buttons to a `DataButtonGroup`. It shows how to use the `addButton` method within the `createButtons` override to define button properties. ```Java public class CreateMyButtons implements CreateButtonsAction{ @Override public void createButtons(DataButtonGroup group){ group.addButton("MyButton", "button data, e.g. a String", "My tooltip", false); // repeat for additional buttons or maybe use a loop } } ``` -------------------------------- ### BountyItemPanelPlugin Constructor API Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty.intel/-bounty-list-panel-plugin/-bounty-item-panel-plugin/-bounty-item-panel-plugin.html API documentation for the constructor of the `BountyItemPanelPlugin` class. It initializes a new panel instance, requiring a `BountyInfo` object and the desired width and height for the panel. ```APIDOC BountyItemPanelPlugin: constructor(item: BountyInfo, width: Float, height: Float) item: BountyInfo - Information about the bounty to be displayed in the panel. width: Float - The width of the panel in pixels. height: Float - The height of the panel in pixels. ``` -------------------------------- ### Kotlin Example: Adding a Button with addButton Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-magic-combat-data-button-group/add-button.html An example demonstrating the usage of the `addButton` function to create a button named 'MyButton' with specific data, a tooltip, and an initial inactive state. This shows how to call the function with its required arguments. ```Kotlin addButton("MyButton", "button data, e.g. a String", "My tooltip", false); ``` -------------------------------- ### MagicGuidedProjectileScript Constructor API Documentation Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.weapons/-magic-guided-projectile-script/-magic-guided-projectile-script.html Documents the constructor for `MagicGuidedProjectileScript`, detailing its parameters and their purpose for initializing a guided projectile script within the MagicLib project. ```APIDOC MagicGuidedProjectileScript: constructor(proj: DamagingProjectileAPI, target: CombatEntityAPI) Description: Initializer for the guided projectile script Parameters: proj: Type: DamagingProjectileAPI Description: The projectile to affect. proj.getWeapon() must be non-null. target: Type: CombatEntityAPI Description: The target missile/asteroid/ship for the script's guidance. Can be null, if the script does not follow a target ("ONE_TURN_DUMB") or to instantly activate secondary guidance mode. ``` -------------------------------- ### ExampleTargetListAchievement Class Constructor API Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.achievements.examples/-example-target-list-achievement/-example-target-list-achievement.html API documentation for the constructor of the `ExampleTargetListAchievement` class, which initializes a new instance of the achievement. ```APIDOC ExampleTargetListAchievement ============================ constructor() ``` -------------------------------- ### FormationSwitchPDDroneSubsystem Class API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-formation-switch-p-d-drone-subsystem/index.html API documentation for the `FormationSwitchPDDroneSubsystem` class, a Kotlin-based drone subsystem that extends `MagicDroneSubsystem`. It details its constructor and various methods related to drone deployment, charge calculation, and HUD rendering. ```APIDOC FormationSwitchPDDroneSubsystem Class: Type: open class Extends: MagicDroneSubsystem Description: Spawns four PD drones. The formation can be switched by key. Constructors: FormationSwitchPDDroneSubsystem(ship: ShipAPI) Functions: advanceInternal(amount: Float): Type: open fun calcMaxDroneCharges(): Int: Type: open fun Description: Uses system stats to calculate the actual drone charges based on MagicSubsystem#scaleSystemStat(float, float) drawHUDBar(viewport: NonExistentClass, rootLoc: NonExistentClass, barLoc: NonExistentClass, displayAdditionalInfo: Boolean, longestNameWidth: Float): Type: open fun dronesDeployWhenShipIsDead(): Boolean: Type: open fun Description: Drones will deploy when ship is dead only if dronesExplodeWhenShipDies returns false. Otherwise, they would explode in the next frame. dronesExplodeWhenShipDies(): Boolean: Type: open fun Description: All drones will explode when the ship dies. generatesDroneChargesWhileShipIsDead(): Boolean: Type: open fun getAdvancesWhileDead(): Boolean: Type: open fun Description: Drones will still advance while the ship is dead no matter what. getBarFill(): Float: Type: open fun Description: Override to not display charge filling in favor of separate drone bar if system doesn't use charges. getBaseActiveDuration(): Float: Type: open fun getBaseChargeRechargeDuration(): Float: Type: open fun ``` -------------------------------- ### MagicPaintjobManager.initIntel API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.paintjobs/-magic-paintjob-manager/init-intel.html API documentation for the `initIntel` function within the `org.magiclib.paintjobs.MagicPaintjobManager` class. This function is part of the JVM module and is responsible for initializing intel, likely related to paint jobs. It takes no parameters and returns nothing explicitly mentioned. ```APIDOC fun initIntel() ``` -------------------------------- ### Example Usage of MagicCampaign.createFleetBuilder in Kotlin Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-campaign/create-fleet-builder.html Demonstrates how to use the `createFleetBuilder` function to construct a Hegemony Attack Fleet. This example sets the fleet name, faction, type, flagship details (name, variant, recoverability, autofit), captain, support autofit, and reinforcement faction before creating the fleet. ```Kotlin MagicCampaign.createFleetBuilder() .setFleetName("Hegemony Attack Fleet") .setFleetFaction(Factions.HEGEMONY) .setFleetType(FleetTypes.TASK_FORCE) .setFlagshipName("HSS Onslaught") .setFlagshipVariant("onslaught_xiv_Elite") .setFlagshipAlwaysRecoverable(false) .setFlagshipAutofit(true) .setCaptain(theCaptain) .setSupportAutofit(true) .setReinforcementFaction(Factions.HEGEMONY) .create() ``` -------------------------------- ### Initialize Dark Mode Theme Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-gui-launcher/index.html This JavaScript snippet checks for user's dark mode preference from local storage or system settings and applies the 'theme-dark' class to the HTML element if preferred. ```JavaScript var pathToRoot = "../../../"; const storage = localStorage.getItem("dokka-dark-mode") if (storage == null) { const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches if (osDarkSchemePreferred === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark") } } else { const savedDarkMode = JSON.parse(storage) if(savedDarkMode === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark") } } ``` -------------------------------- ### ToggledDriveSubsystem Constructor API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-toggled-drive-subsystem/-toggled-drive-subsystem.html API documentation for the ToggledDriveSubsystem class constructor, detailing its parameters and purpose within the org.magiclib.subsystems.examples package. ```APIDOC ToggledDriveSubsystem: constructor(ship: ShipAPI) ship: ShipAPI - The ship instance to associate with the subsystem. ``` -------------------------------- ### Java Example: Implementing MagicCombatButtonGroupAction.execute Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-magic-combat-button-group-action/execute.html An example implementation in Java demonstrating how to override the `execute` method. This snippet logs information about the button group and the clicked button's data to the global logger, showing basic usage of the method's parameters. ```Java @Overridepublic void execute(@NotNull List data, @Nullable Object selectedButtonData, @Nullable Object unselectedButtonData) { Global.getLogger(this.getClass()).info("A button in the button group was clicked. Button group data:"); Global.getLogger(this.getClass()).info(data); } ``` -------------------------------- ### MagicInterference.applyInterference API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-interference/apply-interference.html API documentation for the `applyInterference` function within the `MagicInterference` utility class. This function reduces a ship's passive dissipation if more than one weapon causing interferences is installed. The strength of the effect has a quadratic growth with the number of such weapons installed. ```APIDOC MagicInterference.applyInterference: Description: Reduces a ship's passive dissipation if more than one weapon causing interferences is installed. The strength of the effect has a quadratic growth with the number of such weapons installed. Signature: open fun applyInterference(shipVariant: ShipVariantAPI) Parameters: shipVariant: Type: ShipVariantAPI Description: Variant of the ship affected by the interference debuff ``` -------------------------------- ### Draw System Bar API and Java Usage Example Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-u-i/index.html These functions draw a small UI bar next to the ship's system or at a given location. The provided Java example demonstrates how to use MagicUI.drawSystemBar to display a red bar based on shield time. ```APIDOC open fun drawSystemBar(ship: ShipAPI, intendedColor: Color, fill: Float, blendTime: Float) open fun drawSystemBar(ship: ShipAPI, boxLoc: Vector2f, intendedColor: Color, fill: Float, blendTime: Float) ``` ```Java MagicUI.drawSystemBar( ship, new Color(255,0,0), shieldTime/MAX_SHIELD_TIME, 0 ); ``` -------------------------------- ### MagicRenderPlugin Kotlin Init Function API Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.plugins/-magic-render-plugin/init.html API documentation for the 'init' function within the 'org.magiclib.plugins.MagicRenderPlugin' class. This open function is designed to be called with a 'CombatEngineAPI' object, likely for plugin initialization or setup within a combat simulation context. ```APIDOC open fun init(engine: CombatEngineAPI) ``` -------------------------------- ### MagicSubsystemsCombatPlugin Class API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems/-magic-subsystems-combat-plugin/index.html API documentation for the `MagicSubsystemsCombatPlugin` class, part of the `org.magiclib.subsystems` package. It details the class constructor, a nested `Companion` object, and various functions for advancing, drawing, and initializing combat subsystems. ```APIDOC MagicSubsystemsCombatPlugin: class MagicSubsystemsCombatPlugin Constructors: MagicSubsystemsCombatPlugin() Types: object Companion Functions: open fun advance(amount: Float, events: List) fun advanceSubsystems(amount: Float) fun drawSubsystemsInWorld(viewport: ) fun drawSubsystemsUI(viewport: ) open fun init(engine: ?) open fun renderInUICoords(viewport: ?) open fun renderInWorldCoords(viewport: ?) ``` -------------------------------- ### Java Example: Overriding MagicCombatButtonGroupAction.onHover Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui.buttongroups/-magic-combat-button-group-action/on-hover.html This Java code snippet provides an example implementation of the onHover method within a class extending MagicCombatButtonGroupAction. It demonstrates how to log a message to the console when a button in the group is hovered, illustrating a simple custom action. ```Java @Overridepublic void onHover() { Global.getLogger(this.getClass()).info("A button in the button group was hovered over");} ``` -------------------------------- ### MagicCombatGuiBase constructGui API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/-sample-magic-combat-gui-launcher/construct-gui.html API documentation for the `constructGui` abstract function, part of the `SampleMagicCombatGuiLauncher` class. This function is designed to be overridden by implementers to return a new instance of a `MagicCombatGuiBase` object. ```APIDOC Function: constructGui Class: org.magiclib.combatgui.SampleMagicCombatGuiLauncher Signature: abstract fun constructGui(): MagicCombatGuiBase Description: Override this function to return a new GUI object. Example: "return new MyGui()" ``` -------------------------------- ### Kotlin API: smoothReturnNormalizeRange Function Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-anim/smooth-return-normalize-range.html API documentation for the `smoothReturnNormalizeRange` function, which translates a float value from a specified (start, end) range into a smooth 'back-and-forth' value in a (0,1) range. The function returns 0 at the start and end points of the input range, and 1 at the midpoint, providing ease-in and ease-out effects. ```APIDOC Function: smoothReturnNormalizeRange Signature: open fun smoothReturnNormalizeRange(x: Float, start: Float, end: Float): Float Description: Translates a value in a (start,end) range into a "back-and-forth" value in a (0,1) range with smooth ease in and ease out. Parameters: x: Float - Clamped from start to end start: Float - Range minimal value end: Float - Range maximal value Returns: Float - Smooth "back-and-forth" float value equals to 0 at start and end, and 1 at the mid-point between them ``` -------------------------------- ### org.magiclib.combatgui Package API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.combatgui/index.html This section provides API documentation for the org.magiclib.combatgui package, which contains Kotlin classes essential for creating and managing in-game combat GUIs. It details the purpose, constructors, and properties of key components. ```APIDOC Package: org.magiclib.combatgui Types: MagicCombatGuiBase: Description: The base class you need to extend/inherit from to create a GUI. Definition: open class MagicCombatGuiBase constructor(guiLayout: MagicCombatGuiLayout = createDefaultMagicCombatGuiLayout()) Parameters: guiLayout: MagicCombatGuiLayout - The layout configuration for the GUI. Defaults to createDefaultMagicCombatGuiLayout(). MagicCombatGuiLayout: Description: Data class describing the layout, i.e. positions/spacings/color etc. of your GUI. Definition: data class MagicCombatGuiLayout(val xAnchorRel: Float, val yAnchorRel: Float, val buttonWidthPx: Float, val buttonHeightPx: Float, val a: Float, val color: Color, val paddingPx: Float, val xTooltipRel: Float, val yTooltipRel: Float, val textSpacingBufferPx: Float, val fontPath: String, val xMessageRel: Float, val yMessageRel: Float) Properties: xAnchorRel: Float yAnchorRel: Float buttonWidthPx: Float buttonHeightPx: Float a: Float color: java.awt.Color paddingPx: Float xTooltipRel: Float yTooltipRel: Float textSpacingBufferPx: Float fontPath: String xMessageRel: Float yMessageRel: Float MagicCombatRenderShapes: Description: Utility object for rendering shapes within the combat GUI. Definition: object MagicCombatRenderShapes SampleMagicCombatGuiLauncher: Description: Class that, when added to engine via e.g. `addPlugin`, will open/close GUI when specified hotkey is pressed. Extend this class by overriding constructGui to construct a GuiObject that extends MagicCombatGuiBase. This class is mainly intended as an example or to quickly get started. In the long term, you probably want to implement your own GUI launching logic in order to be able to customize things. Definition: abstract class SampleMagicCombatGuiLauncher(hotkey: Char) Parameters: hotkey: Char - The hotkey to trigger GUI open/close. Methods: constructGui(): MagicCombatGuiBase - Override this method to construct a GuiObject that extends MagicCombatGuiBase. ``` -------------------------------- ### BaseUIPanelPlugin Class API Reference (Kotlin) Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty.ui/-base-u-i-panel-plugin/index.html Comprehensive API documentation for the `BaseUIPanelPlugin` class, an open class in the `org.magiclib.bounty.ui` package. It details its inheritance hierarchy, constructor, public functions, and properties, providing a complete overview of its interface for developers. ```APIDOC BaseUIPanelPlugin (Kotlin) Class: open class BaseUIPanelPlugin Package: org.magiclib.bounty.ui Inheritors: - BountySpacerPanelPlugin - InteractiveUIPanelPlugin - ListItemUIPanelPlugin Constructors: - BaseUIPanelPlugin() Functions: - advance(amount: Float) - buttonPressed(buttonId: Any?) - isHovered(events: List): Boolean - positionChanged(position: ) - processInput(events: List) - render(alphaMult: Float) - renderBelow(alphaMult: Float) - setBGColor(red: Int = bgColor.red, green: Int = bgColor.green, blue: Int = bgColor.blue, alpha: Int = bgColor.alpha) Properties: - bgColor: Color - iconSize: Float - panelHeight: Float - panelWidth: Float - pos: - renderBackground: Boolean ``` -------------------------------- ### Get PID Controller Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the PID controller. ```APIDOC open fun getPIDController(): NonExistentClass ``` -------------------------------- ### MagicSubsystemsCombatPlugin Class API Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems/-magic-subsystems-combat-plugin/-magic-subsystems-combat-plugin.html API documentation for the MagicSubsystemsCombatPlugin class, detailing its constructor. ```APIDOC MagicSubsystemsCombatPlugin: constructor() ``` -------------------------------- ### Get Display Text Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the display text. ```APIDOC open fun getDisplayText(): String ``` -------------------------------- ### Get Max Deployed Drones Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html How many drones can be deployed at once. ```APIDOC open fun getMaxDeployedDrones(): Int ``` -------------------------------- ### ToggledDriveSubsystem Class API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-toggled-drive-subsystem/index.html API documentation for the `ToggledDriveSubsystem` class, detailing its constructor and various public methods. This class is part of the `org.magiclib.subsystems.examples` package and is designed for JVM environments. ```APIDOC open class ToggledDriveSubsystem Constructors: ToggledDriveSubsystem(ship: ShipAPI) Functions: advance(amount: Float, isPaused: Boolean) getBaseActiveDuration(): Float getBaseCooldownDuration(): Float getBaseOutDuration(): Float getDisplayText(): String isToggle(): Boolean onActivate() onFinished() shouldActivateAI(amount: Float): Boolean ``` -------------------------------- ### Get Max Charges Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the maximum number of charges. ```APIDOC open fun getMaxCharges(): Int ``` -------------------------------- ### Kotlin: onApplicationLoaded Function API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.achievements.examples/-example-target-list-achievement/on-application-loaded.html API documentation for the `onApplicationLoaded` function, an open function within the `org.magiclib.achievements.examples.ExampleTargetListAchievement` class. It accepts a boolean parameter `isComplete`. ```APIDOC org.magiclib.achievements.examples.ExampleTargetListAchievement.onApplicationLoaded: open fun onApplicationLoaded(isComplete: Boolean) isComplete: Boolean - A boolean value indicating the completion status. ``` -------------------------------- ### Get Drone Variant Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the drone variant string. ```APIDOC open fun getDroneVariant(): String ``` -------------------------------- ### ChargedDriveSubsystem Class API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-charged-drive-subsystem/index.html API documentation for the `ChargedDriveSubsystem` class, an open class within the `org.magiclib.subsystems.examples` package. It defines a constructor and several functions for managing a ship's charged drive subsystem, including activation, duration, cooldown, and charge management. ```APIDOC Class: ChargedDriveSubsystem Type: open class Package: org.magiclib.subsystems.examples Constructors: ChargedDriveSubsystem(ship: ShipAPI) Parameters: ship: ShipAPI - The ship associated with this subsystem. Functions: advance(amount: Float, isPaused: Boolean) Parameters: amount: Float - The amount of time passed. isPaused: Boolean - Indicates if the game is paused. getBaseActiveDuration(): Float getBaseChargeRechargeDuration(): Float getBaseCooldownDuration(): Float getBaseInDuration(): Float getBaseOutDuration(): Float getDisplayText(): String getMaxCharges(): Int onActivate() onFinished() shouldActivateAI(amount: Float): Boolean Parameters: amount: Float - The amount of time passed. ``` -------------------------------- ### Get Num HUD Bars Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the number of HUD bars. ```APIDOC open fun getNumHUDBars(): Int ``` -------------------------------- ### Initialize Component Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.drones/-magic-drone-subsystem/index.html Performs initialization routines for the component. Specific initialization steps are not detailed. ```Kotlin open fun init() ``` ```APIDOC init: Type: Function Signature: open fun init() Description: Performs initialization routines for the component. Parameters: [] Returns: Unit ``` -------------------------------- ### MagicDroneSubsystem API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-formation-switch-p-d-drone-subsystem/index.html Comprehensive API documentation for the `MagicDroneSubsystem` class, detailing its methods and properties for managing drone behavior, deployment, and resource consumption within the Starsector game. ```APIDOC Class: org.magiclib.subsystems.drones.MagicDroneSubsystem Methods: init(): Unit isHardFluxForDroneDeployment(): Boolean Description: Set flux cost on drone deployment to be hard flux. onActivate(): Unit shouldActivateAI(amount: Float): Boolean Parameters: amount: Float shouldSpawnDrone(): Boolean Description: Whether a drone should be spawned on the next deployment interval, if the amount of drones is below the limit and we have charges to spawn the drone. To force spawn a drone, set dronesToSpawn. spawnDrone(): NonExistentClass usesChargesOnActivate(): Boolean Properties: activeWings: Map droneCharges: Int droneCreationInterval: NonExistentClass droneDeployInterval: NonExistentClass dronesToSpawn: Int formation: DroneFormation ``` -------------------------------- ### Get Drone Dimension Wrapper Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the drone dimension wrapper. ```APIDOC open fun getDroneDimWrapper(): NonExistentClass ``` -------------------------------- ### BountyBoardIntelPlugin Class API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty.intel/-bounty-board-intel-plugin/index.html API documentation for the `BountyBoardIntelPlugin` class, detailing its constructor, nested `Companion` object, and various public functions for managing bounty board intelligence within the Starsector game context. ```APIDOC class BountyBoardIntelPlugin Constructors: BountyBoardIntelPlugin() Types: object Companion Functions: addBulletPoints(info: , mode: , isUpdate: Boolean, tc: Color, initPad: Float) advance(amount: Float) createLargeDescriptionImpl(panel: , width: Float, height: Float) getIcon(): String getIntelTags(map: ?): Set? getName(): String getSortString(): String hasLargeDescription(): Boolean hasSmallDescription(): Boolean layoutPanel(panel: , width: Float = lastWidth, height: Float = lastHeight) loadNotifiedBounties() notifyUserThatBountyIsAvailable(bountyInfo: BountyInfo) saveNotifiedBounties() ``` -------------------------------- ### Get Base Cooldown Duration Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the base duration for cooldown. ```APIDOC open fun getBaseCooldownDuration(): Float ``` -------------------------------- ### MagicBountyCoordinator: getMarketBountyBoardGenSeed Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty/-magic-bounty-coordinator/index.html Gets the seed used for generating bounties at the specified market. ```APIDOC open fun getMarketBountyBoardGenSeed(marketAPI: MarketAPI): Int marketAPI: MarketAPI Gets the seed used to generate bounties at the given market. ``` -------------------------------- ### InteractiveUIPanelPlugin Constructor Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty.ui/-interactive-u-i-panel-plugin/-interactive-u-i-panel-plugin.html Documentation for the default constructor of the `InteractiveUIPanelPlugin` class. This constructor initializes a new instance of the plugin. ```APIDOC InteractiveUIPanelPlugin: constructor() ``` -------------------------------- ### Get Max Drone Charges Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Maximum amount of stored drone charges. ```APIDOC open fun getMaxDroneCharges(): Int ``` -------------------------------- ### Kotlin Class: ExampleTargetListAchievement API Reference Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.achievements.examples/-example-target-list-achievement/index.html API documentation for the `ExampleTargetListAchievement` Kotlin class, detailing its constructor and public methods. This class likely handles achievement logic within a combat context and application loading events. ```APIDOC ExampleTargetListAchievement Class: Type: open class Constructors: ExampleTargetListAchievement(): Description: Default constructor for the ExampleTargetListAchievement class. Functions: advanceInCombat(amount: Float, events: List, isSimulation: Boolean): Description: Advances the achievement state during combat. Parameters: amount: Float - The amount of time or progress to advance. events: List - A list of input events. isSimulation: Boolean - Indicates if the current context is a simulation. Return Type: void onApplicationLoaded(isComplete: Boolean): Description: Called when the application has finished loading. Parameters: isComplete: Boolean - Indicates if the application loading process is complete. Return Type: void ``` -------------------------------- ### Get Drone Creation Time Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Time to store a single drone charge. ```APIDOC open fun getDroneCreationTime(): Float ``` -------------------------------- ### ChargedDriveSubsystem Constructor API Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-charged-drive-subsystem/-charged-drive-subsystem.html API documentation for the `ChargedDriveSubsystem` constructor, which initializes the subsystem with a `ShipAPI` object. This is likely a Kotlin or Java constructor as indicated by the 'JVM' context. ```APIDOC ChargedDriveSubsystem: constructor(ship: ShipAPI) ``` -------------------------------- ### MagicBountyCoordinator Property: postScalingCreditRewardMultiplier Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty/-magic-bounty-coordinator/index.html Gets or sets the multiplier applied to credit rewards after scaling. ```APIDOC open var postScalingCreditRewardMultiplier: Float ``` -------------------------------- ### APIDOC: MagicTrailTracker Class Constructor Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.util/-magic-trail-tracker/-magic-trail-tracker.html API documentation for the `MagicTrailTracker` class, part of the `org.magiclib.util` package. This entry details the default constructor available for instantiating the `MagicTrailTracker`. ```APIDOC MagicTrailTracker: constructor() ``` -------------------------------- ### Get Tooltip Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.achievements/-magic-achievement/index.html Retrieves the tooltip text for the achievement. ```APIDOC open fun getTooltip(): String ``` -------------------------------- ### BountyListPanelPlugin Constructor API Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.bounty.intel/-bounty-list-panel-plugin/-bounty-list-panel-plugin.html API documentation for the constructor of the `BountyListPanelPlugin` class. It defines the required parameter for initializing an instance of the plugin. ```APIDOC BountyListPanelPlugin constructor(parentPanel: ) ``` -------------------------------- ### MagicLib Subsystems Package API Reference (Kotlin/JVM) Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems/index.html API documentation for the `org.magiclib.subsystems` package, which provides core functionalities for integrating and managing ship subsystems within the Starsector game. It details various classes, abstract classes, objects, functions, and properties available for subsystem development. ```APIDOC Package: org.magiclib.subsystems Types: open class CombatUI abstract class MagicShipSystemSubsystem Description: Calls relevant hooks in a ship system. abstract class MagicSubsystem class MagicSubsystemsCombatPlugin object MagicSubsystemsManager open class ShipAIData class SubsystemSettingsListener : LunaWrapperSettingsListener Functions: fun .addSubsystem(subsystem: ): Description: Add a subsystem to a ship. fun .advanceAndCheckElapsed(amount: Float): Boolean fun .removeSubsystem(subsystemClass: Class>): Description: Remove a subsystem. Properties: val .subsystemsCopy: List<>? Description: Gets a shallow copy of the list of subsystems. ``` -------------------------------- ### Get Flux Cost Flat On Drone Deployment Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Flux cost on drone deployment. ```APIDOC open fun getFluxCostFlatOnDroneDeployment(): Float ``` -------------------------------- ### Get Base Charge Recharge Duration Source: https://github.com/magiclibstarsector/magiclib/blob/master/docs/root/org.magiclib.subsystems.examples/-separate-charge-p-d-drone-subsystem/index.html Retrieves the base duration for charge recharge. ```APIDOC open fun getBaseChargeRechargeDuration(): Float ```