Package com.fs.starfarer.api.util
Class Misc
java.lang.Object
com.fs.starfarer.api.util.Misc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static interface
static interface
static enum
static class
static enum
static class
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static float
static boolean
protected static Boolean
static String
static final String
static final String
static String
static String
static float
static float
static String
static Color
static Color
static Color
static Color
static float
protected static DecimalFormat
static float
static float
static float
static String
static float
static float
static final String
static final String
static String
static String
static int
static float
static int
static String
static final String
static float
static Color
static Color
static Color
static Color
static Color
static Color
static Color
static MusicPlayerPlugin
static int
static final int
static final int
static float
static String
static float
static Random
static String
static float
static String
static float
static String
Name of "story points".static String
static String
static final org.lwjgl.util.vector.Vector2f
static Color
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomCampaignEntityAPI
addCargoPods
(LocationAPI where, org.lwjgl.util.vector.Vector2f loc) static void
addCreditsMessage
(String format, int credits) static SectorEntityToken
addDebrisField
(LocationAPI loc, DebrisFieldTerrainPlugin.DebrisFieldParams params, Random random) static void
addDefeatTrigger
(CampaignFleetAPI fleet, String trigger) static LabelAPI
addDesignTypePara
(TooltipMakerAPI tooltip, String design, float pad) static ParticleControllerAPI[]
addGlowyParticle
(LocationAPI location, org.lwjgl.util.vector.Vector2f loc, org.lwjgl.util.vector.Vector2f vel, float size, float rampUp, float dur, Color color) static void
addHitGlow
(LocationAPI location, org.lwjgl.util.vector.Vector2f loc, org.lwjgl.util.vector.Vector2f vel, float size, float dur, Color color) static void
addHitGlow
(LocationAPI location, org.lwjgl.util.vector.Vector2f loc, org.lwjgl.util.vector.Vector2f vel, float size, Color color) static SectorEntityToken
addNebulaFromPNG
(String image, float centerX, float centerY, LocationAPI location, String category, String key, int tilesWide, int tilesHigh, StarAge age) static SectorEntityToken
addNebulaFromPNG
(String image, float centerX, float centerY, LocationAPI location, String category, String key, int tilesWide, int tilesHigh, String terrainType, StarAge age) static boolean
addStorageInfo
(TooltipMakerAPI tooltip, Color color, Color dark, MarketAPI market, boolean includeLocalResources, boolean addSectionIfEmpty) Returns true if it added anything to the tooltip.static void
addSurveyDataFor
(PlanetAPI planet, TextPanelAPI text) static SectorEntityToken
addWarningBeacon
(SectorEntityToken center, BaseThemeGenerator.OrbitGap gap, String beaconTag) static void
adjustRep
(float repChangeFaction, RepLevel limit, String factionId, float repChangePerson, RepLevel personLimit, PersonAPI person, TextPanelAPI text) adjustRep
(PersonAPI person, float delta, RepLevel limit, TextPanelAPI text) adjustRep
(PersonAPI person, float delta, RepLevel limit, TextPanelAPI text, boolean addMessageOnNoChange, boolean withMessage) adjustRep
(PersonAPI person, float delta, TextPanelAPI text) adjustRep
(String factionId, float delta, RepLevel limit, TextPanelAPI text) adjustRep
(String factionId, float delta, RepLevel limit, TextPanelAPI text, boolean addMessageOnNoChange, boolean withMessage) adjustRep
(String factionId, float delta, TextPanelAPI text) static void
affectAvailabilityWithinReason
(CommodityOnMarketAPI com, int quantity) static void
applyDamage
(FleetMemberAPI member, Random random, float damageMult, boolean withCRDamage, String crDamageId, String crDamageReason, boolean withMessage, TextPanelAPI textPanel, String messageText) static void
applyDamage
(FleetMemberAPI member, Random random, Misc.FleetMemberDamageLevel level, boolean withCRDamage, String crDamageId, String crDamageReason, boolean withMessage, TextPanelAPI textPanel, String messageText) static float
approach
(float curr, float dest, float minSpeed, float diffSpeedMult, float amount) static boolean
areSegmentsCoincident
(org.lwjgl.util.vector.Vector2f a1, org.lwjgl.util.vector.Vector2f a2, org.lwjgl.util.vector.Vector2f b1, org.lwjgl.util.vector.Vector2f b2) static org.lwjgl.util.vector.Vector2f
bezier
(org.lwjgl.util.vector.Vector2f p0, org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, float t) static org.lwjgl.util.vector.Vector2f
bezierCubic
(org.lwjgl.util.vector.Vector2f p0, org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3, float t) static boolean
static boolean
canPlanetTypeRollCondition
(PlanetSpecAPI spec, String id) static boolean
static boolean
static void
cleanBuffer
(Buffer toBeDestroyed) static void
cleanUpMissionMemory
(MemoryAPI memory, String prefix) static void
clearAreaAroundPlayer
(float minDist) static void
clearAsteroidSource
(SectorEntityToken asteroid) static void
static void
static void
clearTarget
(CampaignFleetAPI fleet, boolean forgetTransponder) static org.lwjgl.util.vector.Vector2f
closestPointOnLineToPoint
(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3) static org.lwjgl.util.vector.Vector2f
closestPointOnSegmentToPoint
(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3) static String
colorsToString
(List<Color> colors) static float
computeAngleRadius
(float angle, float range) static float
computeAngleSpan
(float radius, float range) static void
static int
computeEconUnitChangeFromTradeModChange
(CommodityOnMarketAPI com, int quantity) static int
computeShutdownRefund
(MarketAPI market, Industry industry) static int
computeTotalShutdownRefund
(MarketAPI market) static float
countEnemyWeightInArc
(ShipAPI ship, float dir, float arc, float maxRange, boolean ignoreFightersAndModules) static float
countEnemyWeightInArcAroundLocation
(int owner, org.lwjgl.util.vector.Vector2f loc, float dir, float arc, float maxRange, ShipAPI ignore, boolean ignoreFightersAndModules, boolean awareOnly) static float
countEnemyWeightInArcAroundLocation
(ShipAPI ship, org.lwjgl.util.vector.Vector2f loc, float dir, float arc, float maxRange, ShipAPI ignore, boolean ignoreFightersAndModules) static IntervalUtil
static WeightedRandomPicker<String>
createStringPicker
(Object... params) static WeightedRandomPicker<String>
createStringPicker
(Random random, Object... params) static boolean
crossesAnySlipstream
(LocationAPI location, org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) static float
distanceFromLineToPoint
(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3) Shortest distance from line to a point.static boolean
static void
fadeAndExpire
(SectorEntityToken entity) static void
fadeAndExpire
(SectorEntityToken entity, float seconds) static void
fadeIn
(SectorEntityToken entity, float in) static void
fadeInOutAndExpire
(SectorEntityToken entity, float in, float dur, float out) static ShipAPI
findClosestShipEnemyOf
(ShipAPI ship, org.lwjgl.util.vector.Vector2f locFromForSorting, ShipAPI.HullSize smallestToNote, float maxRange, boolean considerShipRadius) static ShipAPI
findClosestShipEnemyOf
(ShipAPI ship, org.lwjgl.util.vector.Vector2f locFromForSorting, ShipAPI.HullSize smallestToNote, float maxRange, boolean considerShipRadius, Misc.FindShipFilter filter) static ShipAPI
findClosestShipTo
(ShipAPI ship, org.lwjgl.util.vector.Vector2f locFromForSorting, ShipAPI.HullSize smallestToNote, float maxRange, boolean considerShipRadius, boolean allowHulks, Misc.FindShipFilter filter) static float
findKth
(float[] arr, int k) static List<CampaignFleetAPI>
findNearbyFleets
(SectorEntityToken from, float maxRange, Misc.FleetFilter filter) findNearbyLocalMarkets
(SectorEntityToken token, float maxDist, BaseEventPlugin.MarketFilter filter) static JumpPointAPI
static JumpPointAPI
static JumpPointAPI
static JumpPointAPI
findNearestJumpPointTo
(SectorEntityToken entity, boolean allowWormhole) static MarketAPI
findNearestLocalMarket
(SectorEntityToken token, float maxDist, BaseEventPlugin.MarketFilter filter) static MarketAPI
findNearestLocalMarketWithSameFaction
(SectorEntityToken token, float maxDist) static SectorEntityToken
findNearestPlanetTo
(SectorEntityToken entity, boolean requireGasGiant, boolean allowStars) static boolean
flagHasReason
(MemoryAPI memory, String flagKey, String reason) static void
static Color
static String
genEntityCatalogId
(int cycleOverride, int monthOverride, int dayOverride, Misc.CatalogEntryType type) static String
static String
genEntityCatalogId
(String firstChar, int cycleOverride, int monthOverride, int dayOverride, Misc.CatalogEntryType type) static void
generatePlanetConditions
(StarSystemAPI system, StarAge age) static void
generatePlanetConditions
(String systemName, StarAge age) static void
genFractalNoise
(Random random, float[][] noise, int x1, int y1, int x2, int y2, int iter, float spikes) static long
How Java generates a seed for a new java.util.Random() instance.static String
genUID()
static AbandonMarketPlugin
getAbandonMarketPlugin
(MarketAPI market) static float
getAbyssalDepth
(SectorEntityToken entity) static float
getAbyssalDepth
(SectorEntityToken entity, boolean uncapped) static float
getAbyssalDepth
(org.lwjgl.util.vector.Vector2f loc) static float
getAbyssalDepth
(org.lwjgl.util.vector.Vector2f loc, boolean uncapped) static float
static float
getAbyssalDepthOfPlayer
(boolean uncapped) static List<StarSystemAPI>
static float
getAdjustedBaseRange
(float base, ShipAPI ship, WeaponAPI weapon) static float
getAdjustedFP
(float fp, MarketAPI market) static float
getAdjustedStrength
(float fp, MarketAPI market) static float
getAdminSalary
(PersonAPI admin) static String
getAgoStringForTimestamp
(long timestamp) static AICoreAdminPlugin
getAICoreAdminPlugin
(String commodityId) static AICoreOfficerPlugin
getAICoreOfficerPlugin
(String commodityId) static String
getAndJoined
(String... strings) static String
getAndJoined
(List<String> strings) static float
getAngleDiff
(float from, float to) static float
getAngleInDegrees
(org.lwjgl.util.vector.Vector2f v) static float
getAngleInDegrees
(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) static float
getAngleInDegreesStrict
(org.lwjgl.util.vector.Vector2f v) static float
getAngleInDegreesStrict
(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) static String
getAOrAnFor
(String word) Probably wrong sometimes...static AsteroidSource
getAsteroidSource
(SectorEntityToken asteroid) static String
getAtLeastStringForDays
(int days) static float
static Color
static Color
static float
static MarketAPI
getBiggestMarketInLocation
(LocationAPI location) static float
static float[]
getBonusXPForScuttling
(FleetMemberAPI member) static Color
static float
getBuildInBonusXP
(HullModSpecAPI mod, ShipAPI.HullSize size) static float
getBurnLevelForSpeed
(float speed) static float
static Color
static float
static FactionAPI
getClaimingFaction
(SectorEntityToken planet) static float
getClosestTurnDirection
(float facing, float desired) static float
getClosestTurnDirection
(float facing, org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) static float
getClosestTurnDirection
(org.lwjgl.util.vector.Vector2f one, org.lwjgl.util.vector.Vector2f two) static float
getClosingSpeed
(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) static Color
static float
getColorDist
(Color one, Color two) static FactionAPI
static String
static FactionCommissionIntel
static org.lwjgl.util.vector.Vector2f
static org.lwjgl.util.vector.Vector2f
static org.lwjgl.util.vector.Vector2f
static StarCoronaTerrainPlugin
getCoronaFor
(PlanetAPI star) static Industry
static int
getCurrSpecialMods
(ShipVariantAPI variant) static List<HullModSpecAPI>
getCurrSpecialModsList
(ShipVariantAPI variant) static int
getDangerLevel
(CampaignFleetAPI fleet) static Color
static Color
static float
getDays
(float amount) static float
getDaysSinceLastRaided
(MarketAPI market) getDefeatTriggers
(CampaignFleetAPI fleet, boolean createIfNecessary) static Color
getDesignTypeColor
(String designType) static Color
getDesignTypeColorDim
(String designType) static float
static String
getDetailedAgoString
(long timestamp) static String
getDGSCredits
(float num) DGS = digit group separator, i.e.: 1000000 -> 1,000,000static String
getDHullId
(ShipHullSpecAPI spec) static org.lwjgl.util.vector.Vector2f
getDiff
(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) static float
getDistance
(float x1, float y1, float x2, float y2) static float
getDistance
(SectorEntityToken from, SectorEntityToken to) static float
getDistance
(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) static float
getDistance
(org.lwjgl.util.vector.Vector3f v1, org.lwjgl.util.vector.Vector3f v2) static float
getDistanceFromArc
(float direction, float arc, float angle) static float
getDistanceLY
(SectorEntityToken from, SectorEntityToken to) static float
getDistanceLY
(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) static float
getDistanceSq
(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) static float
static float
getDistanceToPlayerLY
(org.lwjgl.util.vector.Vector2f locInHyper) static JumpPointAPI
getDistressJumpPoint
(StarSystemAPI system) static float
static Color
static int
getEstimatedOrbitIndex
(PlanetAPI planet) getFactionMarkets
(FactionAPI faction) getFactionMarkets
(FactionAPI faction, String econGroup) getFactionMarkets
(String factionId) static float
static List<CampaignFleetAPI>
getFleetsInOrNearSystem
(StarSystemAPI system) static String
getFleetType
(CampaignFleetAPI fleet) static float
getFleetwideTotalMod
(CampaignFleetAPI fleet, String dynamicMemberStatId, float base) static float
getFleetwideTotalMod
(CampaignFleetAPI fleet, String dynamicMemberStatId, float base, ShipAPI ship) static float
getFleetwideTotalStat
(CampaignFleetAPI fleet, String dynamicMemberStatId) static float[]
getFloatArray
(String key) static DecimalFormat
static int
getFPForVariantId
(String variantId) static float
getFractionalBurnLevelForSpeed
(float speed) static float
getFringeFactor
(org.lwjgl.util.vector.Vector2f loc) static float
getFuelPerDay
(CampaignFleetAPI fleet, float burnLevel) static float
getFuelPerDayAtSpeed
(CampaignFleetAPI fleet, float speed) static float
static int
static Color
static Color
static Color
static float
getHitGlowSize
(float baseSize, float baseDamage, DamageType type, float sd, float ad, float hd, float ed) static float
getHitGlowSize
(float baseSize, float baseDamage, ApplyDamageResultAPI result) static String
getHullIdForVariantId
(String variantId) static String
static CampaignTerrainAPI
static HyperspaceTerrainPlugin
static ImmigrationPlugin
getImmigrationPlugin
(MarketAPI market) static float
getIncapacitatedTime
(ShipAPI ship) static FleetInflater
getInflater
(CampaignFleetAPI fleet, Object params) static org.lwjgl.util.vector.Vector2f
static org.lwjgl.util.vector.Vector2f
getInterceptPoint
(SectorEntityToken from, SectorEntityToken to, float maxSpeedFrom) static org.lwjgl.util.vector.Vector2f
static String
static String
static JumpPointAPI
getJumpPointTo
(PlanetAPI star) static String
static SubmarketPlugin
getLocalResources
(MarketAPI market) static CargoAPI
getLocalResourcesCargo
(MarketAPI market) static float
getLYPerDayAtBurn
(CampaignFleetAPI fleet, float burnLevel) static float
getLYPerDayAtSpeed
(CampaignFleetAPI fleet, float speed) static MagneticFieldTerrainPlugin
getMagneticFieldFor
(PlanetAPI planet) getMarketsInLocation
(LocationAPI location) getMarketsInLocation
(LocationAPI location, String factionId) static float
getMarketSizeProgress
(MarketAPI market) static int
getMaxIndustries
(MarketAPI market) static int
getMaxMarketSize
(MarketAPI market) static int
getMaxOfficers
(CampaignFleetAPI fleet) static int
getMaxPermanentMods
(ShipAPI ship) static int
getMaxPermanentMods
(FleetMemberAPI member, MutableCharacterStatsAPI stats) static float
getMemberStrength
(FleetMemberAPI member) static float
getMemberStrength
(FleetMemberAPI member, boolean withHull, boolean withQuality, boolean withCaptain) static float
getMercDaysSinceHired
(PersonAPI person) static List<OfficerDataAPI>
getMercs
(CampaignFleetAPI fleet) static MarketAPI.SurveyLevel
getMinSystemSurveyLevel
(StarSystemAPI system) static Color
static HullModSpecAPI
static MusicPlayerPlugin
static long
getNameBasedSeed
(SectorEntityToken entity) static List<CampaignFleetAPI>
getNearbyFleets
(SectorEntityToken from, float maxDist) getNearbyMarkets
(org.lwjgl.util.vector.Vector2f locInHyper, float distLY) static StarSystemAPI
static StarSystemAPI
getNearbyStarSystem
(SectorEntityToken token, float maxRangeLY) static List<StarSystemAPI>
getNearbyStarSystems
(SectorEntityToken token, float maxRangeLY) static StarSystemAPI
static Pair<SectorEntityToken,
CampaignFleetAPI> pair.one can be null if a stand-alone, non-market station is being returned in pair.two.static Color
static int
getNumEliteSkills
(PersonAPI person) static int
getNumHostileMarkets
(FactionAPI faction, SectorEntityToken from, float maxDist) static int
getNumImprovedIndustries
(MarketAPI market) static int
getNumIndustries
(MarketAPI market) static int
static int
getNumStableLocations
(StarSystemAPI system) static float
getOfficerSalary
(PersonAPI officer) static float
getOfficerSalary
(PersonAPI officer, boolean mercenary) static int
getOPCost
(HullModSpecAPI mod, ShipAPI.HullSize size) static float
static org.lwjgl.util.vector.Vector2f
getPerp
(org.lwjgl.util.vector.Vector2f v) static String
getPersonalityName
(PersonAPI person) static String
getPlanetSurveyClass
(PlanetAPI planet) getPlayerMarkets
(boolean includeNonPlayerFaction) static List<StarSystemAPI>
getPlayerSystems
(boolean includeNonPlayerFaction) static org.lwjgl.util.vector.Vector2f
getPointAtRadius
(org.lwjgl.util.vector.Vector2f from, float r) static org.lwjgl.util.vector.Vector2f
getPointAtRadius
(org.lwjgl.util.vector.Vector2f from, float r, Random random) static org.lwjgl.util.vector.Vector2f
getPointWithinRadius
(org.lwjgl.util.vector.Vector2f from, float r) static org.lwjgl.util.vector.Vector2f
getPointWithinRadius
(org.lwjgl.util.vector.Vector2f from, float r, Random random) static org.lwjgl.util.vector.Vector2f
getPointWithinRadiusUniform
(org.lwjgl.util.vector.Vector2f from, float minR, float maxR, Random random) static org.lwjgl.util.vector.Vector2f
getPointWithinRadiusUniform
(org.lwjgl.util.vector.Vector2f from, float r, Random random) static Color
static Object
static float
getProbabilityMult
(float desired, float current, float deviationMult) static float
static float
static PulsarBeamTerrainPlugin
getPulsarFor
(PlanetAPI star) static PlanetAPI
getPulsarInSystem
(StarSystemAPI system) static Random
getRandom
(long seed, int level) static Color
getRelColor
(float rel) static float
getRounded
(float in) static String
getRoundedValue
(float value) static float
getRoundedValueFloat
(float value) static String
getRoundedValueMaxOneAfterDecimal
(float value) static String
getRoundedValueOneAfterDecimalIfNotWhole
(float value) static MarketConditionSpecAPI
getRuinsSpec
(MarketAPI market) static String
getRuinsType
(MarketAPI market) Assumes the market *does* have ruins.static long
getSalvageSeed
(SectorEntityToken entity) static long
getSalvageSeed
(SectorEntityToken entity, boolean nonRandom) static Object
getSalvageSpecial
(SectorEntityToken entity) static float
static FactionAPI.ShipPickMode
getShipPickMode
(MarketAPI market) static FactionAPI.ShipPickMode
getShipPickMode
(MarketAPI market, String factionId) static int
getShippingCapacity
(MarketAPI market, boolean inFaction) static float
getShipQuality
(MarketAPI market) static float
getShipQuality
(MarketAPI market, String factionId) static float
getShipWeight
(ShipAPI ship) static float
getShipWeight
(ShipAPI ship, boolean adjustForNonCombat) static SimulatorPlugin
static float
getSizeNum
(ShipAPI.HullSize size) static float
static List<FleetMemberAPI>
static SectorEntityToken
getSourceEntity
(CampaignFleetAPI fleet) static MarketAPI
getSourceMarket
(CampaignFleetAPI fleet) static Industry
getSpaceport
(MarketAPI market) static float
getSpawnChanceMult
(org.lwjgl.util.vector.Vector2f locInHyper) static float
getSpawnFPMult
(CampaignFleetAPI fleet) static float
getSpeedForBurnLevel
(float burnLevel) static StabilizeMarketPlugin
getStabilizeMarketPlugin
(MarketAPI market) static String
static StarSystemAPI
static CampaignFleetAPI
getStationBaseFleet
(MarketAPI market) static CampaignFleetAPI
getStationBaseFleet
(SectorEntityToken station) static SectorEntityToken
getStationEntity
(MarketAPI market, CampaignFleetAPI fleet) static CampaignFleetAPI
getStationFleet
(MarketAPI market) static CampaignFleetAPI
getStationFleet
(SectorEntityToken station) static Industry
getStationIndustry
(MarketAPI market) static MarketAPI
getStationMarket
(CampaignFleetAPI station) static SubmarketPlugin
getStorage
(MarketAPI market) static CargoAPI
getStorageCargo
(MarketAPI market) static float
getStorageCargoValue
(MarketAPI market) static int
getStorageCostPerMonth
(MarketAPI market) static float
static float
getStorageShipValue
(MarketAPI market) static float
getStorageTotalValue
(MarketAPI market) static Color
static Color
static Color
static Color
static String
getStrengthDesc
(float strAdjustedFP) static String
getStringForDays
(int days) static String
getStringWithTokenReplacement
(String format, SectorEntityToken entity, Map<String, MemoryAPI> memoryMap) static String
getSurveyLevelString
(MarketAPI.SurveyLevel level, boolean withBrackets) static org.lwjgl.util.vector.Vector2f
static List<StarSystemAPI>
getSystemsInRange
(SectorEntityToken from, Set<StarSystemAPI> exclude, boolean nonEmpty, float maxRange) static List<StarSystemAPI>
getSystemsWithPlayerColonies
(boolean includeNonPlayerFaction) static float
getTargetingRadius
(org.lwjgl.util.vector.Vector2f from, CombatEntityAPI target, boolean considerShield) static Color
static String
getTokenReplaced
(String in, SectorEntityToken entity) static Color
getTradeMode
(MemoryAPI memory) static float
static org.lwjgl.util.vector.Vector2f
getUnitVector
(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) static org.lwjgl.util.vector.Vector2f
getUnitVectorAtDegreeAngle
(float degrees) static int
static org.lwjgl.util.vector.Vector2f
static org.lwjgl.util.vector.Vector2f
static org.lwjgl.util.vector.Vector2f
static org.lwjgl.util.vector.Vector3f
getVector3f
(org.json.JSONObject json, String arrayKey) static List<CampaignFleetAPI>
getVisibleFleets
(SectorEntityToken from, boolean includeSensorContacts) static int
static int
Reminder: call this on startup to see what the max is.static int
static int
static SpriteAPI
getWeaponSkin
(ShipAPI ship, String weaponId, Misc.WeaponSkinType type) static SpriteAPI
getWeaponSkin
(String cat, String weaponId, ShipAPI ship, Misc.WeaponSkinType type) static String
getWithDGS
(float num) DGS = digit group separator, i.e.: 1000000 -> 1,000,000static void
giveStandardReturnAssignments
(CampaignFleetAPI fleet, SectorEntityToken where, String text, boolean withClear) static void
static void
giveStandardReturnToSourceAssignments
(CampaignFleetAPI fleet, boolean withClear) static boolean
hasAnySurveyDataFor
(StarSystemAPI system) static boolean
hasAtLeastOneOfTags
(Collection<String> tags, String... other) static boolean
hasFarmland
(MarketAPI market) static boolean
hasHeavyIndustry
(MarketAPI market) static boolean
hasOrbitalStation
(MarketAPI market) static boolean
hasPulsar
(StarSystemAPI system) static boolean
static boolean
hasSModdableBuiltIns
(ShipVariantAPI variant) static boolean
hasUnexploredRuins
(MarketAPI market) static void
increaseMarketHostileTimeout
(MarketAPI market, float days) static void
static void
initConditionMarket
(PlanetAPI planet) static void
initEconomyMarket
(PlanetAPI planet) static float[][]
static float
interpolate
(float from, float to, float progress) static Color
interpolateColor
(Color from, Color to, float progress) static org.lwjgl.util.vector.Vector2f
interpolateVector
(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to, float progress) static void
interruptAbilitiesWithTag
(CampaignFleetAPI fleet, String tag) static org.lwjgl.util.vector.Vector2f
intersectLines
(org.lwjgl.util.vector.Vector2f a1, org.lwjgl.util.vector.Vector2f a2, org.lwjgl.util.vector.Vector2f b1, org.lwjgl.util.vector.Vector2f b2) static org.lwjgl.util.vector.Vector2f
intersectSegmentAndCircle
(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3, float r) Going from p1 to p2.static org.lwjgl.util.vector.Vector2f
intersectSegments
(org.lwjgl.util.vector.Vector2f a1, org.lwjgl.util.vector.Vector2f a2, org.lwjgl.util.vector.Vector2f b1, org.lwjgl.util.vector.Vector2f b2) static boolean
isActiveModule
(ShipAPI ship) static boolean
isActiveModule
(ShipVariantAPI variant) static boolean
isAutomated
(MutableShipStatsAPI stats) static boolean
isAutomated
(ShipAPI ship) static boolean
isAutomated
(ShipVariantAPI variant) static boolean
isAutomated
(FleetMemberAPI member) static boolean
static boolean
isBetween
(float one, float two, float check) Angles.static boolean
isBusy
(CampaignFleetAPI fleet) static boolean
isDecentralized
(FactionAPI faction) static boolean
isEasy()
static boolean
static boolean
static boolean
static boolean
isFleetMadeHostileToFaction
(CampaignFleetAPI fleet, FactionAPI faction) static boolean
isFleetMadeHostileToFaction
(CampaignFleetAPI fleet, String factionId) static boolean
static boolean
isFringe
(SectorEntityToken entity) static boolean
isFringe
(StarSystemAPI system) static boolean
isFringe
(org.lwjgl.util.vector.Vector2f loc) static boolean
isHiddenBase
(MarketAPI market) static boolean
isHyperspaceAnchor
(SectorEntityToken entity) static boolean
isImportantForReason
(MemoryAPI memory, String reason) static boolean
isInAbyss
(SectorEntityToken entity) static boolean
isInAbyss
(org.lwjgl.util.vector.Vector2f loc) static boolean
isInArc
(float direction, float arc, float test) static boolean
isInArc
(float direction, float arc, org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) static boolean
isInsideBlackHole
(CampaignFleetAPI fleet, boolean includeEventHorizon) static boolean
isInsideSlipstream
(SectorEntityToken entity) static boolean
isInsideSlipstream
(org.lwjgl.util.vector.Vector2f loc, float radius) static boolean
isInsideSlipstream
(org.lwjgl.util.vector.Vector2f loc, float radius, LocationAPI location) static boolean
isInsignificant
(CampaignFleetAPI fleet) Whether it prevents salvage, surveying, etc.static boolean
isKeepOnShipRecovery
(PersonAPI person) static boolean
isMentored
(PersonAPI person) static boolean
isMercenary
(PersonAPI person) static boolean
isMilitary
(MarketAPI market) static boolean
isNear
(SectorEntityToken entity, org.lwjgl.util.vector.Vector2f hyperLoc) static boolean
isNormal()
static boolean
isOpenlyPopulated
(StarSystemAPI system) static boolean
isOutsideSector
(org.lwjgl.util.vector.Vector2f loc) static boolean
isPatrol
(CampaignFleetAPI fleet) static boolean
static boolean
isPirate
(CampaignFleetAPI fleet) static boolean
isPirateFaction
(FactionAPI faction) In vanilla, pirates and Luddic Path.static boolean
static boolean
static boolean
static boolean
isPointInBounds
(org.lwjgl.util.vector.Vector2f p1, List<org.lwjgl.util.vector.Vector2f> bounds) static boolean
isRaider
(CampaignFleetAPI fleet) static boolean
isReversePolarity
(SectorEntityToken entity) static boolean
isSameCargo
(CargoAPI baseOne, CargoAPI baseTwo) static boolean
isScavenger
(CampaignFleetAPI fleet) static boolean
isShipRecoverable
(FleetMemberAPI member, CampaignFleetAPI recoverer, boolean own, boolean useOfficerRecovery, float chanceMult) static boolean
isSlowMoving
(CampaignFleetAPI fleet) static boolean
isSmuggler
(CampaignFleetAPI fleet) static boolean
static boolean
isSpecialMod
(ShipVariantAPI variant, HullModSpecAPI spec) static boolean
isStationInSupportRange
(CampaignFleetAPI fleet, CampaignFleetAPI station) static boolean
isStoryCritical
(MarketAPI market) static boolean
isStoryCritical
(MemoryAPI memory) static boolean
isTrader
(CampaignFleetAPI fleet) static boolean
isUnboardable
(ShipHullSpecAPI hullSpec) static boolean
isUnboardable
(FleetMemberAPI member) static boolean
isUnremovable
(PersonAPI person) static boolean
isWarFleet
(CampaignFleetAPI fleet) static String
static float
logOfBase
(float base, float num) static void
makeHostile
(CampaignFleetAPI fleet) static void
static void
makeHostileToFaction
(CampaignFleetAPI fleet, String factionId, boolean hostile, float dur) static void
makeHostileToFaction
(CampaignFleetAPI fleet, String factionId, float dur) static void
static void
makeImportant
(MemoryAPI memory, String reason) static void
makeImportant
(MemoryAPI memory, String reason, float dur) static void
makeImportant
(SectorEntityToken entity, String reason) static void
makeImportant
(SectorEntityToken entity, String reason, float dur) static void
makeImportant
(PersonAPI person, String reason) static void
makeImportant
(PersonAPI person, String reason, float dur) static void
makeLowRepImpact
(CampaignFleetAPI fleet, String reason) static void
makeNonHostileToFaction
(CampaignFleetAPI fleet, String factionId, boolean nonHostile, float dur) static void
makeNonHostileToFaction
(CampaignFleetAPI fleet, String factionId, float dur) static void
makeNonStoryCritical
(MarketAPI market, String reason) static void
makeNonStoryCritical
(MemoryAPI memory, String reason) static void
makeNoRepImpact
(CampaignFleetAPI fleet, String reason) static void
makeNotLowRepImpact
(CampaignFleetAPI fleet, String reason) static void
makeStoryCritical
(MarketAPI market, String reason) static void
makeStoryCritical
(MemoryAPI memory, String reason) static void
makeStoryCritical
(String marketId, String reason) static void
makeUnimportant
(MemoryAPI memory, String reason) static void
makeUnimportant
(SectorEntityToken entity, String reason) static void
makeUnimportant
(PersonAPI person, String reason) static <T extends Enum<T>>
Tstatic <T extends Enum<T>>
TmapToEnum
(org.json.JSONObject json, String key, Class<T> enumType, T defaultOption, boolean required) static void
moveToMarket
(PersonAPI person, MarketAPI destination, boolean alwaysAddToCommDirectory) static org.lwjgl.util.vector.Vector2f
normalise
(org.lwjgl.util.vector.Vector2f v) static float
normalizeAngle
(float angleDeg) static void
normalizeNoise
(float[][] noise) static Color
static org.lwjgl.util.vector.Vector2f
static org.lwjgl.util.vector.Vector3f
optVector3f
(org.json.JSONObject json, String arrayKey) static org.lwjgl.util.vector.Vector2f
pickHyperLocationNotNearPlayer
(org.lwjgl.util.vector.Vector2f from, float minDist) static org.lwjgl.util.vector.Vector2f
pickLocationNotNearPlayer
(LocationAPI where, org.lwjgl.util.vector.Vector2f from, float minDist) static boolean
playerHasStorageAccess
(MarketAPI market) static void
playSound
(ApplyDamageResultAPI result, org.lwjgl.util.vector.Vector2f loc, org.lwjgl.util.vector.Vector2f vel, String lightShields, String solidShields, String heavyShields, String lightHull, String solidHull, String heavyHull) static void
removeDefeatTrigger
(CampaignFleetAPI fleet, String trigger) static void
removeRadioChatter
(MarketAPI market) static void
renderQuad
(float x, float y, float width, float height, Color color, float alphaMult) static void
renderQuadAlpha
(float x, float y, float width, float height, Color color, float alphaMult) static String
replaceTokensFromMemory
(String text, Map<String, MemoryAPI> memoryMap) static org.lwjgl.util.vector.Vector2f
rotateAroundOrigin
(org.lwjgl.util.vector.Vector2f v, float angle) static org.lwjgl.util.vector.Vector2f
rotateAroundOrigin
(org.lwjgl.util.vector.Vector2f v, float angle, org.lwjgl.util.vector.Vector2f origin) static Color
scaleAlpha
(Color color, float factor) static Color
scaleColor
(Color color, float factor) static Color
scaleColorOnly
(Color color, float factor) static Color
scaleColorSaturate
(Color color, float factor) static long
static void
setAbandonedStationMarket
(String marketId, SectorEntityToken station) static void
setAllPlanetsKnown
(StarSystemAPI system) static void
setAllPlanetsKnown
(String systemName) static void
setAllPlanetsSurveyed
(StarSystemAPI system, boolean setRuinsExplored) static Color
static void
setAsteroidSource
(SectorEntityToken asteroid, AsteroidSource source) static Color
setBrightness
(Color color, int brightness) static void
static void
static void
static void
setDefenderOverride
(SectorEntityToken entity, DefenderDataOverride override) static boolean
setFlagWithReason
(MemoryAPI memory, String flagKey, String reason, boolean value, float expire) A flag can be set to true for several "reasons".static void
setFullySurveyed
(MarketAPI market, TextPanelAPI text, boolean withNotification) static void
setKeepOnShipRecovery
(PersonAPI person, boolean keepOnRecovery) static void
setMentored
(PersonAPI person, boolean mentored) static void
setMercenary
(PersonAPI person, boolean mercenary) static void
setMercHiredNow
(PersonAPI person) static void
setPreliminarySurveyed
(MarketAPI market, TextPanelAPI text, boolean withNotification) static void
setPrevSalvageSpecial
(SectorEntityToken entity, Object data) static void
setRaidedTimestamp
(MarketAPI market) static void
setSalvageSpecial
(SectorEntityToken entity, Object data) static void
setSeen
(MarketAPI market, TextPanelAPI text, boolean withNotification) static void
setSpawnFPMult
(CampaignFleetAPI fleet, float mult) static void
setUnremovable
(PersonAPI person, boolean unremovable) static void
setWarningBeaconColors
(SectorEntityToken beacon, Color glow, Color ping) static void
setWarningBeaconGlowColor
(SectorEntityToken beacon, Color color) static void
setWarningBeaconPingColor
(SectorEntityToken beacon, Color color) static final boolean
shouldConvertFromStub
(LocationAPI containingLocation, org.lwjgl.util.vector.Vector2f location) static boolean
Mainly for avoiding stuff like "pirate fleet with 4 rustbuckets will run away from the player's 4 regular-quality frigates".static boolean
shouldShowDamageFloaty
(ShipAPI source, ShipAPI target) static void
showCost
(TextPanelAPI text, Color color, Color dark, String[] res, int[] quantities) static void
showCost
(TextPanelAPI text, String title, boolean withAvailable, float widthOverride, Color color, Color dark, String[] res, int[] quantities, boolean[] consumed) static void
showCost
(TextPanelAPI text, String title, boolean withAvailable, Color color, Color dark, String[] res, int[] quantities) static boolean
showRuleDialog
(SectorEntityToken entity, String initialTrigger) static CampaignEventPlugin
startEvent
(CampaignEventTarget eventTarget, String eventId, Object params) static void
static boolean
systemHasPlanets
(StarSystemAPI system) static List<Misc.Token>
static boolean
turnTowardsFacingV2
(MissileAPI missile, float desiredFacing, float relativeAngVel) static boolean
turnTowardsFacingV2
(ShipAPI ship, float desiredFacing, float relativeAngVel) static boolean
turnTowardsPointV2
(MissileAPI missile, org.lwjgl.util.vector.Vector2f point, float angVel) static String
static void
static void
wiggle
(org.lwjgl.util.vector.Vector2f v, float max)
-
Field Details
-
CAN_SMOD_BUILT_IN
public static boolean CAN_SMOD_BUILT_IN -
SIR
-
MAAM
-
CAPTAIN
-
FLUX_PER_CAPACITOR
public static float FLUX_PER_CAPACITOR -
DISSIPATION_PER_VENT
public static float DISSIPATION_PER_VENT -
MOUNT_BALLISTIC
-
MOUNT_MISSILE
-
MOUNT_ENERGY
-
MOUNT_UNIVERSAL
-
MOUNT_HYBRID
-
MOUNT_SYNERGY
-
MOUNT_COMPOSITE
-
OWNER_NEUTRAL
public static final int OWNER_NEUTRAL- See Also:
-
OWNER_PLAYER
public static final int OWNER_PLAYER- See Also:
-
FLOATY_EMP_DAMAGE_COLOR
-
FLOATY_ARMOR_DAMAGE_COLOR
-
FLOATY_SHIELD_DAMAGE_COLOR
-
FLOATY_HULL_DAMAGE_COLOR
-
GATE_FUEL_COST_MULT
public static float GATE_FUEL_COST_MULT -
MAX_COLONY_SIZE
public static int MAX_COLONY_SIZE -
OVER_MAX_INDUSTRIES_PENALTY
public static int OVER_MAX_INDUSTRIES_PENALTY -
FP_TO_BOMBARD_COST_APPROX_MULT
public static float FP_TO_BOMBARD_COST_APPROX_MULT -
FP_TO_GROUND_RAID_STR_APPROX_MULT
public static float FP_TO_GROUND_RAID_STR_APPROX_MULT -
UNKNOWN
-
UNSURVEYED
-
PRELIMINARY
-
FULL
-
STORY
Name of "story points". -
MAX_OFFICER_LEVEL
public static float MAX_OFFICER_LEVEL -
random
-
ZERO
public static final org.lwjgl.util.vector.Vector2f ZERO -
DEG_PER_RAD
public static float DEG_PER_RAD -
RAD_PER_DEG
public static float RAD_PER_DEG -
format
-
zeroColor
-
ASTEROID_SOURCE
- See Also:
-
cleanerCache
-
cleanCache
-
D_HULL_SUFFIX
- See Also:
-
FLEET_RETURNING_TO_DESPAWN
-
variantToFPCache
-
variantToHullCache
-
MIN_TERRAIN_EFFECT_MULT
public static float MIN_TERRAIN_EFFECT_MULT -
BURN_PENALTY_MULT
public static float BURN_PENALTY_MULT -
SAME_FACTION_BONUS
public static float SAME_FACTION_BONUS -
PER_UNIT_SHIPPING
public static float PER_UNIT_SHIPPING -
musicPlugin
-
DANGER_LEVEL_OVERRIDE
-
MENTORED
-
IS_MERCENARY
- See Also:
-
MERCENARY_HIRE_TIMESTAMP
- See Also:
-
CAPTAIN_UNREMOVABLE
- See Also:
-
KEEP_CAPTAIN_ON_SHIP_RECOVERY
- See Also:
-
RECOVERY_TAGS_KEY
-
MAX_PERMA_MODS
public static int MAX_PERMA_MODS -
SNEAK_BURN_MULT
public static float SNEAK_BURN_MULT -
LAST_RAIDED_AT
-
DEFEAT_TRIGGERS
-
canCheckVramNVIDIA
-
IMPACT_VOLUME_MULT
public static float IMPACT_VOLUME_MULT -
FRINGE_THRESHOLD
public static float FRINGE_THRESHOLD
-
-
Constructor Details
-
Misc
public Misc()
-
-
Method Details
-
tokenize
-
ucFirst
-
lcFirst
-
replaceTokensFromMemory
-
getDistance
-
getDistanceLY
-
getDistance
public static float getDistance(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) -
getDistanceSq
public static float getDistanceSq(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) -
getDistance
public static float getDistance(float x1, float y1, float x2, float y2) -
getDistanceToPlayerLY
public static float getDistanceToPlayerLY(org.lwjgl.util.vector.Vector2f locInHyper) -
getDistanceToPlayerLY
-
getDistanceLY
public static float getDistanceLY(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) -
getRounded
public static float getRounded(float in) -
getRoundedValue
-
getRoundedValueFloat
public static float getRoundedValueFloat(float value) -
getRoundedValueMaxOneAfterDecimal
-
getRoundedValueOneAfterDecimalIfNotWhole
-
logOfBase
public static float logOfBase(float base, float num) -
getPointAtRadius
public static org.lwjgl.util.vector.Vector2f getPointAtRadius(org.lwjgl.util.vector.Vector2f from, float r) -
getPointAtRadius
public static org.lwjgl.util.vector.Vector2f getPointAtRadius(org.lwjgl.util.vector.Vector2f from, float r, Random random) -
getPointWithinRadius
public static org.lwjgl.util.vector.Vector2f getPointWithinRadius(org.lwjgl.util.vector.Vector2f from, float r) -
getPointWithinRadius
public static org.lwjgl.util.vector.Vector2f getPointWithinRadius(org.lwjgl.util.vector.Vector2f from, float r, Random random) -
getPointWithinRadiusUniform
public static org.lwjgl.util.vector.Vector2f getPointWithinRadiusUniform(org.lwjgl.util.vector.Vector2f from, float r, Random random) -
getPointWithinRadiusUniform
public static org.lwjgl.util.vector.Vector2f getPointWithinRadiusUniform(org.lwjgl.util.vector.Vector2f from, float minR, float maxR, Random random) -
getSnapshotFPLost
-
getSnapshotMembersLost
-
startEvent
public static CampaignEventPlugin startEvent(CampaignEventTarget eventTarget, String eventId, Object params) -
getStoryDarkBrighterColor
-
getStoryDarkColor
-
getStoryBrightColor
-
getStoryOptionColor
-
getHighlightedOptionColor
-
getHighlightColor
-
getDarkHighlightColor
-
getTooltipTitleAndLightHighlightColor
-
getNegativeHighlightColor
-
getBallisticMountColor
-
getMissileMountColor
-
getEnergyMountColor
-
getPositiveHighlightColor
-
getGrayColor
-
getBrightPlayerColor
-
getBasePlayerColor
-
getDarkPlayerColor
-
getTextColor
-
getButtonTextColor
-
getUnitsPerLightYear
public static float getUnitsPerLightYear() -
getProfitMarginFlat
public static float getProfitMarginFlat() -
getProfitMarginMult
public static float getProfitMarginMult() -
getEconomyInterval
public static float getEconomyInterval() -
getGenericRollingAverageFactor
public static float getGenericRollingAverageFactor() -
createEconIntervalTracker
-
getAndJoined
-
getAndJoined
-
getJoined
-
getJoined
-
findNearbyFleets
public static List<CampaignFleetAPI> findNearbyFleets(SectorEntityToken from, float maxRange, Misc.FleetFilter filter) -
getFleetsInOrNearSystem
-
getMarketsInLocation
-
getBiggestMarketInLocation
-
getMarketsInLocation
-
getFactionMarkets
-
getPlayerMarkets
-
getPlayerSystems
-
getSystemsWithPlayerColonies
-
getFactionMarkets
-
getFactionMarkets
-
getNearbyMarkets
-
getNumHostileMarkets
-
getNearbyStarSystems
-
getNearbyStarSystem
-
getNearestStarSystem
-
getNearbyStarSystem
-
showRuleDialog
-
getAngleInDegreesStrict
public static float getAngleInDegreesStrict(org.lwjgl.util.vector.Vector2f v) -
getAngleInDegreesStrict
public static float getAngleInDegreesStrict(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) -
getAngleInDegrees
public static float getAngleInDegrees(org.lwjgl.util.vector.Vector2f v) -
getAngleInDegrees
public static float getAngleInDegrees(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) -
normalise
public static org.lwjgl.util.vector.Vector2f normalise(org.lwjgl.util.vector.Vector2f v) -
normalizeAngle
public static float normalizeAngle(float angleDeg) -
findNearestLocalMarket
public static MarketAPI findNearestLocalMarket(SectorEntityToken token, float maxDist, BaseEventPlugin.MarketFilter filter) -
findNearbyLocalMarkets
public static List<MarketAPI> findNearbyLocalMarkets(SectorEntityToken token, float maxDist, BaseEventPlugin.MarketFilter filter) -
findNearestLocalMarketWithSameFaction
public static MarketAPI findNearestLocalMarketWithSameFaction(SectorEntityToken token, float maxDist) -
getUnitVector
public static org.lwjgl.util.vector.Vector2f getUnitVector(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) -
getUnitVectorAtDegreeAngle
public static org.lwjgl.util.vector.Vector2f getUnitVectorAtDegreeAngle(float degrees) -
rotateAroundOrigin
public static org.lwjgl.util.vector.Vector2f rotateAroundOrigin(org.lwjgl.util.vector.Vector2f v, float angle) -
rotateAroundOrigin
public static org.lwjgl.util.vector.Vector2f rotateAroundOrigin(org.lwjgl.util.vector.Vector2f v, float angle, org.lwjgl.util.vector.Vector2f origin) -
isBetween
public static boolean isBetween(float one, float two, float check) Angles.- Parameters:
one
-two
-check
-- Returns:
-
getShieldedCargoFraction
-
interpolateColor
-
genColor
-
interpolateVector
public static org.lwjgl.util.vector.Vector2f interpolateVector(org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to, float progress) -
interpolate
public static float interpolate(float from, float to, float progress) -
scaleColor
-
scaleColorOnly
-
scaleAlpha
-
setAlpha
-
getSizeNum
-
unsetAll
-
getTargetingRadius
public static float getTargetingRadius(org.lwjgl.util.vector.Vector2f from, CombatEntityAPI target, boolean considerShield) -
getClosingSpeed
public static float getClosingSpeed(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) -
getFormat
-
getWithDGS
DGS = digit group separator, i.e.: 1000000 -> 1,000,000- Parameters:
num
-- Returns:
-
getDGSCredits
DGS = digit group separator, i.e.: 1000000 -> 1,000,000- Parameters:
num
-- Returns:
-
getInterceptPointBasic
public static org.lwjgl.util.vector.Vector2f getInterceptPointBasic(SectorEntityToken from, SectorEntityToken to) -
setFlagWithReason
public static boolean setFlagWithReason(MemoryAPI memory, String flagKey, String reason, boolean value, float expire) A flag can be set to true for several "reasons". As long as it hasn't been set back to false for all of the "reasons", it will remain set to true. For example, a fleet may be hostile because it's responding to comm relay interference, and because the player is running with the transponder off. Until both are resolved, the "hostile" flag will remain set to true. Note: a flag can not be "set" to false. If it's set to false for all the current reasons, the key is removed from memory. Returns whether the flag is still set after this method does its work.- Parameters:
memory
-flagKey
-reason
-value
-- Returns:
-
flagHasReason
-
clearFlag
-
makeLowRepImpact
-
makeNoRepImpact
-
makeHostile
-
makeHostileToPlayerTradeFleets
-
makeHostileToAllTradeFleets
-
makeNonHostileToFaction
-
makeNonHostileToFaction
public static void makeNonHostileToFaction(CampaignFleetAPI fleet, String factionId, boolean nonHostile, float dur) -
makeHostileToFaction
-
makeHostileToFaction
public static void makeHostileToFaction(CampaignFleetAPI fleet, String factionId, boolean hostile, float dur) -
isFleetMadeHostileToFaction
-
isFleetMadeHostileToFaction
-
makeNotLowRepImpact
-
getAgoStringForTimestamp
-
getDetailedAgoString
-
getAtLeastStringForDays
-
getStringForDays
-
getBurnLevelForSpeed
public static float getBurnLevelForSpeed(float speed) -
getFractionalBurnLevelForSpeed
public static float getFractionalBurnLevelForSpeed(float speed) -
getSpeedForBurnLevel
public static float getSpeedForBurnLevel(float burnLevel) -
getFuelPerDay
-
getFuelPerDayAtSpeed
-
getLYPerDayAtBurn
-
getLYPerDayAtSpeed
-
getDistance
public static float getDistance(org.lwjgl.util.vector.Vector3f v1, org.lwjgl.util.vector.Vector3f v2) -
getAngleDiff
public static float getAngleDiff(float from, float to) -
isInArc
public static boolean isInArc(float direction, float arc, org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) -
isInArc
public static boolean isInArc(float direction, float arc, float test) -
addNebulaFromPNG
public static SectorEntityToken addNebulaFromPNG(String image, float centerX, float centerY, LocationAPI location, String category, String key, int tilesWide, int tilesHigh, StarAge age) -
addNebulaFromPNG
public static SectorEntityToken addNebulaFromPNG(String image, float centerX, float centerY, LocationAPI location, String category, String key, int tilesWide, int tilesHigh, String terrainType, StarAge age) -
renderQuad
public static void renderQuad(float x, float y, float width, float height, Color color, float alphaMult) -
distanceFromLineToPoint
public static float distanceFromLineToPoint(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3) Shortest distance from line to a point.- Parameters:
p1
- line1p2
- line2p3
- point- Returns:
-
closestPointOnLineToPoint
public static org.lwjgl.util.vector.Vector2f closestPointOnLineToPoint(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3) -
closestPointOnSegmentToPoint
public static org.lwjgl.util.vector.Vector2f closestPointOnSegmentToPoint(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3) -
isPointInBounds
public static boolean isPointInBounds(org.lwjgl.util.vector.Vector2f p1, List<org.lwjgl.util.vector.Vector2f> bounds) -
intersectSegments
public static org.lwjgl.util.vector.Vector2f intersectSegments(org.lwjgl.util.vector.Vector2f a1, org.lwjgl.util.vector.Vector2f a2, org.lwjgl.util.vector.Vector2f b1, org.lwjgl.util.vector.Vector2f b2) -
intersectLines
public static org.lwjgl.util.vector.Vector2f intersectLines(org.lwjgl.util.vector.Vector2f a1, org.lwjgl.util.vector.Vector2f a2, org.lwjgl.util.vector.Vector2f b1, org.lwjgl.util.vector.Vector2f b2) -
intersectSegmentAndCircle
public static org.lwjgl.util.vector.Vector2f intersectSegmentAndCircle(org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3, float r) Going from p1 to p2. Returns the closer intersection.- Parameters:
p1
-p2
-p3
-r
-- Returns:
-
areSegmentsCoincident
public static boolean areSegmentsCoincident(org.lwjgl.util.vector.Vector2f a1, org.lwjgl.util.vector.Vector2f a2, org.lwjgl.util.vector.Vector2f b1, org.lwjgl.util.vector.Vector2f b2) -
getPerp
public static org.lwjgl.util.vector.Vector2f getPerp(org.lwjgl.util.vector.Vector2f v) -
getClosestTurnDirection
public static float getClosestTurnDirection(float facing, float desired) -
getClosestTurnDirection
public static float getClosestTurnDirection(float facing, org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) -
getClosestTurnDirection
public static float getClosestTurnDirection(org.lwjgl.util.vector.Vector2f one, org.lwjgl.util.vector.Vector2f two) -
getDiff
public static org.lwjgl.util.vector.Vector2f getDiff(org.lwjgl.util.vector.Vector2f v1, org.lwjgl.util.vector.Vector2f v2) -
getSourceMarket
-
getSourceEntity
-
getSpawnChanceMult
public static float getSpawnChanceMult(org.lwjgl.util.vector.Vector2f locInHyper) -
pickHyperLocationNotNearPlayer
public static org.lwjgl.util.vector.Vector2f pickHyperLocationNotNearPlayer(org.lwjgl.util.vector.Vector2f from, float minDist) -
pickLocationNotNearPlayer
public static org.lwjgl.util.vector.Vector2f pickLocationNotNearPlayer(LocationAPI where, org.lwjgl.util.vector.Vector2f from, float minDist) -
getBattleJoinRange
public static float getBattleJoinRange() -
wiggle
public static void wiggle(org.lwjgl.util.vector.Vector2f v, float max) -
isPlayerOrCombinedPlayerPrimary
-
isPlayerOrCombinedContainingPlayer
-
getAsteroidSource
-
setAsteroidSource
-
clearAsteroidSource
-
isFastStart
public static boolean isFastStart() -
isFastStartExplorer
public static boolean isFastStartExplorer() -
isFastStartMerc
public static boolean isFastStartMerc() -
isEasy
public static boolean isEasy() -
isNormal
public static boolean isNormal() -
getHyperspaceTerrain
-
getHyperspaceTerrainPlugin
-
isInAbyss
public static boolean isInAbyss(org.lwjgl.util.vector.Vector2f loc) -
isInAbyss
-
getAbyssalDepth
public static float getAbyssalDepth(org.lwjgl.util.vector.Vector2f loc) -
getAbyssalDepth
public static float getAbyssalDepth(org.lwjgl.util.vector.Vector2f loc, boolean uncapped) -
getAbyssalSystems
-
getAbyssalDepthOfPlayer
public static float getAbyssalDepthOfPlayer() -
getAbyssalDepthOfPlayer
public static float getAbyssalDepthOfPlayer(boolean uncapped) -
getAbyssalDepth
-
getAbyssalDepth
-
isInsideBlackHole
-
getCoronaFor
-
getMagneticFieldFor
-
getPulsarFor
-
hasPulsar
-
getCommissionFactionId
-
getCommissionFaction
-
getCommissionIntel
-
caresAboutPlayerTransponder
-
findClosestShipEnemyOf
public static ShipAPI findClosestShipEnemyOf(ShipAPI ship, org.lwjgl.util.vector.Vector2f locFromForSorting, ShipAPI.HullSize smallestToNote, float maxRange, boolean considerShipRadius) -
findClosestShipEnemyOf
public static ShipAPI findClosestShipEnemyOf(ShipAPI ship, org.lwjgl.util.vector.Vector2f locFromForSorting, ShipAPI.HullSize smallestToNote, float maxRange, boolean considerShipRadius, Misc.FindShipFilter filter) -
findClosestShipTo
public static ShipAPI findClosestShipTo(ShipAPI ship, org.lwjgl.util.vector.Vector2f locFromForSorting, ShipAPI.HullSize smallestToNote, float maxRange, boolean considerShipRadius, boolean allowHulks, Misc.FindShipFilter filter) -
mapToEnum
public static <T extends Enum<T>> T mapToEnum(org.json.JSONObject json, String key, Class<T> enumType, T defaultOption) throws org.json.JSONException - Throws:
org.json.JSONException
-
mapToEnum
public static <T extends Enum<T>> T mapToEnum(org.json.JSONObject json, String key, Class<T> enumType, T defaultOption, boolean required) throws org.json.JSONException - Throws:
org.json.JSONException
-
getColor
- Throws:
org.json.JSONException
-
optColor
public static Color optColor(org.json.JSONObject json, String key, Color defaultValue) throws org.json.JSONException - Throws:
org.json.JSONException
-
getVector
public static org.lwjgl.util.vector.Vector2f getVector(org.json.JSONObject json, String arrayKey, org.lwjgl.util.vector.Vector2f def) throws org.json.JSONException - Throws:
org.json.JSONException
-
getVector
public static org.lwjgl.util.vector.Vector2f getVector(org.json.JSONObject json, String arrayKey) throws org.json.JSONException - Throws:
org.json.JSONException
-
getVector3f
public static org.lwjgl.util.vector.Vector3f getVector3f(org.json.JSONObject json, String arrayKey) throws org.json.JSONException - Throws:
org.json.JSONException
-
optVector
-
optVector3f
public static org.lwjgl.util.vector.Vector3f optVector3f(org.json.JSONObject json, String arrayKey) throws org.json.JSONException - Throws:
org.json.JSONException
-
getVector
public static org.lwjgl.util.vector.Vector2f getVector(org.json.JSONObject json, String arrayKey, int index) throws org.json.JSONException - Throws:
org.json.JSONException
-
normalizeNoise
public static void normalizeNoise(float[][] noise) -
initNoise
-
genFractalNoise
public static void genFractalNoise(Random random, float[][] noise, int x1, int y1, int x2, int y2, int iter, float spikes) -
computeAngleSpan
public static float computeAngleSpan(float radius, float range) -
computeAngleRadius
public static float computeAngleRadius(float angle, float range) -
approach
public static float approach(float curr, float dest, float minSpeed, float diffSpeedMult, float amount) -
cleanBuffer
-
getFleetwideTotalStat
-
getFleetwideTotalMod
public static float getFleetwideTotalMod(CampaignFleetAPI fleet, String dynamicMemberStatId, float base) -
getFleetwideTotalMod
public static float getFleetwideTotalMod(CampaignFleetAPI fleet, String dynamicMemberStatId, float base, ShipAPI ship) -
getStarId
-
getMinSystemSurveyLevel
-
hasAnySurveyDataFor
-
setAllPlanetsKnown
-
setAllPlanetsKnown
-
setAllPlanetsSurveyed
-
generatePlanetConditions
-
generatePlanetConditions
-
getEstimatedOrbitIndex
-
getRandom
-
addSurveyDataFor
-
setFullySurveyed
-
setPreliminarySurveyed
public static void setPreliminarySurveyed(MarketAPI market, TextPanelAPI text, boolean withNotification) -
setSeen
-
getStringWithTokenReplacement
-
renderQuadAlpha
public static void renderQuadAlpha(float x, float y, float width, float height, Color color, float alphaMult) -
fadeAndExpire
-
fadeAndExpire
-
fadeInOutAndExpire
-
fadeIn
-
addCargoPods
public static CustomCampaignEntityAPI addCargoPods(LocationAPI where, org.lwjgl.util.vector.Vector2f loc) -
addDebrisField
public static SectorEntityToken addDebrisField(LocationAPI loc, DebrisFieldTerrainPlugin.DebrisFieldParams params, Random random) -
isUnboardable
-
isUnboardable
-
isShipRecoverable
public static boolean isShipRecoverable(FleetMemberAPI member, CampaignFleetAPI recoverer, boolean own, boolean useOfficerRecovery, float chanceMult) -
findNearestJumpPointTo
-
findNearestJumpPointTo
-
findNearestJumpPointThatCouldBeExitedFrom
-
findNearestPlanetTo
public static SectorEntityToken findNearestPlanetTo(SectorEntityToken entity, boolean requireGasGiant, boolean allowStars) -
shouldConvertFromStub
public static final boolean shouldConvertFromStub(LocationAPI containingLocation, org.lwjgl.util.vector.Vector2f location) -
genRandomSeed
public static long genRandomSeed()How Java generates a seed for a new java.util.Random() instance.- Returns:
-
seedUniquifier
public static long seedUniquifier() -
genUID
-
colorsToString
-
colorsFromString
-
getJumpPointTo
-
findNearestJumpPoint
-
getDHullId
-
getMod
-
getDistanceFromArc
public static float getDistanceFromArc(float direction, float arc, float angle) -
initConditionMarket
-
initEconomyMarket
-
getSurveyLevelString
-
getPlanetSurveyClass
-
setDefenderOverride
-
setSalvageSpecial
-
setPrevSalvageSpecial
-
getSalvageSpecial
-
getPrevSalvageSpecial
-
getSystemsInRange
public static List<StarSystemAPI> getSystemsInRange(SectorEntityToken from, Set<StarSystemAPI> exclude, boolean nonEmpty, float maxRange) -
getPulsarInSystem
-
systemHasPlanets
-
getCampaignShipScaleMult
-
createStringPicker
-
createStringPicker
-
setWarningBeaconGlowColor
-
setWarningBeaconPingColor
-
setWarningBeaconColors
-
getNearbyFleets
-
getVisibleFleets
public static List<CampaignFleetAPI> getVisibleFleets(SectorEntityToken from, boolean includeSensorContacts) -
isSameCargo
-
getDistressJumpPoint
-
clearTarget
-
giveStandardReturnToSourceAssignments
-
isFleetReturningToDespawn
-
giveStandardReturnToSourceAssignments
-
giveStandardReturnAssignments
public static void giveStandardReturnAssignments(CampaignFleetAPI fleet, SectorEntityToken where, String text, boolean withClear) -
adjustRep
public static void adjustRep(float repChangeFaction, RepLevel limit, String factionId, float repChangePerson, RepLevel personLimit, PersonAPI person, TextPanelAPI text) -
interruptAbilitiesWithTag
-
getInterceptPoint
public static org.lwjgl.util.vector.Vector2f getInterceptPoint(CampaignFleetAPI from, SectorEntityToken to) -
getInterceptPoint
public static org.lwjgl.util.vector.Vector2f getInterceptPoint(SectorEntityToken from, SectorEntityToken to, float maxSpeedFrom) -
stopPlayerFleet
public static void stopPlayerFleet() -
getListOfResources
-
setColor
-
setColor
-
setColor
-
doesMarketHaveMissionImportantPeopleOrIsMarketMissionImportant
public static boolean doesMarketHaveMissionImportantPeopleOrIsMarketMissionImportant(SectorEntityToken entity) -
makeImportant
-
makeImportant
-
makeImportant
-
makeImportant
-
makeImportant
-
makeImportant
-
isImportantForReason
-
makeUnimportant
-
makeUnimportant
-
makeUnimportant
-
cleanUpMissionMemory
-
clearAreaAroundPlayer
public static void clearAreaAroundPlayer(float minDist) -
getSalvageSeed
-
getSalvageSeed
-
getNameBasedSeed
-
forgetAboutTransponder
-
setAbandonedStationMarket
-
getDesiredMoveDir
-
isPermaKnowsWhoPlayerIs
-
getSimulatorPlugin
-
getImmigrationPlugin
-
getAICoreAdminPlugin
-
getAICoreOfficerPlugin
-
getAbandonMarketPlugin
-
getStabilizeMarketPlugin
-
getInflater
-
playerHasStorageAccess
-
getMarketSizeProgress
-
getStorageFeeFraction
public static float getStorageFeeFraction() -
getStorageCostPerMonth
-
getStorage
-
getLocalResources
-
getStorageCargo
-
getLocalResourcesCargo
-
getStorageTotalValue
-
getStorageCargoValue
-
getStorageShipValue
-
addStorageInfo
public static boolean addStorageInfo(TooltipMakerAPI tooltip, Color color, Color dark, MarketAPI market, boolean includeLocalResources, boolean addSectionIfEmpty) Returns true if it added anything to the tooltip.- Returns:
-
getTokenReplaced
-
getOutpostPenalty
public static float getOutpostPenalty() -
getAdminSalary
-
getOfficerSalary
-
getOfficerSalary
-
getHullIdForVariantId
-
getFPForVariantId
-
getFactionPersonalityPicker
-
getAdjustedStrength
-
getAdjustedFP
-
getShipQuality
-
getShipQuality
-
getShipPickMode
-
getShipPickMode
-
isBusy
-
getStationEntity
-
getStationFleet
-
getStationFleet
-
getStationBaseFleet
-
getStationBaseFleet
-
getStationMarket
-
getStationIndustry
-
isActiveModule
-
isActiveModule
-
addCreditsMessage
-
getSystemJumpPointHyperExitLocation
-
isNear
-
getDays
public static float getDays(float amount) -
getProbabilityMult
public static float getProbabilityMult(float desired, float current, float deviationMult) -
isHyperspaceAnchor
-
getStarSystemForAnchor
-
showCost
public static void showCost(TextPanelAPI text, Color color, Color dark, String[] res, int[] quantities) -
showCost
public static void showCost(TextPanelAPI text, String title, boolean withAvailable, Color color, Color dark, String[] res, int[] quantities) -
showCost
public static void showCost(TextPanelAPI text, String title, boolean withAvailable, float widthOverride, Color color, Color dark, String[] res, int[] quantities, boolean[] consumed) -
isPlayerFactionSetUp
public static boolean isPlayerFactionSetUp() -
getFleetType
-
isPatrol
-
isSmuggler
-
isTrader
-
isPirate
-
isScavenger
-
isRaider
-
isWarFleet
-
getNearestStationInSupportRange
public static Pair<SectorEntityToken,CampaignFleetAPI> getNearestStationInSupportRange(CampaignFleetAPI from) pair.one can be null if a stand-alone, non-market station is being returned in pair.two.- Parameters:
from
-- Returns:
-
isStationInSupportRange
-
getMemberStrength
-
getMemberStrength
public static float getMemberStrength(FleetMemberAPI member, boolean withHull, boolean withQuality, boolean withCaptain) -
increaseMarketHostileTimeout
-
removeRadioChatter
-
getDesignTypeColor
-
getDesignTypeColorDim
-
addDesignTypePara
-
getFleetRadiusTerrainEffectMult
-
getBurnMultForTerrain
-
addHitGlow
public static void addHitGlow(LocationAPI location, org.lwjgl.util.vector.Vector2f loc, org.lwjgl.util.vector.Vector2f vel, float size, Color color) -
addHitGlow
public static void addHitGlow(LocationAPI location, org.lwjgl.util.vector.Vector2f loc, org.lwjgl.util.vector.Vector2f vel, float size, float dur, Color color) -
addGlowyParticle
public static ParticleControllerAPI[] addGlowyParticle(LocationAPI location, org.lwjgl.util.vector.Vector2f loc, org.lwjgl.util.vector.Vector2f vel, float size, float rampUp, float dur, Color color) -
getShippingCapacity
-
getStrengthDesc
-
isMilitary
-
hasHeavyIndustry
-
hasOrbitalStation
-
getClaimingFaction
-
computeTotalShutdownRefund
-
computeShutdownRefund
-
addWarningBeacon
public static SectorEntityToken addWarningBeacon(SectorEntityToken center, BaseThemeGenerator.OrbitGap gap, String beaconTag) -
getTradeMode
-
isSpacerStart
public static boolean isSpacerStart() -
getSpaceport
-
setBrightness
-
scaleColorSaturate
-
getMaxOfficers
-
getNumNonMercOfficers
-
getMercs
-
getMaxIndustries
-
getNumIndustries
-
getNumImprovedIndustries
-
getNumStableLocations
-
getCurrentlyBeingConstructed
-
getRelColor
-
getMusicPlayerPlugin
-
getDangerLevel
-
getHitGlowSize
-
getHitGlowSize
public static float getHitGlowSize(float baseSize, float baseDamage, DamageType type, float sd, float ad, float hd, float ed) -
getNumEliteSkills
-
isMentored
-
setMentored
-
isMercenary
-
setMercHiredNow
-
getMercDaysSinceHired
-
setMercenary
-
isUnremovable
-
setUnremovable
-
isKeepOnShipRecovery
-
setKeepOnShipRecovery
-
isAutomated
-
isAutomated
-
isAutomated
-
isAutomated
-
getAllowedRecoveryTags
-
getMaxPermanentMods
-
getMaxPermanentMods
-
getBuildInBonusXP
-
getOPCost
-
isSpecialMod
-
hasSModdableBuiltIns
-
getCurrSpecialMods
-
getCurrSpecialModsList
-
isSlowMoving
-
getGoSlowBurnLevel
-
applyDamage
public static void applyDamage(FleetMemberAPI member, Random random, Misc.FleetMemberDamageLevel level, boolean withCRDamage, String crDamageId, String crDamageReason, boolean withMessage, TextPanelAPI textPanel, String messageText) -
applyDamage
public static void applyDamage(FleetMemberAPI member, Random random, float damageMult, boolean withCRDamage, String crDamageId, String crDamageReason, boolean withMessage, TextPanelAPI textPanel, String messageText) -
getBonusXPForRecovering
-
getBonusXPForScuttling
-
getSpawnFPMult
-
setSpawnFPMult
-
isDecentralized
-
getPersonalityName
-
setRaidedTimestamp
-
getDaysSinceLastRaided
-
computeEconUnitChangeFromTradeModChange
-
affectAvailabilityWithinReason
-
isOpenlyPopulated
-
hasAtLeastOneOfTags
-
hasUnexploredRuins
-
hasRuins
-
getRuinsSpec
-
getRuinsType
Assumes the market *does* have ruins.- Parameters:
market
-- Returns:
-
hasFarmland
-
addDefeatTrigger
-
removeDefeatTrigger
-
getDefeatTriggers
-
clearDefeatTriggersIfNeeded
-
shouldShowDamageFloaty
-
canCheckVram
public static boolean canCheckVram() -
getVramFreeKB
public static int getVramFreeKB()Reminder: call this on startup to see what the max is.- Returns:
-
getVramMaximumKB
public static int getVramMaximumKB() -
getVramDedicatedKB
public static int getVramDedicatedKB() -
getVramUsedKB
public static int getVramUsedKB() -
playSound
-
getShipWeight
-
getShipWeight
-
getIncapacitatedTime
-
isAvoidingPlayerHalfheartedly
-
isPirateFaction
In vanilla, pirates and Luddic Path.- Parameters:
faction
-- Returns:
-
getAOrAnFor
Probably wrong sometimes...- Returns:
- "a" or "an" for word.
-
moveToMarket
-
makeStoryCritical
-
makeStoryCritical
-
makeStoryCritical
-
makeNonStoryCritical
-
makeNonStoryCritical
-
isStoryCritical
-
isStoryCritical
-
isInsignificant
Whether it prevents salvage, surveying, etc. But NOT things that require only being seen to ruin them, such as SpySat deployments.- Parameters:
fleet
-- Returns:
-
shouldNotWantRunFromPlayerEvenIfWeaker
Mainly for avoiding stuff like "pirate fleet with 4 rustbuckets will run away from the player's 4 regular-quality frigates". Fleets that this evaluates to true for will avoid the player slowly.- Parameters:
fleet
-- Returns:
-
findKth
public static float findKth(float[] arr, int k) -
getAdjustedBaseRange
-
bezier
public static org.lwjgl.util.vector.Vector2f bezier(org.lwjgl.util.vector.Vector2f p0, org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, float t) -
bezierCubic
public static org.lwjgl.util.vector.Vector2f bezierCubic(org.lwjgl.util.vector.Vector2f p0, org.lwjgl.util.vector.Vector2f p1, org.lwjgl.util.vector.Vector2f p2, org.lwjgl.util.vector.Vector2f p3, float t) -
isInsideSlipstream
public static boolean isInsideSlipstream(org.lwjgl.util.vector.Vector2f loc, float radius) -
isInsideSlipstream
public static boolean isInsideSlipstream(org.lwjgl.util.vector.Vector2f loc, float radius, LocationAPI location) -
isInsideSlipstream
-
isOutsideSector
public static boolean isOutsideSector(org.lwjgl.util.vector.Vector2f loc) -
crossesAnySlipstream
public static boolean crossesAnySlipstream(LocationAPI location, org.lwjgl.util.vector.Vector2f from, org.lwjgl.util.vector.Vector2f to) -
computeCoreWorldsExtent
public static void computeCoreWorldsExtent() -
getCoreMin
public static org.lwjgl.util.vector.Vector2f getCoreMin() -
getCoreMax
public static org.lwjgl.util.vector.Vector2f getCoreMax() -
getCoreCenter
public static org.lwjgl.util.vector.Vector2f getCoreCenter() -
turnTowardsPointV2
public static boolean turnTowardsPointV2(MissileAPI missile, org.lwjgl.util.vector.Vector2f point, float angVel) -
turnTowardsFacingV2
public static boolean turnTowardsFacingV2(MissileAPI missile, float desiredFacing, float relativeAngVel) -
turnTowardsFacingV2
-
getUntrustwortyCount
public static int getUntrustwortyCount() -
incrUntrustwortyCount
public static void incrUntrustwortyCount() -
adjustRep
public static ReputationActionResponsePlugin.ReputationAdjustmentResult adjustRep(PersonAPI person, float delta, TextPanelAPI text) -
adjustRep
public static ReputationActionResponsePlugin.ReputationAdjustmentResult adjustRep(PersonAPI person, float delta, RepLevel limit, TextPanelAPI text) -
adjustRep
public static ReputationActionResponsePlugin.ReputationAdjustmentResult adjustRep(PersonAPI person, float delta, RepLevel limit, TextPanelAPI text, boolean addMessageOnNoChange, boolean withMessage) -
adjustRep
public static ReputationActionResponsePlugin.ReputationAdjustmentResult adjustRep(String factionId, float delta, TextPanelAPI text) -
adjustRep
public static ReputationActionResponsePlugin.ReputationAdjustmentResult adjustRep(String factionId, float delta, RepLevel limit, TextPanelAPI text) -
adjustRep
public static ReputationActionResponsePlugin.ReputationAdjustmentResult adjustRep(String factionId, float delta, RepLevel limit, TextPanelAPI text, boolean addMessageOnNoChange, boolean withMessage) -
getHullSizeStr
-
getColorDist
-
isFringe
-
isFringe
-
isFringe
public static boolean isFringe(org.lwjgl.util.vector.Vector2f loc) -
getFringeFactor
public static float getFringeFactor(org.lwjgl.util.vector.Vector2f loc) -
isHiddenBase
-
isReversePolarity
-
genEntityCatalogId
-
genEntityCatalogId
public static String genEntityCatalogId(int cycleOverride, int monthOverride, int dayOverride, Misc.CatalogEntryType type) -
genEntityCatalogId
public static String genEntityCatalogId(String firstChar, int cycleOverride, int monthOverride, int dayOverride, Misc.CatalogEntryType type) -
getAveragePlanetRadius
-
canPlanetTypeRollHabitable
-
canPlanetTypeRollCondition
-
getMaxMarketSize
-
countEnemyWeightInArc
public static float countEnemyWeightInArc(ShipAPI ship, float dir, float arc, float maxRange, boolean ignoreFightersAndModules) -
countEnemyWeightInArcAroundLocation
-
countEnemyWeightInArcAroundLocation
public static float countEnemyWeightInArcAroundLocation(int owner, org.lwjgl.util.vector.Vector2f loc, float dir, float arc, float maxRange, ShipAPI ignore, boolean ignoreFightersAndModules, boolean awareOnly) -
getFloatArray
-
getWeaponSkin
-
getWeaponSkin
public static SpriteAPI getWeaponSkin(String cat, String weaponId, ShipAPI ship, Misc.WeaponSkinType type)
-