Class ShipVitalsBox
Gauges that sit at the bottom and do gauge things related to things to do on a ship.
Initialisation
For creating and Initialising ShipCompass object.
-
ShipVitalsBox:new (_name, _elementX, _elementY)
line 23
-
Creates a new instance of the ShipVitalsBox class.
Parameters:
- _name
string
Instance name, should be identical to variable instance is assigned to.
- _elementX
number
X coordinate of ShipVitalsBox, in screen coordinates.
- _elementY
number
Y coordinate of ShipVitalsBox, in screen coordinates.
Returns:
table
A new instance of the ShipVitalsBox class.
Usage:
vitals = ShipVitalsBox:new("shipVitals", 964, 955)
Gauge methods
For creating and Initialising ShipCompass object
-
ShipVitalsBox:setEndurance (_currentEnd, _maxEnd)
line 139
-
Sets endurance gauge and text.
Parameters:
- _currentEnd
int
Current endurance
- _maxEnd
int
Maximum endurance
-
ShipVitalsBox:setFigurehead (_currentCharge)
line 148
-
UNDOCUMENTED
Parameters:
-
ShipVitalsBox:setHealth (_currentHP, _maxHP)
line 186
-
Sets HP gauge and text.
Parameters:
Usage:
shipVitalsBox:setHealth(3723, 5200)
-
ShipVitalsBox:setMana (_currentMP, _maxMP)
line 197
-
Sets MP gauge and text.
Parameters:
Usage:
shipVitalsBox:setMana(4158, 4700)
-
ShipVitalsBox:setSeamonsterGauge (currentHealth, maxHealth)
line 206
-
UNDOCUMENTED
Parameters:
-
ShipVitalsBox:setTargetHealth (_value)
line 216
-
Sets target HP gauge and readout.
Parameters:
- _value
int
Target HP (percent)
Usage:
shipVitalsBox:setTargetHealth(57)
-
ShipVitalsBox:setWillpower (_currentWP, _maxWP)
line 226
-
Sets willpower gauge and text.
Parameters:
- _currentWP
int
Current willpower
- _maxWP
int
Maximum willpower
Label methods
For creating and Initialising ShipCompass object
-
ShipVitalsBox:setBalance (_haveBalance)
line 246
-
Sets balance indicator.
Parameters:
- _haveBalance
Boolean
True if on balance.
Usage:
shipVitalsBox:setBalance(true)
-
ShipVitalsBox:setCrewBalanceLabel (_haveBalance)
line 256
-
UNDOCUMENTED
Parameters:
-
ShipVitalsBox:setEquilibrium (_haveEquilibrium)
line 268
-
Sets equilibrium indicator.
Parameters:
- _haveEquilibrium
boolean
True if on balance.
Usage:
shipVitalsBox:setEquilibrium(true)
-
ShipVitalsBox:setTargetName (_name)
line 282
-
Sets target name to be displayed.
Parameters:
Usage:
shipVitalsBox:setTargetName("orc48192")
-
ShipVitalsBox:promptUpdate ()
line 291
-
Handles updating after SVO ship prompt.
There's no point in updating the entire thing every go, so let's just run this every time "svo done with prompt" is raised. Consistent and clean, with no external dependencies outside of svof.
Usage:
shipVitalsBox:setTargetName("orc48192")
Misc methods
For creating and Initialising ShipCompass object
-
ShipVitalsBox:setVisible (_visible)
line 324
-
Shows or hides the whole object on the screen.
Just a shortcut for things like getting into my ship UI.
Parameters:
- _visible
bool
True to show object, false to hide.
Usage:
shipVitalsBox:setVisible(true)
-
ShipVitalsBox:setLowHP (_value)
line 337
-
Handles audio alerts for low HP. Plays sounds if true, and conditions within met.
Unlike VitalsBox counterpart, does not have flashers.
Parameters:
- _value
boolean
True, if in low HP state.
Usage:
shipVitalsBox:setLowHP(true)
-
ShipVitalsBox:update (...)
line 351
-
Updates all prompt-tagged elements in a single call.
Fires off of the event "svo done with prompt" by default.
Parameters:
Returns:
None.