Class ShipVitalsBox

Gauges that sit at the bottom and do gauge things related to things to do on a ship.

Initialisation

ShipVitalsBox:new (_name, _elementX, _elementY) Creates a new instance of the ShipVitalsBox class.

Gauge methods For creating and Initialising ShipCompass object

ShipVitalsBox:setEndurance (_currentEnd, _maxEnd) Sets endurance gauge and text.
ShipVitalsBox:setFigurehead (_currentCharge) UNDOCUMENTED
ShipVitalsBox:setHealth (_currentHP, _maxHP) Sets HP gauge and text.
ShipVitalsBox:setMana (_currentMP, _maxMP) Sets MP gauge and text.
ShipVitalsBox:setSeamonsterGauge (currentHealth, maxHealth) UNDOCUMENTED
ShipVitalsBox:setTargetHealth (_value) Sets target HP gauge and readout.
ShipVitalsBox:setWillpower (_currentWP, _maxWP) Sets willpower gauge and text.

Label methods For creating and Initialising ShipCompass object

ShipVitalsBox:setBalance (_haveBalance) Sets balance indicator.
ShipVitalsBox:setCrewBalanceLabel (_haveBalance) UNDOCUMENTED
ShipVitalsBox:setEquilibrium (_haveEquilibrium) Sets equilibrium indicator.
ShipVitalsBox:setTargetName (_name) Sets target name to be displayed.
ShipVitalsBox:promptUpdate () Handles updating after SVO ship prompt.

Misc methods For creating and Initialising ShipCompass object

ShipVitalsBox:setVisible (_visible) Shows or hides the whole object on the screen.
ShipVitalsBox:setLowHP (_value) Handles audio alerts for low HP.
ShipVitalsBox:update (...) Updates all prompt-tagged elements in a single call.


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:

  • _currentCharge
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:

  • currentHealth
  • maxHealth
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:

  • _haveBalance
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:

  • _name string Set target name

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.
generated by LDoc 1.4.3 Last updated 2021-01-24 20:08:44