Documentation
Also read http://wiki.alioth.net/index.php/NumericHUD
NumericHUDv3.27 Readme.txt
CommonSense 'Outside-the-Box' Design Studios Ltd. is happy to announce the latest design in
numeric hud interface systems for use in all ranges of space vessels. The new version 3 of
the numeric hud pilot interface system will be in effect when the software upgrade known as
"NumericHUDv3.oxp" is placed in the space vessels' computer's AddOns folder. Thank-you for
your patronage.
THIS OXP IS A PRODUCTION OF COMMONSENSE'OUTSIDE-THE-BOX'DESIGN STUDIOS LTD.
Author: CommonSenseOTB
USER CUSTOMIZABILITY:
You still have the option of going to the startUp function of the numerichudv3 script
and setting the toggles to "ON" if you want percentage for shields and energy guages
Toggles must be set to either "ON" or "OFF", default is "OFF".
You now have the option of going to the shipWillLaunchFromStation function of the numerichudv3 script
and setting the toggles to "ON" if you want countdown timer and alarm sounds or messages restored from Shield Equalizers+Capacitors oxp.(If installed)
Toggles must be set to either "ON" or "OFF", default is "OFF".
COMPATIBILITY:
Oolite version 1.75.3 or better due to CTD frame callback issues in previous oolite versions.
Compatible with widescreen monitors.
Requires shield equalizer+capacitors.oxp to display capacitor gauges.
Requires scanner targetting enhancement to display target range gauge.
Target Reticle Sensitivity built into this hud. No need for the oxp.
Can be used with the Sniper Camera System oxp.
Top speed is displayed when using the Q-Charger oxp.
No dependancies.
Changelog:
Jan.10.2015v3.27-Use strict in js for Oolite 1.81.
Number of MFDs limited correctly in dock for HUDSelector.
Sep.02.2014v3.26-Small fix to hide HUD in some cases if needed.
Aug.11.2014v3.25-New layout with 8 MFDs and wider scanner in 16:10 and 4:3 screens.
The previous layout with 4*4 MFDs still selectable in HUDSelector.
Support for 4:3, 16:10 and 16:9 screens with 8 MFDs also.
Support for Damaged, Weak and Derelict labels with CombatMFD 1.6.
Settings of the default MFDs are overridable by HUDSelector OXP.
Jul.24.2014v3.24-Compatible with TorusToSun OXP.
Jul.10.2014v3.23-Support for 4:3, 16:10 and 16:9 screens.
SlowHardware=true by default in numerichudv3.js for Pandora and old PC.
HUDSelector can turn off NumericHUD properly in $HUDSelectorCallBack().
Back to 4 MFD to get wider comms and console.
MFDs set to UsefulMFD, ManifestMFD, CombatMFD and NavigationMFD.
Aft and side views has independent MFDs, 16 in total.
Jul.5. 2014v3.22-6 MFD and HUDSelector compatibility by Norby.
Jul.1. 2014v3.21-Widescreen support by Norby.
Jun.30.2014v3.20-More position tuning by Norby and ETA is deactivated due to Navigation MFD.
Jun.30.2014v3.19-Better MFD positions by Diziet Sma and non-linear scanner turned on in 1.79.
Maj.23.2014v3.18-Show smooth speed levels with Q-Charger v1.25. (Norby)
Jan.27.2014v3.17-Adjustments on ASC beaconLabel and speed display for FarPlanets. (Norby)
Jan.16.2014v3.16-More FPS due to costly number updates are reduced to 12 times per second.
(Norby) -Show large target ranges from Telescope OXP.
-Show large speeds from FarPlanets OXP.
-Smaller fontsize for console and comms which allow 10 lines instead of 8.
-New dials for Oolite v1.79: ASC target, MFD, primed equipment, waypoints.
Dec.19.2013v3.15-Compatible with TimeSlip OXP: show corrected torus speed. (Norby)
Dec.12.2013v3.14-Added Eta display to the hud (spara)
Okt.24. 2013v3.13-Fixed a colour bug on compass with RocketShips under Oolite 1.77.1.
Okt.1 2013v3.12-Follow speed changes in RocketShips OXP.
Sep.2 2013v3.11-Added compatibility with Towbar OXP: can show target Empty and Mined status.
Jul.23 2013v3.1-Added compatibility with Detectors OXP: can show target energy over the crosshairs.
-Added compatibility with HardShips OXP: increased energy digits to 4 and shield capacitor digits to 3.
-Added compatibility with RocketShips OXP: show correct speed when RocketDrive is paused and always show cabin temp.
Apr.21 2012v3-New numbers now look like numbers, numbers glow only to get your attention, which
makes the hud much less distracting for better playing experience, numbers created
using selector drawStatusLight: which allows for both horizontal and vertical
lines of a grey color or lines that pulse the color of the alert condition.
Dec.19 2011v2.1-New targetsight made from the stick sensitivity indicator and original sights.
-target.isValid code added for target range gauge.
-altitude gauge flag switched when ejecting to prevent checking for an invalid player.ship.position.
Dec.6 2011v2-Smaller numbers, widescreen compatibility, some disappearing gauges, shield capacitor gauges, proportion of planertary radius gauge for
altitude(to hide scale issues), cabin temperature gauge, custom missile display, missile ID feature, alert level display,
stick sensitivity indicator as a part of the crosshair, simplification of hud with new layout and large scanner, and finally
most unneeded animation that would distract has been removed and escapepod hud removed and may become a standalone eventually.
Aug.7 2011v1.3.2-Oversight-forgot to refresh the display on launch after a game is saved to compensate for a cleanup script
to remove extra equipment from the save file.
Aug.7 2011v1.3.1-Oversight-forgot to check if a script exists before checking if its variable has a condition-now fixed.
Aug.7 2011v1.3-Bugfixed fuel required problem of targetSystem with help courtesy of kaks and ahruman-thankyou.
-Bugfixed bugs brought up by Eldon-thankyou. Hud switching problem when hyperspacing-now fixed.
Problem with the crosshairs becoming duplicate after ejecting-now fixed.
-Script ran too long errors are almost history. The main cause: digits functions had = "TRUE"
instead of === "TRUE" resulting in 16 additional remove equipments every frame and every digit
when it should only be 8 and only when the color changes. Extensive testing shows the errors have all but vanished.
-Found a bug: shipDied did not have crosshair equipment removed-now fixed.
-Optimized code with === after seeing a post from Thargoid saying it is more efficient.
-the n/shift+n adjustable crosshair now works only in the 4 main views.
-added code to prevent Sniper Camera System from forcing reticle sensitivity, as the
adjustable crosshair requires a reticle that doesn't change color at the wrong position.
-Added a basic escape pod hud. Will make a better version in the future as part of numeric hud
or as a standalone oxp depending on which ideas I have will work the best.
-Added a morph transition between different conditions of the scanner, compass and some icons.
-Added cleanup script to remove leftover equipment when saving the game.
-the target range indicator and animated crosshair now deactivate when the scanner targetting enhancement
is damaged or not there as these are both based on the targets range. Seems logical.
-Added compatibility with Q-Charger and now shows the correct top speed when Q-Charger is activated.
-Added toggles for percentage/units for forward/aft shields and energy gauges.
July.1 2011v1.2.1-Bugfixed later the same day. Crosshair equipment now will not be damaged or removed when
a new ship is purchased and the numeric gauges will now be refreshed as well
when a new ship is purchased.
July.1 2011v1.2-Added warnings backlights for critical shields and energy.
-Added an animated adjustable crosshair. The crosshair has 10 different
states depending on the range to the current target. There are 20 different
selectable positions for the crosshair for each view that store with the
save game and the adjustment is n/shiftn activated.
June 16 2011v1.1-Optimized code with better variables: missionVariables removed.
-Added a refresh to redraw damaged number pieces when damaged.
-result: fps improved by 5 or 6 and reduced considerably the script ran to long errors.
Author: CommonSenseOTB(thinking outside-the-box for your playing enjoyment and the improvement of oolite)
Completed: June 13, 2011 first release of version 1
NunmericHUDv3.oxp is the current version released April 21, 2012.
NumericHUDv3.oxp takes it a step beyond version 2.1.
As an improvement to version 2.1, numbers now look like numbers and glow to draw attention.
Specifically, shields, energy banks and capacitors when below normal, target range when
hostile, speed when over normal max speed, altitude when within range of a body, cabin temp
when over normal, fuel when low, fuel required when over the fuel available to jump with. The
idea was to only draw attention to gauges when required, otherwise readouts are barely visible.
In this version of the numeric hud concept we now see smaller numbers just small enough to
allow a change in the layout. The desired direction is to pursue a numeric heads-up-display
more similar to what is available in real fighter planes today. Every gauge that can be made
numeric now is, the first accessory numeric gauges(for shield capacitors) are now present,
and the layout has been simplified and optimized for a better play experience. This is about
as far as numeric huds can go using the technique of animating drawSelector:drawStatusLights
and numeric huds will progress further when images and text can be animated. Until then,
enjoy this new hud and have fun!
THANX AND RECOGNITION: Commander McLane and Thargoid for contributing altitude code.
Eldon for suggesting a PPR gauge for altitude.
Maik and Kaks for feedback.
Cmdr Wyvern for suggesting and use of contraster for v2.1 from his MilHUDv3.5.
another_commander for initially suggesting to use frame callbacks for v1.
Thargoid for showing us all the standard condition switching method and for
demonstrating on the board the use of frame callbacks(good examples help alot!)
Everyone that contributed ideas and support on the numerichud viewtopic.
THANK YOU ALL FOR YOUR SUPPORT AND HELP! -Sincerely, CommonSenseOTB.
ABOUT THIS PRODUCT: NumericHUDv3.oxp requires oolite 1.75.3 or better. The frame callbacks used may occasionally
cause a CTD when you die in versions of oolite earlier than 1.75.3. It is a compromise between good fps
and smooth gauge animation. This prototype is carried over from v1.3/v2.1 and may still have very minor issues.
Report your playtest results at the numeric hud viewtopic.
TO USE THIS HUD: Unzip and drag or move the NumericHUDv3.oxp folder into your addons folder.
This will become your main oolite hud. If you have any main hud modifying oxp's remove them please.
You may use this with the Sniper Camera System.
License:
This OXP is released under the Creative Commons Attribution - Non-Commercial -
Share Alike 3.0 license with the following clauses:
* Attribution to the author CommonSenseOTB
* Whilst you are free (and encouraged) to re-use any of the scripting in this OXP, the
usage must be distinct from that within this OXP. Unique identifiers such as
(but not limited to) unique shipdata.plist entity keys, mission variables, script names
(this.name), equipment identity strings (EQ_), description list arrays and entity roles
must not be re-used without prior agreement. Basically if it's unique or would identify or
overwrite anything in the original OXP, then you may not re-use it (for obvious compatibility
reasons).
* rebundling of this OXP within another distribution is permitted as long as it is unchanged.
The following derivates however are permitted and except from the above:
* the conversion of files between XML and openStep.
* the merging of files with other files of the same type from other OXPs.
* The license information (either as this file or merged into a larger one) must be included
in the OXP.
* Even though it is not compulsory, if you are re-using any sizable or recognisable piece of
this OXP, please let me know :)
Path |
Scripts/numerichudv3-4.js |
"use strict";
this.name = "numerichudv3-4";
this.author = "Norby";
this.copyright = "Creative Commons: attribution, non-commercial share alike 4.0";
this.description = "NumericHUDv3 with 4*4 MFDs";
this.startUp = function() {
var w = worldScripts.hudselector;
if(w) w.$HUDSelectorAddHUD("Numeric HUD with 4*4 MFDs", this.name);
}
this.$HUDSelectorCallBack = function ( off ) {
var w = worldScripts.numerichudv3;
if(off) w.$With8MFDs = true;
else w.$With8MFDs = false;
w.$HUDSelectorCallBack(off);
} |
Scripts/numerichudv3.js |
"use strict";
this.name = "numerichudv3";
this.author = "CommonSenseOTB";
this.copyright = "Copyright Apr. 21, 2012 by CommonSenseOTB, licensed under Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "NumericHUDv3 Numeric Gauge Animation Script";
this.startUp = function()
{
// You may toggle the guage to percentage "ON" or units "OFF" here
// Developers may have their hud script toggle these remotely
//
// You may toggle the shield capacitors countdown timer, alarm and messages back to "ON"(default is switched "OFF") in the "shipWillLaunchFromStation" function.
//
// YOU MAY TOUCH THESE
//
this.$With8MFDs=true; //original layout with wide scanner in 4:3 screens also and 8 MFDs
this.$SlowHardware=true; //for Pandora and old PC: refresh 4 times in a second, false mean 12.
this.toggleguagepercentage1 = "OFF";// default "OFF", change to "ON" to display forward shields as a percentage, change to "OFF" to display forward shields as units.
this.toggleguagepercentage2 = "OFF";// default "OFF", change to "ON" to display aft shields as a percentage, change to "OFF" to display aft shields as units.
this.toggleguagepercentage3 = "OFF";// default "OFF", change to "ON" to display energy as a percentage, change to "OFF" to display energy as units.
//default MFD 1-9 worldScript names if no HUDSelector OXP
this.$defaultMFDs = ["combat_MFD", "telescope", "CommsLogMFD", "BroadcastCommsMFD", "trophy_col",
"navi_mfd", "market_inquirer", "manifest_mfd", "useful_MFDs",];
//
// DO NOT TOUCH THESE PLEASE
//
this.$farplanets = worldScripts.farplanets;
this.$hudselector = worldScripts.hudselector;
this.$shieldequalizercapacitors = worldScripts.shieldequalizercapacitors;
this.$QCharger = worldScripts["Q-Charger"];
this.$telescope = worldScripts.telescope;
this.$timeslip = worldScripts.timeslip;
this.$torustosun = worldScripts.torustosun;
var v = "-4";
if( this.$With8MFDs ) v = "";
if(this.$hudselector) {
this.$hudselector.$HUDSelectorAddHUD("Numeric HUD with 8 MFDs", this.name);
var m = missionVariables.$HUDSelectorHUD;
if( m && m.indexOf("numerichud") != -1 ) //hide default hud after load game
player.ship.hud = "numerichudv3"+v+"computer.plist";
} else {
player.ship.hud = "numerichudv3"+v+"computer.plist";
this.$MFDsetup = true; //do once only after load game and if no HUDSelector OXP
}
this.$SetHUDSide();//player.ship.hud = this.name + ".plist";
this.numericcrosshairpositionforward = 1.0;
this.numericgaugedrawleftzeroes = "TRUE";// left zeroes on smaller numbers will be drawn
this.numericgaugeleftdigits = 0.0;// (1-5) places left of decimal point
this.numericgaugerightdigits = 0.0;// (1-3) places right of decimal point
this.numericgaugevalue = 0.0;// number to be displayed on current gauge
this.numericgaugeselector = "NONE";// current gauge to be displayed
this.numericgaugecolor = "NONE";// current gauge color to be used
this.numericgaugechanged = "FALSE";// current gauge state decides whether to draw
this.numericgaugecolorchanged = "FALSE";// current gauge state decides whether to erase previous color
this.numericgaugeflashcounter = 1.0;// counter to flash the between colors
this.numericgaugelastflashcounter = 1.0;// last value of flash counter
this.numericgaugeframecounter = 1.0;// frame counter for gauge control
this.numericgaugelastframecounter = 1.0;// last value of frame counter for gauge control
this.numericgaugelastforwardshieldvalue = 0.0;// last value of forward shield
this.numericgaugelastforwardshieldcolor = "NONE";// last color of forward shield
this.numericgaugelastforwardshieldcapacitorvalue = 0.0;// last value of forward shield capacitor
this.numericgaugelastforwardshieldcapacitorcolor = "NONE";// last color of forward shield capacitor
this.numericgaugelastaftshieldvalue = 0.0;// last value of aft shield
this.numericgaugelastaftshieldcolor = "NONE";// last color of aft shield
this.numericgaugelastaftshieldcapacitorvalue = 0.0;// last value of aft shield capacitor
this.numericgaugelastaftshieldcapacitorcolor = "NONE";// last color of aft shield capacitor
this.numericgaugelastenergyvalue = 0.0;// last value of energy
this.numericgaugelastenergycolor = "NONE";// last color of energy
this.numericgaugelastspeedvalue = 0.0;// last value of speed
this.numericgaugelastspeedcolor = "NONE";// last color of speed
this.numericgaugelastfuelvalue = 0.0;// last value of fuel
this.numericgaugelastfuelcolor = "NONE";// last color of fuel
this.numericgaugelastfuelrequiredvalue = 0.0;// last value of fuel required
this.numericgaugelastfuelrequiredcolor = "NONE";// last color of fuel required
this.numericgaugelasttargetrangevalue = 0.0;// last value of target range
this.numericgaugelasttargetrangecolor = "NONE";// last color of target range
this.numericescaperefresh = null;// default, not null if ejected, refreshes numeric gauges
this.numericcabintemperaturealtitudechangeflag = "ON";//flag to change the cabin temperature/altitude gauge on or off
this.numericgaugelastaltitudevalue = 0.0;// last value of altitude
this.numericgaugelastaltitudecolor = "NONE";// last color of altitude
this.numericgaugelastcabintemperaturevalue = 0.0;// last value of cabin temperature
this.numericgaugelastcabintemperaturecolor = "NONE";// last color of cabin temperature
this.numericrocketshipspeed = 0; //positive: RocketDrive paused, negative: in use, 0: neither (low speed)
}
this.$HUDSelectorCallBack = function ( off ) {
var w = worldScripts["numerichudv3"];
if( off ) { //do things to disable your HUD like rename functions
/* if( w.shipWillLaunchFromStation ) {
w.$save_shipWillLaunchFromStation = w.shipWillLaunchFromStation;
delete w.shipWillLaunchFromStation;
}
if( w.shipExitedWitchspace ) {
w.$save_shipExitedWitchspace = w.shipExitedWitchspace;
delete w.shipExitedWitchspace;
}
if( w.shipWillEnterWitchspace ) {
w.$save_shipWillEnterWitchspace = w.shipWillEnterWitchspace;
delete w.shipWillEnterWitchspace;
}
if( w.guiScreenChanged ) {
w.$save_guiScreenChanged = w.guiScreenChanged;
delete w.guiScreenChanged;
}
if( w.viewDirectionChanged ) {
w.$save_viewDirectionChanged = w.viewDirectionChanged;
delete w.viewDirectionChanged;
}
*/ } else { //do things to activate your HUD like restore disabled functions
//log("NumHUD",w+".shipWillEnterWitchspace = "+w.$save_shipWillEnterWitchspace);//debug
/* if( !w.shipWillLaunchFromStation ) {
eval("w.shipWillEnterWitchspace = "+w.$save_shipWillEnterWitchspace);
eval("w.shipExitedWitchspace = "+w.$save_shipExitedWitchspace);
eval("w.shipWillLaunchFromStation = "+w.$save_shipWillLaunchFromStation);
eval("w.guiScreenChanged = "+w.$save_guiScreenChanged);
eval("w.viewDirectionChanged = "+w.$save_viewDirectionChanged);
}
*/ w.shipWillLaunchFromStation();
w.guiScreenChanged(); //hide hud if needed
w.alertConditionChanged(player.alertCondition); //must call to show alert lamp
}
}
this.shipTargetLost = function(losttarget)
{
player.ship.removeEquipment("EQ_NUMERIC3_TRK"); //K
player.ship.removeEquipment("EQ_NUMERIC3_TRM"); //M
player.ship.removeEquipment("EQ_NUMERIC3_TRG"); //G
player.ship.removeEquipment("EQ_NUMERIC3_TRT"); //T
}
this.shipWillLaunchFromStation = function()
{
if(player.ship.hud.indexOf("numerichud") == -1) return;
this.$SetHUDSide();//player.ship.hud = "numerichudv3.plist";
this.cleanUp();
this.refresh();
//log(this.name, "MFD: "+this.$MFDsetup+" "+this.$defaultMFDs.length+" "+this.$defaultMFDs);//debug
if(this.$MFDsetup) { //must setup MFDs here and not eralier in startup()
this.$MFDsetup = false; //do only once
for(var i=0; i<this.$defaultMFDs.length; i++) {
var w = this.$defaultMFDs[i]; //worldScript name
var m = w; //MFD name
if( m == "useful_MFDs") m = "useful_MFD_general_info"; //not equal with worldScript name
if( m == "trophy_col") m = "trophy_mfd"; //not equal with worldScript name
if( m == "market_inquirer") m = "inquirer_mfd"; //not equal with worldScript name
if(worldScripts[w]) player.ship.setMultiFunctionDisplay(i, m);
//log(this.name, i+". MFD: "+w+" "+m+" "+worldScripts[w]);//debug
}
}
player.ship.awardEquipment("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE");
player.ship.awardEquipment("EQ_NUMERIC3_MISSILE_IDENTIFICATION");
player.ship.awardEquipment("EQ_NUMERIC3_SP");
if(!this.$altitudeOverClosestCelestialBody())
{
this.numericcabintemperaturealtitudechangeflag = "OFF";
}
else
{
this.numericcabintemperaturealtitudechangeflag = "ON";
}
if((this.$shieldequalizercapacitors) && (this.$shieldequalizercapacitors.togglesoundfx2 === "ON"))
{
this.$shieldequalizercapacitors.togglesoundfx2 = "OFF";//if you prefer the countdown timer and alarm then set to "ON"
}
if((this.$shieldequalizercapacitors) && (this.$shieldequalizercapacitors.togglemessages === "ON"))
{
this.$shieldequalizercapacitors.togglemessages = "OFF";//if you prefer the messages then set to "ON"
}
/*
this.pfsr = addFrameCallback(this.prepareForwardShieldReadout.bind(this));//----------
this.pfsrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pfsrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pfsrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfscr = addFrameCallback(this.prepareForwardShieldCapacitorReadout.bind(this));//----------
this.pfscrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pfscrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pfscrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pasr = addFrameCallback(this.prepareAftShieldReadout.bind(this));//----------
this.pasrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pasrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pasrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pascr = addFrameCallback(this.prepareAftShieldCapacitorReadout.bind(this));//----------
this.pascrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pascrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pascrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.per = addFrameCallback(this.prepareEnergyReadout.bind(this));//----------
this.perdgd2 = addFrameCallback(this.displayGaugeDigit2.bind(this));
this.perdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.perdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.perdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.psr = addFrameCallback(this.prepareSpeedReadout.bind(this));//----------
this.psrdgd1 = addFrameCallback(this.displayGaugeDigit1.bind(this));
this.psrdgd2 = addFrameCallback(this.displayGaugeDigit2.bind(this));
this.psrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.psrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.psrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfr = addFrameCallback(this.prepareFuelReadout.bind(this));//----------
this.pfrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfrdgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.pfrr = addFrameCallback(this.prepareFuelRequiredReadout.bind(this));//----------
this.pfrrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfrrdgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.ptrr = addFrameCallback(this.prepareTargetRangeReadout.bind(this));//----------
this.ptrrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.ptrrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.ptrrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.ptrrdgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.ptrrdgd7 = addFrameCallback(this.displayGaugeDigit7.bind(this));
this.ptrrdgd8 = addFrameCallback(this.displayGaugeDigit8.bind(this));
this.par = addFrameCallback(this.prepareAltitudeReadout.bind(this));//----------
this.pardgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pardgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.pardgd7 = addFrameCallback(this.displayGaugeDigit7.bind(this));
this.pctr = addFrameCallback(this.prepareCabinTemperatureReadout.bind(this));//----------
this.pctrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pctrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
*/
this.cs = addFrameCallback(this.conditionSwitch.bind(this));//----------
if(this.numericgaugeCheckTimer)
{
this.numericgaugeCheckTimer.start();
if(!this.$SlowHardware) {
if(this.numericgaugeCheckTimer2) this.numericgaugeCheckTimer2.start();
if(this.numericgaugeCheckTimer3) this.numericgaugeCheckTimer3.start();
}
}
else
{
this.numericgaugeCheckTimer = new Timer(this, this.numericgaugeCheck,0,0.25);//update the numeric gauge flash counter
if(!this.$SlowHardware) {
this.numericgaugeCheckTimer2 = new Timer(this, this.numericgaugeCheck,0.083,0.25);//three timer to get 12 updates/sec
this.numericgaugeCheckTimer3 = new Timer(this, this.numericgaugeCheck,0.167,0.25);
}
}
}
this.shipWillDockWithStation = function()
{
if(this.numericescaperefresh)
{
this.numericcabintemperaturealtitudechangeflag = "ON";//restore flag after ejecting to restore altitude and cabin temperature gauges
this.cleanUp();
this.refresh();
this.numericescaperefresh = null;
}
}
this.shipLaunchedEscapePod = function(escapepod)
{
this.numericescaperefresh = 1.0;
this.numericcabintemperaturealtitudechangeflag = "OFF";//prevent checking for a invalid player.ship.position in $altitudeOverClosestCelestialBody function
}
this.numericgaugeCheck = function()
{
if(player.ship.docked)
{
/*
removeFrameCallback(this.pfsr);//----------
removeFrameCallback(this.pfsrdgd3);
removeFrameCallback(this.pfsrdgd4);
removeFrameCallback(this.pfsrdgd5);
removeFrameCallback(this.pfscr);//----------
removeFrameCallback(this.pfscrdgd3);
removeFrameCallback(this.pfscrdgd4);
removeFrameCallback(this.pfscrdgd5);
removeFrameCallback(this.pasr);//----------
removeFrameCallback(this.pasrdgd3);
removeFrameCallback(this.pasrdgd4);
removeFrameCallback(this.pasrdgd5);
removeFrameCallback(this.pascr);//----------
removeFrameCallback(this.pascrdgd3);
removeFrameCallback(this.pascrdgd4);
removeFrameCallback(this.pascrdgd5);
removeFrameCallback(this.per);//----------
removeFrameCallback(this.perdgd2);
removeFrameCallback(this.perdgd3);
removeFrameCallback(this.perdgd4);
removeFrameCallback(this.perdgd5);
removeFrameCallback(this.psr);//----------
removeFrameCallback(this.psrdgd1);
removeFrameCallback(this.psrdgd2);
removeFrameCallback(this.psrdgd3);
removeFrameCallback(this.psrdgd4);
removeFrameCallback(this.psrdgd5);
removeFrameCallback(this.pfr);//----------
removeFrameCallback(this.pfrdgd5);
removeFrameCallback(this.pfrdgd6);
removeFrameCallback(this.pfrr);//----------
removeFrameCallback(this.pfrrdgd5);
removeFrameCallback(this.pfrrdgd6);
removeFrameCallback(this.ptrr);//----------
removeFrameCallback(this.ptrrdgd3);
removeFrameCallback(this.ptrrdgd4);
removeFrameCallback(this.ptrrdgd5);
removeFrameCallback(this.ptrrdgd6);
removeFrameCallback(this.ptrrdgd7);
removeFrameCallback(this.ptrrdgd8);
removeFrameCallback(this.par);//----------
removeFrameCallback(this.pardgd5);
removeFrameCallback(this.pardgd6);
removeFrameCallback(this.pardgd7);
removeFrameCallback(this.pctr);//----------
removeFrameCallback(this.pctrdgd4);
removeFrameCallback(this.pctrdgd5);
*/
if( isValidFrameCallback( this.cs ) ) removeFrameCallback(this.cs);//----------
if(this.numericgaugeCheckTimer)
{
this.numericgaugeCheckTimer.stop();
if(this.numericgaugeCheckTimer2) this.numericgaugeCheckTimer2.stop();
if(this.numericgaugeCheckTimer3) this.numericgaugeCheckTimer3.stop();
}
}
else
{
this.refresh();
this.numericgaugeflashcounter += 1;
if(this.numericgaugeflashcounter > 8.0)
{
this.numericgaugeflashcounter = 1;
return;
}
return;
}
return;
}
this.shipWillEnterWitchspace = function()
{
if(player.ship.hud.indexOf("numerichud") == -1) return;
this.$SetHUDSide();//player.ship.hud = "numerichudv3.plist";
/*
removeFrameCallback(this.pfsr);//----------
removeFrameCallback(this.pfsrdgd3);
removeFrameCallback(this.pfsrdgd4);
removeFrameCallback(this.pfsrdgd5);
removeFrameCallback(this.pfscr);//----------
removeFrameCallback(this.pfscrdgd3);
removeFrameCallback(this.pfscrdgd4);
removeFrameCallback(this.pfscrdgd5);
removeFrameCallback(this.pasr);//----------
removeFrameCallback(this.pasrdgd3);
removeFrameCallback(this.pasrdgd4);
removeFrameCallback(this.pasrdgd5);
removeFrameCallback(this.pascr);//----------
removeFrameCallback(this.pascrdgd3);
removeFrameCallback(this.pascrdgd4);
removeFrameCallback(this.pascrdgd5);
removeFrameCallback(this.per);//----------
removeFrameCallback(this.perdgd2);
removeFrameCallback(this.perdgd3);
removeFrameCallback(this.perdgd4);
removeFrameCallback(this.perdgd5);
removeFrameCallback(this.psr);//----------
removeFrameCallback(this.psrdgd1);
removeFrameCallback(this.psrdgd2);
removeFrameCallback(this.psrdgd3);
removeFrameCallback(this.psrdgd4);
removeFrameCallback(this.psrdgd5);
removeFrameCallback(this.pfr);//----------
removeFrameCallback(this.pfrdgd5);
removeFrameCallback(this.pfrdgd6);
removeFrameCallback(this.pfrr);//----------
removeFrameCallback(this.pfrrdgd5);
removeFrameCallback(this.pfrrdgd6);
removeFrameCallback(this.ptrr);//----------
removeFrameCallback(this.ptrrdgd4);
removeFrameCallback(this.ptrrdgd5);
removeFrameCallback(this.ptrrdgd6);
removeFrameCallback(this.ptrrdgd7);
removeFrameCallback(this.ptrrdgd8);
removeFrameCallback(this.par);//----------
removeFrameCallback(this.pardgd5);
removeFrameCallback(this.pardgd6);
removeFrameCallback(this.pardgd7);
removeFrameCallback(this.pctr);//----------
removeFrameCallback(this.pctrdgd4);
removeFrameCallback(this.pctrdgd5);
*/
if( isValidFrameCallback( this.cs ) ) removeFrameCallback(this.cs);//----------
if(this.numericgaugeCheckTimer)
{
this.numericgaugeCheckTimer.stop();
if(this.numericgaugeCheckTimer2) this.numericgaugeCheckTimer2.stop();
if(this.numericgaugeCheckTimer3) this.numericgaugeCheckTimer3.stop();
}
}
this.shipExitedWitchspace = function()
{
if(player.ship.hud.indexOf("numerichud") == -1) return;
if(!this.$altitudeOverClosestCelestialBody())
{
this.numericcabintemperaturealtitudechangeflag = "OFF";
}
else
{
this.numericcabintemperaturealtitudechangeflag = "ON";
}
/*
this.pfsr = addFrameCallback(this.prepareForwardShieldReadout.bind(this));//----------
this.pfsrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pfsrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pfsrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfscr = addFrameCallback(this.prepareForwardShieldCapacitorReadout.bind(this));//----------
this.pfscrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pfscrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pfscrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pasr = addFrameCallback(this.prepareAftShieldReadout.bind(this));//----------
this.pasrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pasrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pasrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pascr = addFrameCallback(this.prepareAftShieldCapacitorReadout.bind(this));//----------
this.pascrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.pascrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pascrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.per = addFrameCallback(this.prepareEnergyReadout.bind(this));//----------
this.perdgd2 = addFrameCallback(this.displayGaugeDigit2.bind(this));
this.perdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.perdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.perdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.psr = addFrameCallback(this.prepareSpeedReadout.bind(this));//----------
this.psrdgd1 = addFrameCallback(this.displayGaugeDigit1.bind(this));
this.psrdgd2 = addFrameCallback(this.displayGaugeDigit2.bind(this));
this.psrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.psrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.psrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfr = addFrameCallback(this.prepareFuelReadout.bind(this));//----------
this.pfrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfrdgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.pfrr = addFrameCallback(this.prepareFuelRequiredReadout.bind(this));//----------
this.pfrrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pfrrdgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.ptrr = addFrameCallback(this.prepareTargetRangeReadout.bind(this));//----------
this.ptrrdgd3 = addFrameCallback(this.displayGaugeDigit3.bind(this));
this.ptrrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.ptrrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.ptrrdgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.ptrrdgd7 = addFrameCallback(this.displayGaugeDigit7.bind(this));
this.ptrrdgd8 = addFrameCallback(this.displayGaugeDigit8.bind(this));
this.par = addFrameCallback(this.prepareAltitudeReadout.bind(this));//----------
this.pardgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
this.pardgd6 = addFrameCallback(this.displayGaugeDigit6.bind(this));
this.pardgd7 = addFrameCallback(this.displayGaugeDigit7.bind(this));
this.pctr = addFrameCallback(this.prepareCabinTemperatureReadout.bind(this));//----------
this.pctrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
this.pctrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
*/
this.cs = addFrameCallback(this.conditionSwitch.bind(this));//----------
if(this.numericgaugeCheckTimer)
{
this.numericgaugeCheckTimer.start();
if(!this.$SlowHardware) {
if(this.numericgaugeCheckTimer2) this.numericgaugeCheckTimer2.start();
if(this.numericgaugeCheckTimer3) this.numericgaugeCheckTimer3.start();
}
}
else
{
this.numericgaugeCheckTimer = new Timer(this, this.numericgaugeCheck,0,0.25);//update the numeric gauge flash counter
if(!this.$SlowHardware) {
this.numericgaugeCheckTimer2 = new Timer(this, this.numericgaugeCheck,0.833,0.25);//three timer to get 12 updates/sec
this.numericgaugeCheckTimer3 = new Timer(this, this.numericgaugeCheck,0.167,0.25);
}
}
}
this.shipEnteredPlanetaryVicinity = function(planet)
{
this.numericcabintemperaturealtitudechangeflag = "ON";
}
this.shipExitedPlanetaryVicinity = function(planet)
{
this.numericcabintemperaturealtitudechangeflag = "OFF";
}
this.$altitudeOverClosestCelestialBody = function()//code provided by Commander McLane, Thargoid and Eric Walch
{
// function $isCelestialBody(entity) //slower search
// {
// return entity.isSun || entity.isPlanet
// }
// var closestCelestialBody = system.filteredEntities(this, $isCelestialBody, player.ship)[0];
//faster search by Norby
var closestCelestialBody = system.sun;
var d = 100000000000000000000.0; //10^20m for sure
var ps = player.ship;
if( system.sun ) d = ps.position.distanceTo( system.sun.position );
var p = system.planets;
var len = p.length;
for( var i = 0; i < len; i++ ) { //find the smallest distance
var s = ps.position.distanceTo( p[i].position );
if( d > s ) {
d = s;
closestCelestialBody = p[i];
}
}
if (!closestCelestialBody) return undefined;
var altitude = player.ship.position.distanceTo(closestCelestialBody) - closestCelestialBody.radius;
var planetarydistanceratio = (altitude / closestCelestialBody.radius)
if ((closestCelestialBody.radius * 3) > altitude)
{
return planetarydistanceratio;
}
else
{
return undefined;
}
}
this.prepareForwardShieldReadout = function()
{
this.numericgaugeframecounter += 1.0;
if(this.numericgaugeframecounter >= 3.0)
{
this.numericgaugeframecounter = 1.0;
}
if(this.numericgaugeframecounter !== 2.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 3;
this.numericgaugerightdigits = 0;
this.numericgaugevalue = player.ship.forwardShield;
let mfs = player.ship.maxForwardShield;
if(this.toggleguagepercentage1 === "ON")
{
this.numericgaugevalue = ((player.ship.forwardShield / player.ship.maxForwardShield) * 100); ///
mfs = 100;
}
this.numericgaugeselector = "FORWARDSHIELD";
if(this.numericgaugevalue > (mfs * 0.8))
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastforwardshieldcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastforwardshieldvalue === this.numericgaugevalue) && (this.numericgaugelastforwardshieldcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastforwardshieldvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastforwardshieldvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastforwardshieldcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastforwardshieldvalue === this.numericgaugevalue) && (this.numericgaugelastforwardshieldcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastforwardshieldvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastforwardshieldvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareForwardShieldCapacitorReadout = function()
{
if(this.numericgaugeframecounter !== 2.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 3;
this.numericgaugerightdigits = 0;
this.numericgaugevalue = 0.0;
if(player.ship.equipmentStatus("EQ_FORWARD_SHIELD_CAPACITOR") !== "EQUIPMENT_OK")
{
this.numericgaugeselector = "FORWARDSHIELDCAPACITOR";
this.numericgaugechanged = "FALSE";
return;
}
if(this.$shieldequalizercapacitors)
{
if(this.$shieldequalizercapacitors.secforwardshieldcapacitor > 0.0)/// set forward shield capacitor value
{
this.numericgaugevalue = (this.$shieldequalizercapacitors.secforwardshieldcapacitor);
}
}
this.numericgaugeselector = "FORWARDSHIELDCAPACITOR";
if(this.numericgaugevalue > (64 * 0.8))
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastforwardshieldcapacitorcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastforwardshieldcapacitorvalue === this.numericgaugevalue) && (this.numericgaugelastforwardshieldcapacitorcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastforwardshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcapacitorcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastforwardshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcapacitorcolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastforwardshieldcapacitorcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastforwardshieldcapacitorvalue === this.numericgaugevalue) && (this.numericgaugelastforwardshieldcapacitorcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastforwardshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcapacitorcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastforwardshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastforwardshieldcapacitorcolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareAftShieldReadout = function()
{
if(this.numericgaugeframecounter !== 2.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 3;
this.numericgaugerightdigits = 0;
this.numericgaugevalue = player.ship.aftShield;
let mas = player.ship.maxAftShield;
if(this.toggleguagepercentage2 === "ON")
{
this.numericgaugevalue = ((player.ship.aftShield / player.ship.maxAftShield) * 100); ///
mas = 100;
}
this.numericgaugeselector = "AFTSHIELD";
if(this.numericgaugevalue > (mas * 0.8))
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastaftshieldcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastaftshieldvalue === this.numericgaugevalue) && (this.numericgaugelastaftshieldcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastaftshieldvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastaftshieldvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastaftshieldcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastaftshieldvalue === this.numericgaugevalue) && (this.numericgaugelastaftshieldcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastaftshieldvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastaftshieldvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareAftShieldCapacitorReadout = function()
{
if(this.numericgaugeframecounter !== 2.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 3;
this.numericgaugerightdigits = 0;
this.numericgaugevalue = 0.0;
if(player.ship.equipmentStatus("EQ_AFT_SHIELD_CAPACITOR") !== "EQUIPMENT_OK")
{
this.numericgaugeselector = "AFTSHIELDCAPACITOR";
this.numericgaugechanged = "FALSE";
return;
}
if(this.$shieldequalizercapacitors)
{
if(this.$shieldequalizercapacitors.secaftshieldcapacitor > 0.0)// set aft shield capacitor value
{
this.numericgaugevalue = (this.$shieldequalizercapacitors.secaftshieldcapacitor);
}
}
this.numericgaugeselector = "AFTSHIELDCAPACITOR";
if(this.numericgaugevalue > (64 * 0.8))
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastaftshieldcapacitorcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastaftshieldcapacitorvalue === this.numericgaugevalue) && (this.numericgaugelastaftshieldcapacitorcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastaftshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcapacitorcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastaftshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcapacitorcolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastaftshieldcapacitorcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastaftshieldcapacitorvalue === this.numericgaugevalue) && (this.numericgaugelastaftshieldcapacitorcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastaftshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcapacitorcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastaftshieldcapacitorvalue = this.numericgaugevalue;
this.numericgaugelastaftshieldcapacitorcolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareEnergyReadout = function()
{
if(this.numericgaugeframecounter !== 1.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 4;
this.numericgaugerightdigits = 0;
this.numericgaugevalue = player.ship.energy;
let me = player.ship.maxEnergy;
if(this.toggleguagepercentage3 === "ON")
{
this.numericgaugevalue = ((player.ship.energy / player.ship.maxEnergy) * 100); ///
me = 100;
}
this.numericgaugeselector = "ENERGY";
if(this.numericgaugevalue > (me * 0.8))
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastenergycolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastenergyvalue === this.numericgaugevalue) && (this.numericgaugelastenergycolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastenergyvalue = this.numericgaugevalue;
this.numericgaugelastenergycolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastenergyvalue = this.numericgaugevalue;
this.numericgaugelastenergycolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastenergycolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastenergyvalue === this.numericgaugevalue) && (this.numericgaugelastenergycolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastenergyvalue = this.numericgaugevalue;
this.numericgaugelastenergycolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastenergyvalue = this.numericgaugevalue;
this.numericgaugelastenergycolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.rocketShipSpeed = function(p) //RocketDrive status receiver called from rocketships.js
{
this.numericrocketshipspeed = p; //positive: paused, negative: in use, 0: neither (low speed)
}
this.prepareSpeedReadout = function()
{
if(this.numericgaugeframecounter !== 2.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "TRUE";
this.numericgaugeleftdigits = 5;
this.numericgaugerightdigits = 0;
this.numericgaugevalue = player.ship.speed;
var q = this.$QCharger;
if( q && q.qchargercondition === "ON")// display Q-Charger speed
{
if( q.qchargerpercent ) //from Q-harger v1.25
this.numericgaugevalue = player.ship.maxSpeed * ( 1 + q.qchargerpercent );
else this.numericgaugevalue = player.ship.maxSpeed * 2;
}
var t = this.$timeslip;
if( t && t.$TimeSlipON ) // display slow torus speed
{
this.numericgaugevalue = player.ship.maxSpeed * 7;
}
if(this.numericrocketshipspeed > 0 && player.ship.speed > this.numericrocketshipspeed && player.ship.speed <= player.ship.maxSpeed)
{
//player.consoleMessage("RocketDrive Paused "+numericrocketshipspeed,1);
this.numericgaugevalue = this.numericrocketshipspeed;// display slowing speed of paused RocketDrive
}
var b = false;
var fw = false;
var t = this.$torustosun;
if( t ) {
if( t.$TorusToSunBonus > 1 ) { // display Torus multiplier
b = Math.round( t.$TorusToSunBonus * 32 * player.ship.maxSpeed );
this.numericgaugevalue = b;
if( t.$TorusToSunMaxMultiplier == t.$TorusToSunBonus ) { //show forwarding
fw = true;
// this.numericgaugevalue = Math.round( t.$TorusToSunMaxMultiplier * this.$TorusToSunTimeFw );
}
}
if( fw ) {
player.ship.removeEquipment("EQ_NUMERIC3_FTL"); //FTL
player.ship.awardEquipment("EQ_NUMERIC3_FW"); //FW
player.ship.removeEquipment("EQ_NUMERIC3_MG"); //MG
player.ship.removeEquipment("EQ_NUMERIC3_SP"); //SP
} else { //clear FW label when the bonus suddenly change to 1 also
player.ship.removeEquipment("EQ_NUMERIC3_FTL"); //FTL
player.ship.removeEquipment("EQ_NUMERIC3_FW"); //FW
player.ship.removeEquipment("EQ_NUMERIC3_MG"); //MG
player.ship.awardEquipment("EQ_NUMERIC3_SP"); //SP
}
}
var f = this.$farplanets;
if( f )
{
if( f.$FarPlanetsBonus > 1 ) // display Micro-G multiplier
{
b = f.$FarPlanetsBonus;
if( f.$FarPlanetsForwarding )
{
if( f.$FarPlanetsForwarding > 1 ) b = Math.floor( f.$FarPlanetsForwarding );
else b = Math.floor( b ); //backward compatibility
player.ship.removeEquipment("EQ_NUMERIC3_FTL"); //FTL
player.ship.awardEquipment("EQ_NUMERIC3_FW"); //FW
player.ship.removeEquipment("EQ_NUMERIC3_MG"); //MG
player.ship.removeEquipment("EQ_NUMERIC3_SP"); //SP
}
else
{
var l = ( b * player.ship.maxSpeed * 32 ) / 299792458; //speed in lightspeed
if( l > 1 || b >= 100000 )
{
//b = Math.round( b / 1000 );
b = Math.floor( l ); //lightspeed
player.ship.awardEquipment("EQ_NUMERIC3_FTL"); //FTL
player.ship.removeEquipment("EQ_NUMERIC3_FW"); //FW
player.ship.removeEquipment("EQ_NUMERIC3_MG"); //MG
player.ship.removeEquipment("EQ_NUMERIC3_SP"); //SP
}
else
{
player.ship.removeEquipment("EQ_NUMERIC3_FTL"); //FTL
player.ship.removeEquipment("EQ_NUMERIC3_FW"); //FW
player.ship.awardEquipment("EQ_NUMERIC3_MG"); //MG
player.ship.removeEquipment("EQ_NUMERIC3_SP"); //SP
}
}
this.numericgaugevalue = b;
}
else if( !fw ) //do not clear FW if set above in torustosun
{
player.ship.removeEquipment("EQ_NUMERIC3_FTL"); //FTL
player.ship.removeEquipment("EQ_NUMERIC3_FW"); //FW
player.ship.removeEquipment("EQ_NUMERIC3_MG"); //MG
player.ship.awardEquipment("EQ_NUMERIC3_SP"); //SP
}
}
this.numericgaugeselector = "SPEED";
if( b || this.numericgaugevalue > player.ship.maxSpeed || (player.ship.script && player.ship.script.name === "rocketships" && Math.floor(player.ship.speed) > player.ship.maxSpeed / 3*2) && (this.numericrocketshipspeed <= 0 || this.numericrocketshipspeed > player.ship.maxSpeed / 3*2) )//any speedup in use
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastspeedcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastspeedvalue === this.numericgaugevalue) && (this.numericgaugelastspeedcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastspeedvalue = this.numericgaugevalue;
this.numericgaugelastspeedcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastspeedvalue = this.numericgaugevalue;
this.numericgaugelastspeedcolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastspeedcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastspeedvalue === this.numericgaugevalue) && (this.numericgaugelastspeedcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastspeedvalue = this.numericgaugevalue;
this.numericgaugelastspeedcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastspeedvalue = this.numericgaugevalue;
this.numericgaugelastspeedcolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareFuelReadout = function()
{
if(this.numericgaugeframecounter !== 1.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 1;
this.numericgaugerightdigits = 1;
this.numericgaugevalue = player.ship.fuel;
this.numericgaugeselector = "FUEL";
if(this.numericgaugevalue >= 1.0)
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastfuelcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastfuelvalue === this.numericgaugevalue) && (this.numericgaugelastfuelcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastfuelvalue = this.numericgaugevalue;
this.numericgaugelastfuelcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastfuelvalue = this.numericgaugevalue;
this.numericgaugelastfuelcolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastfuelcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastfuelvalue === this.numericgaugevalue) && (this.numericgaugelastfuelcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastfuelvalue = this.numericgaugevalue;
this.numericgaugelastfuelcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastfuelvalue = this.numericgaugevalue;
this.numericgaugelastfuelcolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareFuelRequiredReadout = function()
{
if(this.numericgaugeframecounter !== 1.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 1;
this.numericgaugerightdigits = 1;
if(player.ship.isValid)// attach targetSystem directly to this script, so you can remember the 'old' value if ejected...
{
this.t = player.ship.targetSystem;
}
let s = system.info.systemID;
this.numericgaugevalue = System.infoForSystem(galaxyNumber, s).distanceToSystem(System.infoForSystem(galaxyNumber, this.t));
this.numericgaugeselector = "FUELREQUIRED";
if(this.numericgaugevalue > player.ship.fuel)
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastfuelrequiredcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastfuelrequiredvalue === this.numericgaugevalue) && (this.numericgaugelastfuelrequiredcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastfuelrequiredvalue = this.numericgaugevalue;
this.numericgaugelastfuelrequiredcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastfuelrequiredvalue = this.numericgaugevalue;
this.numericgaugelastfuelrequiredcolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastfuelrequiredcolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastfuelrequiredvalue === this.numericgaugevalue) && (this.numericgaugelastfuelrequiredcolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastfuelrequiredvalue = this.numericgaugevalue;
this.numericgaugelastfuelrequiredcolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastfuelrequiredvalue = this.numericgaugevalue;
this.numericgaugelastfuelrequiredcolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareTargetRangeReadout = function()
{
if(this.numericgaugeframecounter !== 1.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 3;
this.numericgaugerightdigits = 3;
this.numericgaugeselector = "TARGETRANGE";
if((player.ship.target) && (player.ship.target.isValid) && (player.ship.equipmentStatus("EQ_SCANNER_SHOW_MISSILE_TARGET") === "EQUIPMENT_OK"))
{
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE");
player.ship.awardEquipment("EQ_NUMERIC3_SWITCHON_TARGETRANGE");
var t = this.$telescope;
if( t && player.ship.target.dataKey == "telescopemarker" ) //get distance over scanner range
{
var ti = t.$TelescopeListi;
var who = t.$TelescopeList[ ti - 1 ];
if( who && who.isValid )
{
var n = player.ship.position.distanceTo( who.position );
if( who.isPlanet || who.isSun ) n -= who.radius;
else n += who.collisionRadius;
if(n >= 1000000 )
{
if( n >= 1000000000 )
{
if( n >= 1000000000000 )
{
if( n >= 1000000000000000 )
{ // display Tera km
n = n / 1000000000000;
player.ship.removeEquipment("EQ_NUMERIC3_TRK"); //K
player.ship.removeEquipment("EQ_NUMERIC3_TRM"); //M
player.ship.removeEquipment("EQ_NUMERIC3_TRG"); //G
player.ship.awardEquipment("EQ_NUMERIC3_TRT"); //T
}
else
{ // display Giga km
n = n / 1000000000;
player.ship.removeEquipment("EQ_NUMERIC3_TRK"); //K
player.ship.removeEquipment("EQ_NUMERIC3_TRM"); //M
player.ship.awardEquipment("EQ_NUMERIC3_TRG"); //G
player.ship.removeEquipment("EQ_NUMERIC3_TRT"); //T
}
}
else
{ // display Mega km
n = n / 1000000;
player.ship.removeEquipment("EQ_NUMERIC3_TRK"); //K
player.ship.awardEquipment("EQ_NUMERIC3_TRM"); //M
player.ship.removeEquipment("EQ_NUMERIC3_TRG"); //G
player.ship.removeEquipment("EQ_NUMERIC3_TRT"); //T
}
}
else
{ // display Kilo km
n = n / 1000;
player.ship.awardEquipment("EQ_NUMERIC3_TRK"); //K
player.ship.removeEquipment("EQ_NUMERIC3_TRM"); //M
player.ship.removeEquipment("EQ_NUMERIC3_TRG"); //G
player.ship.removeEquipment("EQ_NUMERIC3_TRT"); //T
}
}
else
{ // display km
player.ship.removeEquipment("EQ_NUMERIC3_TRK"); //K
player.ship.removeEquipment("EQ_NUMERIC3_TRM"); //M
player.ship.removeEquipment("EQ_NUMERIC3_TRG"); //G
player.ship.removeEquipment("EQ_NUMERIC3_TRT"); //T
}
this.numericgaugevalue = n / 1000;
}
}
else
{
player.ship.removeEquipment("EQ_NUMERIC3_TRK"); //K
player.ship.removeEquipment("EQ_NUMERIC3_TRM"); //M
player.ship.removeEquipment("EQ_NUMERIC3_TRG"); //G
player.ship.removeEquipment("EQ_NUMERIC3_TRT"); //T
this.numericgaugevalue = ((player.ship.position.distanceTo(player.ship.target.position)
- player.ship.target.collisionRadius) / 1000);
}
}
else
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_SWITCHON_TARGETRANGE") === "EQUIPMENT_OK")
{
this.numericgaugelasttargetrangevalue = 0.0;
this.numericgaugecolor = this.numericgaugelasttargetrangecolor;
let c1 = this.numericgaugecolor;
let g2 = this.numericgaugeselector;
for (var counter = 0; counter < 57; counter++)
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2);
}
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2);
}
player.ship.awardEquipment("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE");
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHON_TARGETRANGE");
}
this.numericgaugevalue = 0.0;
this.numericgaugechanged = "FALSE";
return;
}
if(player.ship.target.isWeapon || player.ship.target.isThargoid || player.ship.hasHostileTarget)
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelasttargetrangecolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelasttargetrangevalue === this.numericgaugevalue) && (this.numericgaugelasttargetrangecolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelasttargetrangevalue = this.numericgaugevalue;
this.numericgaugelasttargetrangecolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelasttargetrangevalue = this.numericgaugevalue;
this.numericgaugelasttargetrangecolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelasttargetrangecolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelasttargetrangevalue === this.numericgaugevalue) && (this.numericgaugelasttargetrangecolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelasttargetrangevalue = this.numericgaugevalue;
this.numericgaugelasttargetrangecolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelasttargetrangevalue = this.numericgaugevalue;
this.numericgaugelasttargetrangecolor = this.numericgaugecolor;
return;
}
}
return;
}
this.prepareAltitudeReadout = function()
{
if(this.numericgaugeframecounter !== 1.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 1;
this.numericgaugerightdigits = 2;
this.numericgaugeselector = "ALTITUDE";
if(this.numericcabintemperaturealtitudechangeflag === "ON")
{
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHOFF_ALTITUDE");
player.ship.awardEquipment("EQ_NUMERIC3_SWITCHON_ALTITUDE");
this.numericgaugevalue = this.$altitudeOverClosestCelestialBody()
}
else
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_SWITCHON_ALTITUDE") === "EQUIPMENT_OK")
{
this.numericgaugelastaltitudevalue = 0.0;
this.numericgaugecolor = this.numericgaugelastaltitudecolor;
let c1 = this.numericgaugecolor;
let g2 = this.numericgaugeselector;
for (var counter = 0; counter < 57; counter++)
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2);
}
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2);
}
}
this.numericgaugevalue = 0.0;
this.numericgaugechanged = "FALSE";
return;
}
if(this.numericgaugevalue >= 1.0)
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastaltitudecolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastaltitudevalue === this.numericgaugevalue) && (this.numericgaugelastaltitudecolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastaltitudevalue = this.numericgaugevalue;
this.numericgaugelastaltitudecolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastaltitudevalue = this.numericgaugevalue;
this.numericgaugelastaltitudecolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastaltitudecolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastaltitudevalue === this.numericgaugevalue) && (this.numericgaugelastaltitudecolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastaltitudevalue = this.numericgaugevalue;
this.numericgaugelastaltitudecolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastaltitudevalue = this.numericgaugevalue;
this.numericgaugelastaltitudecolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.prepareCabinTemperatureReadout = function()
{
if(this.numericgaugeframecounter !== 1.0)
{
this.numericgaugechanged = "FALSE";
return;
}
this.numericgaugedrawleftzeroes = "FALSE";
this.numericgaugeleftdigits = 2;
this.numericgaugerightdigits = 0;
this.numericgaugeselector = "CABINTEMPERATURE";
if( player.ship.script && player.ship.script.name === "rocketships" //always show RocketDrive cabintemp increases
|| this.numericcabintemperaturealtitudechangeflag === "ON")
{
this.numericgaugevalue = (player.ship.temperature * 100);
if(this.numericgaugevalue < 23.0)
{// the core game value flickers alot between 22 and 23 so set to 23 min for display
this.numericgaugevalue = 23.0;
}
}
else
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_SWITCHON_ALTITUDE") === "EQUIPMENT_OK")
{
this.numericgaugelastcabintemperaturevalue = 0.0;
this.numericgaugecolor = this.numericgaugelastcabintemperaturecolor;
let c1 = this.numericgaugecolor;
let g2 = this.numericgaugeselector;
for (var counter = 0; counter < 57; counter++)
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2);
}
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2);
}
player.ship.awardEquipment("EQ_NUMERIC3_SWITCHOFF_ALTITUDE");
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHON_ALTITUDE");
}
this.numericgaugevalue = 0.0;
this.numericgaugechanged = "FALSE";
return;
}
if(this.numericgaugevalue <= 25.0)
{
this.numericgaugecolor = "GREEN";
if(this.numericgaugelastcabintemperaturecolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastcabintemperaturevalue === this.numericgaugevalue) && (this.numericgaugelastcabintemperaturecolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastcabintemperaturevalue = this.numericgaugevalue;
this.numericgaugelastcabintemperaturecolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastcabintemperaturevalue = this.numericgaugevalue;
this.numericgaugelastcabintemperaturecolor = this.numericgaugecolor;
return;
}
}
else
{
this.numericgaugecolor = "YELLOW";
if(this.numericgaugelastcabintemperaturecolor === this.numericgaugecolor)
{
this.numericgaugecolorchanged = "FALSE";
}
else
{
this.numericgaugecolorchanged = "TRUE";
}
if((this.numericgaugelastcabintemperaturevalue === this.numericgaugevalue) && (this.numericgaugelastcabintemperaturecolor === this.numericgaugecolor))
{
this.numericgaugechanged = "FALSE";
this.numericgaugelastcabintemperaturevalue = this.numericgaugevalue;
this.numericgaugelastcabintemperaturecolor = this.numericgaugecolor;
return;
}
else
{
this.numericgaugechanged = "TRUE";
this.numericgaugelastcabintemperaturevalue = this.numericgaugevalue;
this.numericgaugelastcabintemperaturecolor = this.numericgaugecolor;
return;
}
return;
}
return;
}
this.displayGaugeDigit1 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugeleftdigits < 5)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_1_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_3_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_4_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_5_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_6_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_7_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_1_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_3_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_4_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_5_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_6_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_7_" + g2);
}
if(g1 >= 90000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
this.numericgaugevalue -= 90000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 80000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
this.numericgaugevalue -= 80000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 70000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);// not needed
this.numericgaugevalue -= 70000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 60000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
this.numericgaugevalue -= 60000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 50000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
this.numericgaugevalue -= 50000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 40000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);// not needed
this.numericgaugevalue -= 40000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 30000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
this.numericgaugevalue -= 30000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 20000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
this.numericgaugevalue -= 20000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 10000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);// not needed
this.numericgaugevalue -= 10000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 < 10000)
{
if(this.numericgaugedrawleftzeroes === "FALSE")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
return;
}
else
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_1_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_2_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_3_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_4_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_5_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_6_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_7_" + g2);
return;
}
return;
}
return;
}
this.displayGaugeDigit2 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugeleftdigits < 4)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_8_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_10_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_11_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_12_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_13_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_14_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_8_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_10_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_11_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_12_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_13_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_14_" + g2);
}
if(g1 >= 9000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
this.numericgaugevalue -= 9000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 8000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
this.numericgaugevalue -= 8000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 7000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);// not needed
this.numericgaugevalue -= 7000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 6000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
this.numericgaugevalue -= 6000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 5000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
this.numericgaugevalue -= 5000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 4000)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);// not needed
this.numericgaugevalue -= 4000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 3000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
this.numericgaugevalue -= 3000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 2000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
this.numericgaugevalue -= 2000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 1000)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);// not needed
this.numericgaugevalue -= 1000;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 < 1000)
{
if(this.numericgaugedrawleftzeroes === "FALSE")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
return;
}
else
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_8_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_9_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_10_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_11_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_12_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_13_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_14_" + g2);
return;
}
return;
}
return;
}
this.displayGaugeDigit3 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugeleftdigits < 3)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_15_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_17_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_18_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_19_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_20_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_21_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_15_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_17_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_18_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_19_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_20_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_21_" + g2);
}
if(g1 >= 900)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
this.numericgaugevalue -= 900;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 800)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
this.numericgaugevalue -= 800;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 700)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);// not needed
this.numericgaugevalue -= 700;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 600)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
this.numericgaugevalue -= 600;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 500)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
this.numericgaugevalue -= 500;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 400)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);// not needed
this.numericgaugevalue -= 400;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 300)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
this.numericgaugevalue -= 300;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 200)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
this.numericgaugevalue -= 200;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 100)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);// not needed
this.numericgaugevalue -= 100;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 < 100)
{
if(this.numericgaugedrawleftzeroes === "FALSE")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
return;
}
else
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_15_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_16_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_17_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_18_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_19_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_20_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_21_" + g2);
return;
}
return;
}
return;
}
this.displayGaugeDigit4 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugeleftdigits < 2)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_22_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_24_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_25_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_26_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_27_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_28_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_22_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_24_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_25_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_26_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_27_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_28_" + g2);
}
if(g1 >= 90)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
this.numericgaugevalue -= 90;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 80)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
this.numericgaugevalue -= 80;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 70)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);// not needed
this.numericgaugevalue -= 70;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 60)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
this.numericgaugevalue -= 60;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 50)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
this.numericgaugevalue -= 50;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 40)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);// not needed
this.numericgaugevalue -= 40;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 30)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
this.numericgaugevalue -= 30;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 20)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
this.numericgaugevalue -= 20;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 >= 10)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);// not needed
this.numericgaugevalue -= 10;
this.numericgaugedrawleftzeroes = "TRUE";
return;
}
if(g1 < 10)
{
if(this.numericgaugedrawleftzeroes === "FALSE")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
return;
}
else
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_22_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_23_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_24_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_25_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_26_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_27_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_28_" + g2);
return;
}
return;
}
return;
}
this.displayGaugeDigit5 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugeleftdigits < 1)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_29_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_30_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_31_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_32_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_33_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_34_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_35_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_29_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_30_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_31_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_32_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_33_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_34_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_35_" + g2);
}
if(g1 >= 9)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);
this.numericgaugevalue -= 9;
return;
}
if(g1 >= 8)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);
this.numericgaugevalue -= 8;
return;
}
if(g1 >= 7)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);// not needed
this.numericgaugevalue -= 7;
return;
}
if(g1 >= 6)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);
this.numericgaugevalue -= 6;
return;
}
if(g1 >= 5)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);
this.numericgaugevalue -= 5;
return;
}
if(g1 >= 4)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);// not needed
this.numericgaugevalue -= 4;
return;
}
if(g1 >= 3)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);
this.numericgaugevalue -= 3;
return;
}
if(g1 >= 2)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);
this.numericgaugevalue -= 2;
return;
}
if(g1 >= 1)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);// not needed
this.numericgaugevalue -= 1;
return;
}
if(g1 < 1)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_29_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_30_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_31_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_32_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_33_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_34_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_35_" + g2);
return;
}
return;
}
this.displayGaugeDigit6 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugerightdigits < 1)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_DECIMAL_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_36_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_37_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_38_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_39_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_40_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_41_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_42_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_DECIMAL_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_36_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_37_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_38_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_39_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_40_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_41_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_42_" + g2);
}
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2);
if(g1 >= 0.9)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);
this.numericgaugevalue -= 0.9;
return;
}
if(g1 >= 0.8)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);
this.numericgaugevalue -= 0.8;
return;
}
if(g1 >= 0.7)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);// not needed
this.numericgaugevalue -= 0.7;
return;
}
if(g1 >= 0.6)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);
this.numericgaugevalue -= 0.6;
return;
}
if(g1 >= 0.5)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);
this.numericgaugevalue -= 0.5;
return;
}
if(g1 >= 0.4)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);// not needed
this.numericgaugevalue -= 0.4;
return;
}
if(g1 >= 0.3)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);
this.numericgaugevalue -= 0.3;
return;
}
if(g1 >= 0.2)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);
this.numericgaugevalue -= 0.2;
return;
}
if(g1 >= 0.1)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);// not needed
this.numericgaugevalue -= 0.1;
return;
}
if(g1 < 0.1)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_36_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_37_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_38_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_39_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_40_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_41_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_42_" + g2);
return;
}
return;
}
this.displayGaugeDigit7 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugerightdigits < 2)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_43_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_44_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_45_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_46_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_47_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_48_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_49_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_43_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_44_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_45_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_46_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_47_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_48_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_49_" + g2);
}
if(g1 >= 0.09)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);
this.numericgaugevalue -= 0.09;
return;
}
if(g1 >= 0.08)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);
this.numericgaugevalue -= 0.08;
return;
}
if(g1 >= 0.07)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);// not needed
this.numericgaugevalue -= 0.07;
return;
}
if(g1 >= 0.06)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);
this.numericgaugevalue -= 0.06;
return;
}
if(g1 >= 0.05)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);
this.numericgaugevalue -= 0.05;
return;
}
if(g1 >= 0.04)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);// not needed
this.numericgaugevalue -= 0.04;
return;
}
if(g1 >= 0.03)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);
this.numericgaugevalue -= 0.03;
return;
}
if(g1 >= 0.02)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);
this.numericgaugevalue -= 0.02;
return;
}
if(g1 >= 0.01)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);// not needed
this.numericgaugevalue -= 0.01;
return;
}
if(g1 < 0.01)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_43_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_44_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_45_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_46_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_47_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_48_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_49_" + g2);
return;
}
return;
}
this.displayGaugeDigit8 = function()
{
if(this.numericgaugechanged === "FALSE")
{
return;
}
if(this.numericgaugerightdigits < 3)
{
return;
}
let g1 = this.numericgaugevalue;
let g2 = this.numericgaugeselector;
let c1 = this.numericgaugecolor;
if((c1 === "YELLOW") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_50_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_51_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_52_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_53_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_54_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_55_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_GREEN_56_" + g2);
}
if((c1 === "GREEN") && (this.numericgaugecolorchanged === "TRUE"))
{
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_50_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_51_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_52_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_53_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_54_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_55_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_YELLOW_56_" + g2);
}
if(g1 >= 0.009)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);
this.numericgaugevalue -= 0.009;
return;
}
if(g1 >= 0.008)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);
this.numericgaugevalue -= 0.008;
return;
}
if(g1 >= 0.007)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);// not needed
this.numericgaugevalue -= 0.007;
return;
}
if(g1 >= 0.006)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);
this.numericgaugevalue -= 0.006;
return;
}
if(g1 >= 0.005)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);
this.numericgaugevalue -= 0.005;
return;
}
if(g1 >= 0.004)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);// not needed
this.numericgaugevalue -= 0.004;
return;
}
if(g1 >= 0.003)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);
this.numericgaugevalue -= 0.003;
return;
}
if(g1 >= 0.002)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);
this.numericgaugevalue -= 0.002;
return;
}
if(g1 >= 0.001)
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);// not needed
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);// not needed
this.numericgaugevalue -= 0.001;
return;
}
if(g1 < 0.001)
{
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_50_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_51_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_52_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_53_" + g2);
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_54_" + g2);
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_55_" + g2);// not needed
player.ship.awardEquipment("EQ_NUMERIC3_" + c1 + "_56_" + g2);
return;
}
return;
}
this.conditionSwitch = function()
{
if(((player.ship.energy >= 64) || (player.alertCondition !== 3)) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALENERGY") === "EQUIPMENT_OK"))
{
player.ship.removeEquipment("EQ_NUMERIC3_CRITICALENERGY");
}
if((player.ship.energy < 64) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALENERGY") !== "EQUIPMENT_OK") && (player.alertCondition === 3))
{
player.ship.awardEquipment("EQ_NUMERIC3_CRITICALENERGY");
}
if(((player.ship.forwardShield >= 64) || (player.alertCondition !== 3)) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALFORWARDSHIELD") === "EQUIPMENT_OK"))
{
player.ship.removeEquipment("EQ_NUMERIC3_CRITICALFORWARDSHIELD");
}
if((player.ship.forwardShield < 64) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALFORWARDSHIELD") !== "EQUIPMENT_OK") && (player.alertCondition === 3))
{
player.ship.awardEquipment("EQ_NUMERIC3_CRITICALFORWARDSHIELD");
}
if(((player.ship.aftShield >= 64) || (player.alertCondition !== 3)) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALAFTSHIELD") === "EQUIPMENT_OK"))
{
player.ship.removeEquipment("EQ_NUMERIC3_CRITICALAFTSHIELD");
}
if((player.ship.aftShield < 64) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALAFTSHIELD") !== "EQUIPMENT_OK") && (player.alertCondition === 3))
{
player.ship.awardEquipment("EQ_NUMERIC3_CRITICALAFTSHIELD");
}
if((((player.ship.temperature * 100) <= 79) || (player.alertCondition !== 3)) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALCABINTEMPERATURE") === "EQUIPMENT_OK"))
{
player.ship.removeEquipment("EQ_NUMERIC3_CRITICALCABINTEMPERATURE");
}
if(((player.ship.temperature * 100) > 79) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALCABINTEMPERATURE") !== "EQUIPMENT_OK") && (player.alertCondition === 3))
{
player.ship.awardEquipment("EQ_NUMERIC3_CRITICALCABINTEMPERATURE");
}
if((((this.numericgaugelastaltitudevalue !== 0.0) && (this.numericgaugelastaltitudevalue >= 0.06)) || (player.alertCondition !== 3)) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALALTITUDE") === "EQUIPMENT_OK"))
{
player.ship.removeEquipment("EQ_NUMERIC3_CRITICALALTITUDE");
}
if(((this.numericgaugelastaltitudevalue !== 0.0) && (this.numericgaugelastaltitudevalue < 0.06)) && (player.ship.equipmentStatus("EQ_NUMERIC3_CRITICALALTITUDE") !== "EQUIPMENT_OK") && (player.alertCondition === 3))
{
player.ship.awardEquipment("EQ_NUMERIC3_CRITICALALTITUDE");
}
return;
}
this.guiScreenChanged = function()
{
if(player.ship.hud.indexOf("numerichud") == -1) return;
if(guiScreen !== "GUI_SCREEN_MAIN")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_IDENTIFICATION");
if(player.ship.equipmentStatus("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid);
}
}
if(guiScreen === "GUI_SCREEN_MAIN")
{
this.$SetHUDSide();//player.ship.hud = "numerichudv3.plist";
return;
}
var v = "-4";
if( this.$With8MFDs ) v = "";
if(guiScreen === "GUI_SCREEN_EQUIP_SHIP")
{
player.ship.hud = "numerichudv3"+v+"computerequip.plist";
return;
}
player.ship.hud = "numerichudv3"+v+"computer.plist";
return;
}
this.$SetHUD = function(hud) { //set the hud if changed only
if( player.ship.hud != hud ) player.ship.hud = hud;
}
this.$SetHUDSide = function() {
if(!player.ship || !player.ship.isValid || !player.ship.hud
|| guiScreen != "GUI_SCREEN_MAIN"
|| player.ship.hud.indexOf("numerichudv3") == -1) return;
if( this.$With8MFDs ) {
// if( player.ship.hud.indexOf("numerichudv3-4") != -1) this.$With8MFDs = false;
// else {
// this.$With8MFDs = true;
if( player.ship.equipmentStatus("EQ_NUMERIC3_W3") === "EQUIPMENT_OK" )
this.$SetHUD("numerichudv3wide.plist");//16:9 wide
else if( player.ship.equipmentStatus("EQ_NUMERIC3_W2") === "EQUIPMENT_OK" )
this.$SetHUD("numerichudv3med.plist");//16:10 medium
else this.$SetHUD("numerichudv3.plist");//4:3
return;
}
if (!player.ship.viewDirection) return;
if (player.ship.viewDirection === "VIEW_AFT")
this.$SetHUD("numerichudv3-4aft.plist");
else if (player.ship.viewDirection === "VIEW_PORT")
this.$SetHUD("numerichudv3-4port.plist");
else if (player.ship.viewDirection === "VIEW_STARBOARD")
this.$SetHUD("numerichudv3-4starboard.plist");
else this.$SetHUD("numerichudv3-4.plist"); //must set in all other case!
}
this.viewDirectionChanged = function()
{
if(player.ship.hud.indexOf("numerichud") == -1) return;
if((player.ship.viewDirection === "VIEW_FORWARD") || (player.ship.viewDirection === "VIEW_AFT") || (player.ship.viewDirection === "VIEW_PORT") || (player.ship.viewDirection === "VIEW_STARBOARD"))
{
this.$SetHUDSide();
player.ship.awardEquipment("EQ_NUMERIC3_MISSILE_IDENTIFICATION");
}
if(player.ship.viewDirection === "VIEW_CUSTOM")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_IDENTIFICATION");
if(player.ship.equipmentStatus("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid);
}
}
}
this.alertConditionChanged = function(newCondition, oldCondition)
{
switch(newCondition)
{
case 0:// condition docked
{
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONYELLOW");
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONRED");
player.ship.awardEquipment("EQ_NUMERIC3_ALERTCONDITIONGREEN");
break;
}
case 1:// condition green
{
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONYELLOW");
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONRED");
player.ship.awardEquipment("EQ_NUMERIC3_ALERTCONDITIONGREEN");
break;
}
case 2:// condition yellow
{
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONGREEN");
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONRED");
player.ship.awardEquipment("EQ_NUMERIC3_ALERTCONDITIONYELLOW");
break;
}
case 3:// condition red
{
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONGREEN");
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONYELLOW");
player.ship.awardEquipment("EQ_NUMERIC3_ALERTCONDITIONRED");
break;
}
}
}
this.equipmentDamaged = this.equipmentDestroyed = function(equipment)
{
if(equipment === "EQ_NUMERIC3_SWITCHON_TARGETRANGE")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_SWITCHON_TARGETRANGE","EQUIPMENT_OK");
return;
}
if(equipment === "EQ_NUMERIC3_SWITCHOFF_TARGETRANGE")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE","EQUIPMENT_OK");
return;
}
if(equipment === "EQ_NUMERIC3_SWITCHON_ALTITUDE")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_SWITCHON_ALTITUDE","EQUIPMENT_OK");
return;
}
if(equipment === "EQ_NUMERIC3_SWITCHOFF_ALTITUDE")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_SWITCHOFF_ALTITUDE","EQUIPMENT_OK");
return;
}
if(equipment === "EQ_NUMERIC3_ALERTCONDITIONGREEN")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_ALERTCONDITIONGREEN","EQUIPMENT_OK");
return;
}
if(equipment === "EQ_NUMERIC3_ALERTCONDITIONYELLOW")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_ALERTCONDITIONYELLOW","EQUIPMENT_OK");
return;
}
if(equipment === "EQ_NUMERIC3_ALERTCONDITIONRED")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_ALERTCONDITIONRED","EQUIPMENT_OK");
return;
}
if(equipment === "EQ_NUMERIC3_MISSILE_IDENTIFICATION")
{
player.ship.setEquipmentStatus("EQ_NUMERIC3_MISSILE_IDENTIFICATION","EQUIPMENT_OK");
return;
}
this.refresh();
}
this.playerBoughtNewShip = function()
{
this.refresh();
}
this.$wideEq = function () {
var p = player.ship;
if(!p) return;
var wide = oolite.gameSettings.gameWindow.width / oolite.gameSettings.gameWindow.height; ///
var wn = 1; //4:3 (default)
if( wide > 1.75 ) wn = 3; //1.77 = 16:9
else if( wide > 1.55 ) wn = 2; //1.6 = 16:10
// log(this.name, "Wide: "+w+" "+wn);//debug
if( wn == 1 ) p.awardEquipment("EQ_NUMERIC3_W1");
else p.removeEquipment("EQ_NUMERIC3_W1");
if( wn == 2 ) p.awardEquipment("EQ_NUMERIC3_W2");
else p.removeEquipment("EQ_NUMERIC3_W2");
if( wn == 3 ) p.awardEquipment("EQ_NUMERIC3_W3");
else p.removeEquipment("EQ_NUMERIC3_W3");
//ASCTarget need Adv.Compass eq also
if( p.equipmentStatus("EQ_ADVANCED_COMPASS") === "EQUIPMENT_OK" ) {
if( wn == 1 ) p.awardEquipment("EQ_NUMERIC3_WA1");
else p.removeEquipment("EQ_NUMERIC3_WA1");
if( wn == 2 ) p.awardEquipment("EQ_NUMERIC3_WA2");
else p.removeEquipment("EQ_NUMERIC3_WA2");
if( wn == 3 ) p.awardEquipment("EQ_NUMERIC3_WA3");
else p.removeEquipment("EQ_NUMERIC3_WA3");
} else {
p.removeEquipment("EQ_NUMERIC3_WA1");
p.removeEquipment("EQ_NUMERIC3_WA2");
p.removeEquipment("EQ_NUMERIC3_WA3");
}
this.$SetHUDSide();
}
this.refresh = function()
{
this.$wideEq(); //narrow or wide scanner
this.numericgaugelastframecounter = this.numericgaugeframecounter;
this.numericgaugeframecounter = 1.0;//normally should be 2 but the counter will add 1 when it goes to prepareForwardShield function, remark just to avoid confusion
this.prepareForwardShieldReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit3();
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.numericgaugeframecounter = 2.0;// Forward Shield Capacitor
this.prepareForwardShieldCapacitorReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit3();
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.numericgaugeframecounter = 2.0;
this.prepareAftShieldReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit3();
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.numericgaugeframecounter = 2.0;// Aft Shield Capacitor
this.prepareAftShieldCapacitorReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit3();
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.numericgaugeframecounter = 1.0;
this.prepareEnergyReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit2();
this.displayGaugeDigit3();
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.numericgaugeframecounter = 2.0;
this.prepareSpeedReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit1();
this.displayGaugeDigit2();
this.displayGaugeDigit3();
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.numericgaugeframecounter = 1.0;
this.prepareFuelReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit5();
this.displayGaugeDigit6();
this.numericgaugeframecounter = 1.0;
this.prepareFuelRequiredReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit5();
this.displayGaugeDigit6();
this.numericgaugeframecounter = 1.0;
this.prepareTargetRangeReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit3();
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.displayGaugeDigit6();
this.displayGaugeDigit7();
this.displayGaugeDigit8();
this.numericgaugeframecounter = 1.0;
this.prepareAltitudeReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit5();
this.displayGaugeDigit6();
this.displayGaugeDigit7();
this.numericgaugeframecounter = 1.0;
this.prepareCabinTemperatureReadout();
this.numericgaugechanged = "TRUE";
this.displayGaugeDigit4();
this.displayGaugeDigit5();
this.numericgaugeframecounter = this.numericgaugelastframecounter;
}
this.playerWillSaveGame = function()
{
this.cleanUp();
}
this.cleanUp = function()
{
delete missionVariables.numerichudv3missileid;
this.numericgaugeselector = "FORWARDSHIELD";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "FORWARDSHIELDCAPACITOR";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "AFTSHIELD";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "AFTSHIELDCAPACITOR";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "ENERGY";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "SPEED";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "FUEL";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "FUELREQUIRED";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "TARGETRANGE";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "ALTITUDE";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.numericgaugeselector = "CABINTEMPERATURE";
this.numericgaugecolor = "GREEN";
this.removeLeftovers();
this.numericgaugecolor = "YELLOW";
this.removeLeftovers();
this.removeExtraLeftovers();
}
this.removeLeftovers = function()
{
let c1 = this.numericgaugecolor;
let g2 = this.numericgaugeselector;
for (var counter = 0; counter < 57; counter++)
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_" + counter + "_" + g2);
}
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_" + c1 + "_DECIMAL_" + g2);
}
}
this.removeExtraLeftovers = function()
{
for (var counter = 0; counter < 17; counter++)
{
if(player.ship.equipmentStatus("EQ_NUMERIC3_MISSILE_PYLONID_" + counter) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_PYLONID_" + counter);
}
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_MISSILE_IDENTIFICATION") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_IDENTIFICATION");
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE");
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_SWITCHON_TARGETRANGE") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHON_TARGETRANGE");
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_SWITCHOFF_ALTITUDE") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHOFF_ALTITUDE");
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_SWITCHON_ALTITUDE") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHON_ALTITUDE");
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_ALERTCONDITIONGREEN") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONGREEN");
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_ALERTCONDITIONYELLOW") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONYELLOW");
}
if(player.ship.equipmentStatus("EQ_NUMERIC3_ALERTCONDITIONRED") === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONRED");
}
}
this.shipDied = function()
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_IDENTIFICATION");
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE");
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHON_TARGETRANGE");
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHOFF_ALTITUDE");
player.ship.removeEquipment("EQ_NUMERIC3_SWITCHON_ALTITUDE");
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONGREEN");
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONYELLOW");
player.ship.removeEquipment("EQ_NUMERIC3_ALERTCONDITIONRED");
/*
removeFrameCallback(this.pfsr);//----------
removeFrameCallback(this.pfsrdgd3);
removeFrameCallback(this.pfsrdgd4);
removeFrameCallback(this.pfsrdgd5);
removeFrameCallback(this.pfscr);//----------
removeFrameCallback(this.pfscrdgd3);
removeFrameCallback(this.pfscrdgd4);
removeFrameCallback(this.pfscrdgd5);
removeFrameCallback(this.pasr);//----------
removeFrameCallback(this.pasrdgd3);
removeFrameCallback(this.pasrdgd4);
removeFrameCallback(this.pasrdgd5);
removeFrameCallback(this.pascr);//----------
removeFrameCallback(this.pascrdgd3);
removeFrameCallback(this.pascrdgd4);
removeFrameCallback(this.pascrdgd5);
removeFrameCallback(this.per);//----------
removeFrameCallback(this.perdgd2);
removeFrameCallback(this.perdgd3);
removeFrameCallback(this.perdgd4);
removeFrameCallback(this.perdgd5);
removeFrameCallback(this.psr);//----------
removeFrameCallback(this.psrdgd1);
removeFrameCallback(this.psrdgd2);
removeFrameCallback(this.psrdgd3);
removeFrameCallback(this.psrdgd4);
removeFrameCallback(this.psrdgd5);
removeFrameCallback(this.pfr);//----------
removeFrameCallback(this.pfrdgd5);
removeFrameCallback(this.pfrdgd6);
removeFrameCallback(this.pfrr);//----------
removeFrameCallback(this.pfrrdgd5);
removeFrameCallback(this.pfrrdgd6);
removeFrameCallback(this.ptrr);//----------
removeFrameCallback(this.ptrrdgd3);
removeFrameCallback(this.ptrrdgd4);
removeFrameCallback(this.ptrrdgd5);
removeFrameCallback(this.ptrrdgd6);
removeFrameCallback(this.ptrrdgd7);
removeFrameCallback(this.ptrrdgd8);
removeFrameCallback(this.par);//----------
removeFrameCallback(this.pardgd5);
removeFrameCallback(this.pardgd6);
removeFrameCallback(this.pardgd7);
removeFrameCallback(this.pctr);//----------
removeFrameCallback(this.pctrdgd4);
removeFrameCallback(this.pctrdgd5);
*/
if( isValidFrameCallback( this.cs ) ) removeFrameCallback(this.cs);//----------
if(this.numericgaugeCheckTimer)
{
this.numericgaugeCheckTimer.stop();
if(this.numericgaugeCheckTimer2) this.numericgaugeCheckTimer2.stop();
if(this.numericgaugeCheckTimer3) this.numericgaugeCheckTimer3.stop();
}
} |
Scripts/numerichudv3_eta.js |
"use strict";
this.name = "aad-hud_eta";
this.author = "Spara";
this.copyright = "2013 Mika Spåra";
this.licence = "CC BY-NC-SA 3.0";
this.description = "Digital eta display";
this.version = "2.1";
//2.1 variable to toggle status yellow display on or off
//2.1 bugfix on digit 8
this.startUp = function() {
//User variables start here
this.$showEtaOnYellow = true;//Show ETA on condition yellow
//User variables end here
this.$cond = "";//player condition flag
this.$prevDigits = [];//array for previously drawn digits so that only changed digits are drawnp
}
//Turn ETA on, if switching to main screen and not docked.
this.guiScreenChanged = function(to, from) {
if (player.ship.docked) return;
if (to === "GUI_SCREEN_MAIN") this.$showEta();
else {
this.$stopTimer();
this.$hideEta();
}
}
//Turn ETA off when entering hyperspace or docking
this.shipWillEnterWitchspace = this.shipWillDockWithStation = function() {
this.$stopTimer();
this.$hideEta();
}
//Handle different conditions and eta
this.alertConditionChanged = function(newCondition, oldCondition) {
this.$cond = "";//yellow condition
if (newCondition === 1) this.$cond = "G";//green condition
//switch to condition green or yellow state, turn on eta
if (oldCondition !== 0 && (newCondition === 1 || newCondition === 2)) {
this.$showEta();
}
//switch to condition red, turn off eta
if ((oldCondition === 1 || oldCondition === 2) && newCondition === 3) {
this.$stopTimer();
this.$hideEta();
}
}
//Turn ETA on.
this.shipLaunchedFromStation = this.shipExitedWitchspace = this.$showEta = function() {
if (player.alertCondition === 2 && !this.$showEtaOnYellow) {
this.$stopTimer();
this.$hideEta();
return;
}
if (player.ship.equipmentStatus("EQ_ADVANCED_COMPASS") === "EQUIPMENT_OK" && guiScreen === "GUI_SCREEN_MAIN") {
this.$stopTimer();
this.$prevDigits = [];
this.$blankEta();
this.$startTimer();
}
}
//Empty ETA
this.$blankEta = function() {
if (this.$prevDigits[0] === -1) return;
this.$hideEta();
var i;
for (i = 0; i < 6; i++)
player.ship.awardEquipment("EQ_AADHUD_"+i+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_DOTS"+this.$cond);
this.$prevDigits = [-1,-1,-1,-1,-1,-1];//-1 stands for --:--:--
}
//Remove ETA from screen
this.$hideEta = function() {
var i, j;
player.ship.removeEquipment("EQ_AADHUD_DOTS");
player.ship.removeEquipment("EQ_AADHUD_DOTSG");
for (i = 0; i < 6; i++) {
for (j = 0; j < 7; j++) {
player.ship.removeEquipment("EQ_AADHUD_"+i+j);
player.ship.removeEquipment("EQ_AADHUD_"+i+j+"G");
}
}
this.$prevDigits = [];//zero size array stands for removed eta
}
//Handle drawing digits
this.$displayDigit = function(place, digit) { //place = 0, 1, 2, 3, 4 or 5
if (this.$prevDigits[place] === digit) return;
else this.$prevDigits[place] = digit;
switch(digit) {
case 1:
player.ship.removeEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 2:
player.ship.removeEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 3:
player.ship.removeEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 4:
player.ship.awardEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 5:
player.ship.awardEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 6:
player.ship.awardEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 7:
player.ship.removeEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 8:
player.ship.awardEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 9:
player.ship.awardEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
case 0:
player.ship.awardEquipment("EQ_AADHUD_"+place+"0"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"1"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"2"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"3"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"4"+this.$cond);
player.ship.removeEquipment("EQ_AADHUD_"+place+"5"+this.$cond);
player.ship.awardEquipment("EQ_AADHUD_"+place+"6"+this.$cond);
break;
}
}
//eta calculations
this.$updateEta = function() {
if (!player.ship.compassTarget) {
this.$hideEta();
this.$stopTimer();
return;
}
var compTarget = player.ship.compassTarget;
var distInM = player.ship.position.distanceTo(compTarget) - compTarget.collisionRadius;
var vPtoT = compTarget.position.subtract(player.ship.position);
if (player.ship.velocity.dot(vPtoT) > 0.1 && distInM > 0) {
var vVelPtoT = vPtoT.multiply(player.ship.velocity.dot(vPtoT) / (vPtoT.dot(vPtoT)));
var timeToTarget = Math.floor(distInM / vVelPtoT.magnitude());
if (timeToTarget > 356400) {//case where time is > 99 h.
this.$blankEta();
return;
}
var hours = Math.floor(timeToTarget / 3600);
var mins = Math.floor((timeToTarget - 3600 * hours) / 60);
var secs = Math.floor(timeToTarget - hours * 3600 - mins * 60);
var tens = Math.floor(hours / 10);
var ones = hours - tens * 10;
this.$displayDigit(0, tens);
this.$displayDigit(1, ones);
tens = Math.floor(mins / 10);
ones = mins - tens * 10;
this.$displayDigit(2, tens);
this.$displayDigit(3, ones);
tens = Math.floor(secs / 10);
ones = secs - tens * 10;
this.$displayDigit(4, tens);
this.$displayDigit(5, ones);
}
else this.$blankEta();
}
//hide eta, if ASC gets damaged
this.equipmentDamaged = this.equipmentDestroyed = function(equipment) {
if (equipment === "EQ_ADVANCED_COMPASS") {
this.$hideEta();
this.$stopTimer();
}
}
//show eta, if ASC gets repaired
this.equipmentRepaired = function(equipment) {
if (equipment === "EQ_ADVANCED_COMPASS" && !player.ship.docked) {
this.$showEta();
}
}
//Timer functions
this.$startTimer = function() {
if (!this.$etaTimer)
this.$etaTimer = new Timer(this, this.$updateEta, 0, 1);
else this.$etaTimer.start();
};
this.$stopTimer = function() {
if (this.$etaTimer) {
this.$etaTimer.stop();
delete this.$etaTimer;
}
};
|
Scripts/numerichudv3missileid.js |
"use strict";
this.name = "numerichudv3missileid.js";
this.author = "CommonSenseOTB";
this.copyright = "Copyright Apr. 21, 2012 by CommonSenseOTB, licensed under Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "NumericHUDv3 missile identification script";
this.version = "3";
this.activated = function()
{
if(player.ship.missiles.length === 0.0)
{
return;
}
if(missionVariables.numerichudv3missileid === null)
{
missionVariables.numerichudv3missileid = 0.0;//should be 0.0 and should have remove equipment on a timer perhaps
}
if(this.numerichudv3missileidcounter === null)
{
this.numerichudv3missileidcounter = 1.0;
}
if(this.numerichudv3missileidCheckTimer)
{
this.numerichudv3missileidCheckTimer.stop();
this.numerichudv3missileidcounter = 1.0;
if(player.ship.equipmentStatus("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid);
}
}
missionVariables.numerichudv3missileid += 1.0;
if((missionVariables.numerichudv3missileid > (player.ship.missiles.length)) && ((player.ship.missiles.length) > 0.0))
{
missionVariables.numerichudv3missileid = 1.0;
}
player.ship.awardEquipment("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid);
player.consoleMessage("Missile Pylon" + missionVariables.numerichudv3missileid + ": " + player.ship.missiles[missionVariables.numerichudv3missileid - 1].name, 6);
if(this.numerichudv3missileidCheckTimer)
{
this.numerichudv3missileidCheckTimer.start();
}
else
{
this.numerichudv3missileidCheckTimer = new Timer(this, this.numerichudv3missileidCheck,0,1);// use a timer to pause the pylon surround removal
}
}
this.numerichudv3missileidCheck = function()
{
this.numerichudv3missileidcounter += 1.0;
if(this.numerichudv3missileidcounter > 12.0)
{
this.numerichudv3missileidCheckTimer.stop();
this.numerichudv3missileidcounter = 1.0;
if(player.ship.equipmentStatus("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid) === "EQUIPMENT_OK")
{
player.ship.removeEquipment("EQ_NUMERIC3_MISSILE_PYLONID_" + missionVariables.numerichudv3missileid);
}
}
}
|