001package com.fs.starfarer.api.combat; 002 003import org.lwjgl.util.vector.Vector2f; 004 005import com.fs.starfarer.api.plugins.ShipSystemStatsScript; 006 007public interface ShipSystemAPI { 008 009 public static enum SystemState { 010 IDLE, 011 IN, 012 ACTIVE, 013 OUT, 014 COOLDOWN, 015 } 016 017 String getId(); 018 019 float getCooldownRemaining(); 020 boolean isOutOfAmmo(); 021 /** 022 * @return true if the system is charging up, down, or is on. 023 */ 024 boolean isActive(); 025 026 boolean isCoolingDown(); 027 028 int getAmmo(); 029 030 float getFluxPerUse(); 031 float getFluxPerSecond(); 032 033 String getDisplayName(); 034 035 /** 036 * @return true if the system is charging up or is on. 037 */ 038 boolean isOn(); 039 040 boolean isChargeup(); 041 boolean isChargedown(); 042 boolean isStateActive(); 043 044 int getMaxAmmo(); 045 046 void setAmmo(int ammo); 047 048 float getEffectLevel(); 049 float getCooldown(); 050 void setFluxPerUse(float fluxPerUse); 051 void setFluxPerSecond(float fluxPerSecond); 052 053 SystemState getState(); 054 055 float getChargeUpDur(); 056 float getChargeDownDur(); 057 float getChargeActiveDur(); 058 059 ShipSystemSpecAPI getSpecAPI(); 060 061 void deactivate(); 062 063 void setCooldownRemaining(float remaining); 064 void setCooldown(float cooldown); 065 066 Vector2f getTargetLoc(); 067 068 void forceState(SystemState state, float progress); 069 070 float getAmmoPerSecond(); 071 072 float getAmmoReloadProgress(); 073 void setAmmoReloadProgress(float progress); 074 075 boolean canBeActivated(); 076 077 ShipSystemStatsScript getScript(); 078}