Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.combat.ArmorGridAPI Interface Reference

Public Member Functions

float getArmorRating ()
 
float getMaxArmorInCell ()
 
float getArmorFraction (int cellX, int cellY)
 
float getArmorValue (int cellX, int cellY)
 
void setArmorValue (int cellX, int cellY, float value)
 
float[][] getGrid ()
 
float getCellSize ()
 
int getAbove ()
 
int getBelow ()
 
int getRightOf ()
 
int getLeftOf ()
 
int[] getCellAtLocation (Vector2f loc)
 
Vector2f getLocation (int cellX, int cellY)
 

Detailed Description

Definition at line 6 of file ArmorGridAPI.java.

Member Function Documentation

◆ getAbove()

int com.fs.starfarer.api.combat.ArmorGridAPI.getAbove ( )

Number of cells above the center of the ship.

Use together with getCellSize() and ShipAPI.getLocation() to determine the cell at a given location.

Returns

◆ getArmorFraction()

float com.fs.starfarer.api.combat.ArmorGridAPI.getArmorFraction ( int  cellX,
int  cellY 
)

0,0 is lower left corner of the sprite.

Returns
Armor value normalized to (0, 1).

◆ getArmorRating()

float com.fs.starfarer.api.combat.ArmorGridAPI.getArmorRating ( )
Returns
Armor value that the player sees in the game, on tooltips and such.

◆ getArmorValue()

float com.fs.starfarer.api.combat.ArmorGridAPI.getArmorValue ( int  cellX,
int  cellY 
)

0,0 is lower left corner of the sprite.

Returns
Actual non-normalized armor value in cell.

◆ getBelow()

int com.fs.starfarer.api.combat.ArmorGridAPI.getBelow ( )

Number of cells below the center of the ship.

Use together with getCellSize() and ShipAPI.getLocation() to determine the cell at a given location.

Returns

◆ getCellAtLocation()

int[] com.fs.starfarer.api.combat.ArmorGridAPI.getCellAtLocation ( Vector2f  loc)
Parameters
locabsolute location in engine coordinates.
Returns
null if loc is off the grid, array with {int cellX, int cellY} otherwise.

◆ getCellSize()

float com.fs.starfarer.api.combat.ArmorGridAPI.getCellSize ( )

Armor cell size, in pixels.

◆ getGrid()

float[][] com.fs.starfarer.api.combat.ArmorGridAPI.getGrid ( )

◆ getLeftOf()

int com.fs.starfarer.api.combat.ArmorGridAPI.getLeftOf ( )

Number of cells left of the center of the ship.

Use together with getCellSize() and ShipAPI.getLocation() to determine the cell at a given location.

Returns

◆ getLocation()

Vector2f com.fs.starfarer.api.combat.ArmorGridAPI.getLocation ( int  cellX,
int  cellY 
)

◆ getMaxArmorInCell()

float com.fs.starfarer.api.combat.ArmorGridAPI.getMaxArmorInCell ( )
Returns
Actual per-cell maximum armor value. ~1/15th of the listed armor rating, due to how damage is distributed between cells.

◆ getRightOf()

int com.fs.starfarer.api.combat.ArmorGridAPI.getRightOf ( )

Number of cells right of the center of the ship.

Use together with getCellSize() and ShipAPI.getLocation() to determine the cell at a given location.

Returns

◆ setArmorValue()

void com.fs.starfarer.api.combat.ArmorGridAPI.setArmorValue ( int  cellX,
int  cellY,
float  value 
)
Parameters
cellX
cellY
valueactual value, NOT fraction.

The documentation for this interface was generated from the following file: