Page 1 of 2

Trying to merge Chupacabra.oxp and NumericHUD.oxp for myself

Posted: Fri Dec 13, 2013 1:42 pm
by Zireael
I almost got the two to work (the chupa HUD is displayed but is non-functional).
I tried to make it functional, but I failed when it came to merging the JavaScript stuff. Alas my JavaScript coding isn't that good.

I've saved the js file as txt so that I could send it here, but I can't see any attachment options on the board.

For now it's just for myself, but as I saw in the readme, CSOB allows merging, so if I make it work, I could probably put it online for you to use.

For now, HEELP!

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 2:38 pm
by JazHaz
Zireael wrote:
I've saved the js file as txt so that I could send it here, but I can't see any attachment options on the board.
No attachments allowed. However if you use the Code tags, you can paste source code into a message.

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 2:48 pm
by Zireael
Here's the offending file after my attempts to merge (split in parts due to message character limit):

Code: Select all

this.startUp = function()
   {
   // DO NOT TOUCH THESE PLEASE
   //
   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.shipWillLaunchFromStation = function()
   {
   player.ship.hud = "numerichudv3.plist";
   this.cleanUp();
   this.refresh();
   player.ship.awardEquipment("EQ_NUMERIC3_SWITCHOFF_TARGETRANGE");
   player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_SECONDARY");
   player.ship.awardEquipment("EQ_NUMERIC3_MISSILE_IDENTIFICATION");
   if(!this.$altitudeOverClosestCelestialBody())
      {
      this.numericcabintemperaturealtitudechangeflag = "OFF";
      }
   else
      {
      this.numericcabintemperaturealtitudechangeflag = "ON";
      }
   if((worldScripts.shieldequalizercapacitors) && (worldScripts.shieldequalizercapacitors.togglesoundfx2 === "ON"))
      {
	  worldScripts.shieldequalizercapacitors.togglesoundfx2 = "OFF";//if you prefer the countdown timer and alarm then set to "ON"
	  }
   if((worldScripts.shieldequalizercapacitors) && (worldScripts.shieldequalizercapacitors.togglemessages === "ON"))
      {
	  worldScripts.shieldequalizercapacitors.togglemessages = "OFF";//if you prefer the messages then set to "ON"
	  }
   this.pfsr = addFrameCallback(this.prepareForwardShieldReadout.bind(this));//---------- 
   this.pfsrdg = addFrameCallback(this.displayGauge.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.pfscrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
   this.pfscrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
   this.pasr = addFrameCallback(this.prepareAftShieldReadout.bind(this));//----------
   this.pasrdg = addFrameCallback(this.displayGauge.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.pascrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
   this.pascrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
   this.per = addFrameCallback(this.prepareEnergyReadout.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.psrdg = addFrameCallback(this.displayGauge.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.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();
      }
   else
      {
      this.numericgaugeCheckTimer = new Timer(this, this.numericgaugeCheck,0,0.25);// use a timer to update the numeric gauge flash counter
      }
   }	
   
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.pfscrdgd4);
	  removeFrameCallback(this.pfscrdgd5);
	  removeFrameCallback(this.pasr);//----------
	  removeFrameCallback(this.pasrdgd3);
	  removeFrameCallback(this.pasrdgd4);
	  removeFrameCallback(this.pasrdgd5);
	  removeFrameCallback(this.pascr);//----------
	  removeFrameCallback(this.pascrdgd4);
	  removeFrameCallback(this.pascrdgd5);
	  removeFrameCallback(this.per);//----------
	  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);
	  removeFrameCallback(this.cs);//----------
	  this.numericgaugeCheckTimer.stop();
      }
   else
      {
	  this.numericgaugeflashcounter += 1.0;
	  if(this.numericgaugeflashcounter > 8.0)
	     {
		 this.numericgaugeflashcounter = 1.0;
		 return;
		 }
      return;		 
      }
   return;
   }
   
this.shipWillEnterWitchspace = function()
   {
   player.ship.hud = "numerichudv3.plist";
   removeFrameCallback(this.pfsr);//----------
   removeFrameCallback(this.pfsrdgd3);
   removeFrameCallback(this.pfsrdgd4);
   removeFrameCallback(this.pfsrdgd5);
   removeFrameCallback(this.pfscr);//----------
   removeFrameCallback(this.pfscrdgd4);
   removeFrameCallback(this.pfscrdgd5);
   removeFrameCallback(this.pasr);//----------
   removeFrameCallback(this.pasrdgd3);
   removeFrameCallback(this.pasrdgd4);
   removeFrameCallback(this.pasrdgd5);
   removeFrameCallback(this.pascr);//----------
   removeFrameCallback(this.pascrdgd4);
   removeFrameCallback(this.pascrdgd5);
   removeFrameCallback(this.per);//----------
   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);
   removeFrameCallback(this.cs);//----------
   this.numericgaugeCheckTimer.stop();
   }
   
this.shipExitedWitchspace = function()
   {
   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.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.pascrdgd4 = addFrameCallback(this.displayGaugeDigit4.bind(this));
   this.pascrdgd5 = addFrameCallback(this.displayGaugeDigit5.bind(this));
   this.per = addFrameCallback(this.prepareEnergyReadout.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.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();
      }
   else
      {
      this.numericgaugeCheckTimer = new Timer(this, this.numericgaugeCheck,0,0.25);// use a timer to update the numeric gauge flash counter
      }
   }   

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)
      {
      return entity.isSun || entity.isPlanet
      }
   var closestCelestialBody = system.filteredEntities(this, $isCelestialBody, player.ship)[0];
   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;
      }	  
   }
  

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 2:49 pm
by Zireael

Code: Select all

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;
	  }
   //Chupa stuff
   this.chupacabragaugevalue = ((player.ship.forwardShield / player.ship.maxForwardShield) * 40);
   mfs = 40;
   this.chupacabragaugeselector = "FORWARDSHIELD";
   if(this.chupacabragaugevalue < (mfs * 0.25))
   {
      if((this.chupacabragaugeflashcounter === 1.0) || (this.chupacabragaugeflashcounter === 3.0) || (this.chupacabragaugeflashcounter === 5.0) || (this.chupacabragaugeflashcounter === 7.0))// flash fast
		 {
         this.chupacabragaugecolor = "GREEN";
		 if(this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
		 if((this.chupacabragaugelastforwardshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugecolorchanged = "FALSE";
			this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
            return;
			}
         }
      else
         {
         this.chupacabragaugecolor = "YELLOW";
		 if(this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
		 if((this.chupacabragaugelastforwardshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
            return;
			}
         }
      }
   if(this.chupacabragaugevalue > (mfs * 0.8))
      {
      this.chupacabragaugecolor = "GREEN";
	  if(this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor)
		 {
         this.chupacabragaugecolorchanged = "FALSE";
         }
      else
		 {
         this.chupacabragaugecolorchanged = "TRUE";
         }
	  if((this.chupacabragaugelastforwardshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor))
		 {
         this.chupacabragaugechanged = "FALSE";
		 this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
         return;
         }
      else
         {
         this.chupacabragaugechanged = "TRUE";
		 this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
         return;
         }
      }
   else
      {
      this.chupacabragaugecolor = "YELLOW";
	  if(this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor)
		 {
         this.chupacabragaugecolorchanged = "FALSE";
         }
      else
		 {
         this.chupacabragaugecolorchanged = "TRUE";
         }
	  if((this.chupacabragaugelastforwardshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastforwardshieldcolor === this.chupacabragaugecolor))
		 {
         this.chupacabragaugechanged = "FALSE";
		 this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
         return;
         }
      else
		 {
         this.chupacabragaugechanged = "TRUE";
		 this.chupacabragaugelastforwardshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastforwardshieldcolor = this.chupacabragaugecolor;
         return;
         }
      return;
      }
   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 = 2;
   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(worldScripts["shieldequalizercapacitors"])
      {
      if(worldScripts["shieldequalizercapacitors"].secforwardshieldcapacitor > 0.0)// set forward shield capacitor value
         {
	     this.numericgaugevalue = (worldScripts["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.chupacabragaugevalue = ((player.ship.aftShield / player.ship.maxAftShield) * 40);
   mas = 40;
   this.chupacabragaugeselector = "AFTSHIELD";
   if(this.chupacabragaugevalue < (mas * 0.25))
      {
	  if((this.chupacabragaugeflashcounter === 1.0) || (this.chupacabragaugeflashcounter === 3.0) || (this.chupacabragaugeflashcounter === 5.0) || (this.chupacabragaugeflashcounter === 7.0))// flash fast
		 {
         this.chupacabragaugecolor = "GREEN";
		 if(this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastaftshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
            return;
			}
         }
      else
         {
         this.chupacabragaugecolor = "YELLOW";
		 if(this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastaftshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
            return;
			}
         }
      }
   if(this.chupacabragaugevalue > (mas * 0.8))
      {
      this.chupacabragaugecolor = "GREEN";
	  if(this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor)
		 {
         this.chupacabragaugecolorchanged = "FALSE";
         }
      else
		 {
         this.chupacabragaugecolorchanged = "TRUE";
         }
	  if((this.chupacabragaugelastaftshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor))
		 {
         this.chupacabragaugechanged = "FALSE";
         this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
         return;
         }
      else
		 {
         this.chupacabragaugechanged = "TRUE";
         this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
         return;
         }
      }
   else
      {
      this.chupacabragaugecolor = "YELLOW";
	  if(this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor)
		 {
         this.chupacabragaugecolorchanged = "FALSE";
         }
      else
		 {
         this.chupacabragaugecolorchanged = "TRUE";
         }
	  if((this.chupacabragaugelastaftshieldvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastaftshieldcolor === this.chupacabragaugecolor))
		 {
         this.chupacabragaugechanged = "FALSE";
         this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
         return;
         }
      else
		 {
         this.chupacabragaugechanged = "TRUE";
         this.chupacabragaugelastaftshieldvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastaftshieldcolor = this.chupacabragaugecolor;
         return;
         }
      return;
      }
   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 = 2;
   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(worldScripts["shieldequalizercapacitors"])
      {
      if(worldScripts["shieldequalizercapacitors"].secaftshieldcapacitor > 0.0)// set aft shield capacitor value
         {
	     this.numericgaugevalue = (worldScripts["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 = 3;
   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.prepareSpeedReadout = function()
   {
   if(this.numericgaugeframecounter !== 2.0)
      {
      this.numericgaugechanged = "FALSE";
	  return;
	  }
	  
   this.chupacabragaugevalue = ((player.ship.speed / player.ship.maxSpeed) * 40);
   ms = 40;
   this.chupacabragaugeselector = "SPEED";
   if(this.chupacabragaugevalue > (ms * 7))
      {
      if((this.chupacabragaugeflashcounter === 1.0) || (this.chupacabragaugeflashcounter === 3.0) || (this.chupacabragaugeflashcounter === 5.0) || (this.chupacabragaugeflashcounter === 7.0))// flash fast
		 {
         this.chupacabragaugecolor = "GREEN";
		 if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
            return;
			}
         }
      else
         {
         this.chupacabragaugecolor = "YELLOW";
		 if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
            return;
			}
         }
      }
   if(this.chupacabragaugevalue > ms)
      {
	  if((this.chupacabragaugeflashcounter === 1.0) || (this.chupacabragaugeflashcounter === 2.0) || (this.chupacabragaugeflashcounter === 5.0) || (this.chupacabragaugeflashcounter === 6.0))// flash medium
		 {
         this.chupacabragaugecolor = "GREEN";
		 if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
            return;
			}
         }
      else
         {
         this.chupacabragaugecolor = "YELLOW";
		 if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
            return;
			}
         }
      }
   if(this.chupacabragaugevalue > (ms * 0.8))
      {
	  if(this.chupacabragaugeflashcounter <= 4.0)// flash slow
         {
         this.chupacabragaugecolor = "GREEN";
		 if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
            return;
			}
         }
      else
         {
         this.chupacabragaugecolor = "YELLOW";
		 if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
		    {
			this.chupacabragaugecolorchanged = "FALSE";
			}
         else
		    {
			this.chupacabragaugecolorchanged = "TRUE";
			}
         if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		    {
			this.chupacabragaugechanged = "FALSE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
			return;
			}
         else
		    {
			this.chupacabragaugechanged = "TRUE";
			this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
			this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
            return;
			}
         }
      }
   if(player.ship.speed <= 85)
      {
      this.chupacabragaugecolor = "GREEN";
	  if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
         {
         this.chupacabragaugecolorchanged = "FALSE";
         }
      else
		 {
         this.chupacabragaugecolorchanged = "TRUE";
         }
	  if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		 {
         this.chupacabragaugechanged = "FALSE";
         this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
         return;
         }
      else
         {
         this.chupacabragaugechanged = "TRUE";
         this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
         return;
         }
      }
   else
      {
      this.chupacabragaugecolor = "YELLOW";
	  if(this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor)
         {
         this.chupacabragaugecolorchanged = "FALSE";
         }
      else
		 {
         this.chupacabragaugecolorchanged = "TRUE";
         }
	  if((this.chupacabragaugelastspeedvalue === this.chupacabragaugevalue) && (this.chupacabragaugelastspeedcolor === this.chupacabragaugecolor))
		 {
         this.chupacabragaugechanged = "FALSE";
         this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
         return;
         }
      else
         {
         this.chupacabragaugechanged = "TRUE";
         this.chupacabragaugelastspeedvalue = this.chupacabragaugevalue;
         this.chupacabragaugelastspeedcolor = this.chupacabragaugecolor;
         return;
         }
      return;
      }
   return;	  
   }

   this.numericgaugedrawleftzeroes = "TRUE";
   this.numericgaugeleftdigits = 5;
   this.numericgaugerightdigits = 0;
   this.numericgaugevalue = player.ship.speed;
   if(worldScripts["Q-Charger"])
      {
      if(worldScripts["Q-Charger"].qchargercondition === "ON")// display Q-Charger speed
         {
	     this.numericgaugevalue = (player.ship.maxSpeed * 2);
	     }
      }
   this.numericgaugeselector = "SPEED";
   if(this.numericgaugevalue > player.ship.maxSpeed)
      {
      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 = "TRUE";
   this.numericgaugeleftdigits = 2;
   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");
      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 (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 (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(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 (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;	  
   }


Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 2:50 pm
by Zireael

Code: Select all

 this.displayGauge = function()
   {
   if(this.chupacabragaugechanged === "FALSE")
      {
	  return;
	  } 
   let g1 = this.chupacabragaugevalue;
   let g2 = this.chupacabragaugeselector;
   let c1 = this.chupacabragaugecolor;
   if((c1 === "YELLOW") && (this.chupacabragaugecolorchanged === "TRUE"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_1_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_2_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_3_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_4_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_5_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_6_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_7_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_8_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_9_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_10_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_11_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_12_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_13_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_14_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_15_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_16_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_17_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_18_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_19_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_20_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_21_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_22_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_23_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_24_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_25_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_26_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_27_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_28_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_29_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_30_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_31_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_32_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_33_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_34_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_35_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_36_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_37_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_38_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_39_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_GREEN_40_" + g2);      
      }
   if((c1 === "GREEN") && (this.chupacabragaugecolorchanged === "TRUE"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_1_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_2_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_3_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_4_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_5_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_6_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_7_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_8_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_9_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_10_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_11_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_12_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_13_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_14_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_15_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_16_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_17_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_18_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_19_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_20_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_21_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_22_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_23_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_24_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_25_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_26_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_27_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_28_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_29_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_30_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_31_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_32_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_33_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_34_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_35_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_36_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_37_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_38_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_39_" + g2);
	  player.ship.removeEquipment("EQ_CHUPACABRA_YELLOW_40_" + g2);      
      }		  
   if((g1 > 1) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_1_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_1_" + g2);
	  }
   if((g1 <= 1) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_1_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_1_" + g2);
	  }
   if((g1 > 2) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_2_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_2_" + g2);
	  }
   if((g1 <= 2) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_2_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_2_" + g2);
	  }
   if((g1 > 3) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_3_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_3_" + g2);
	  }
   if((g1 <= 3) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_3_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_3_" + g2);
	  }
   if((g1 > 4) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_4_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_4_" + g2);
	  }
   if((g1 <= 4) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_4_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_4_" + g2);
	  }
   if((g1 > 5) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_5_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_5_" + g2);
	  }
   if((g1 <= 5) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_5_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_5_" + g2);
	  }
   if((g1 > 6) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_6_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_6_" + g2);
	  }
   if((g1 <= 6) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_6_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_6_" + g2);
	  }
   if((g1 > 7) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_7_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_7_" + g2);
	  }
   if((g1 <= 7) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_7_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_7_" + g2);
	  }
   if((g1 > 8) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_8_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_8_" + g2);
	  }
   if((g1 <= 8) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_8_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_8_" + g2);
	  }
   if((g1 > 9) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_9_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_9_" + g2);
	  }
   if((g1 <= 9) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_9_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_9_" + g2);
	  }
   if((g1 > 10) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_10_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_10_" + g2);
	  }
   if((g1 <= 10) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_10_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_10_" + g2);
	  }
   if((g1 > 11) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_11_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_11_" + g2);
	  }
   if((g1 <= 11) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_11_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_11_" + g2);
	  }
   if((g1 > 12) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_12_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_12_" + g2);
	  }
   if((g1 <= 12) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_12_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_12_" + g2);
	  }
   if((g1 > 13) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_13_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_13_" + g2);
	  }
   if((g1 <= 13) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_13_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_13_" + g2);
	  }
   if((g1 > 14) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_14_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_14_" + g2);
	  }
   if((g1 <= 14) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_14_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_14_" + g2);
	  }
   if((g1 > 15) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_15_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_15_" + g2);
	  }
   if((g1 <= 15) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_15_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_15_" + g2);
	  }
   if((g1 > 16) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_16_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_16_" + g2);
	  }
   if((g1 <= 16) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_16_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_16_" + g2);
	  }
   if((g1 > 17) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_17_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_17_" + g2);
	  }
   if((g1 <= 17) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_17_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_17_" + g2);
	  }
   if((g1 > 18) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_18_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_18_" + g2);
	  }
   if((g1 <= 18) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_18_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_18_" + g2);
	  }
   if((g1 > 19) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_19_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_19_" + g2);
	  }
   if((g1 <= 19) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_19_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_19_" + g2);
	  }
   if((g1 > 20) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_20_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_20_" + g2);
	  }
   if((g1 <= 20) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_20_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_20_" + g2);
	  }
   if((g1 > 21) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_21_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_21_" + g2);
	  }
   if((g1 <= 21) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_21_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_21_" + g2);
	  }
   if((g1 > 22) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_22_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_22_" + g2);
	  }
   if((g1 <= 22) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_22_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_22_" + g2);
	  }
   if((g1 > 23) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_23_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_23_" + g2);
	  }
   if((g1 <= 23) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_23_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_23_" + g2);
	  }
   if((g1 > 24) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_24_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_24_" + g2);
	  }
   if((g1 <= 24) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_24_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_24_" + g2);
	  }
   if((g1 > 25) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_25_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_25_" + g2);
	  }
   if((g1 <= 25) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_25_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_25_" + g2);
	  }
   if((g1 > 26) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_26_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_26_" + g2);
	  }
   if((g1 <= 26) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_26_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_26_" + g2);
	  }
   if((g1 > 27) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_27_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_27_" + g2);
	  }
   if((g1 <= 27) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_27_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_27_" + g2);
	  }
   if((g1 > 28) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_28_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_28_" + g2);
	  }
   if((g1 <= 28) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_28_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_28_" + g2);
	  }
   if((g1 > 29) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_29_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_29_" + g2);
	  }
   if((g1 <= 29) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_29_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_29_" + g2);
	  }
   if((g1 > 30) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_30_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_30_" + g2);
	  }
   if((g1 <= 30) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_30_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_30_" + g2);
	  }
   if((g1 > 31) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_31_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_31_" + g2);
	  }
   if((g1 <= 31) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_31_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_31_" + g2);
	  }
   if((g1 > 32) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_32_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_32_" + g2);
	  }
   if((g1 <= 32) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_32_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_32_" + g2);
	  }
   if((g1 > 33) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_33_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_33_" + g2);
	  }
   if((g1 <= 33) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_33_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_33_" + g2);
	  }
   if((g1 > 34) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_34_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_34_" + g2);
	  }
   if((g1 <= 34) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_34_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_34_" + g2);
	  }
   if((g1 > 35) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_35_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_35_" + g2);
	  }
   if((g1 <= 35) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_35_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_35_" + g2);
	  }
   if((g1 > 36) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_36_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_36_" + g2);
	  }
   if((g1 <= 36) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_36_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_36_" + g2);
	  }
   if((g1 > 37) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_37_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_37_" + g2);
	  }
   if((g1 <= 37) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_37_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_37_" + g2);
	  }
   if((g1 > 38) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_38_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_38_" + g2);
	  }
   if((g1 <= 38) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_38_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_38_" + g2);
	  }
   if((g1 > 39) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_39_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_39_" + g2);
	  }
   if((g1 <= 39) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_39_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_39_" + g2);
	  }
   if((g1 >= 40) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_40_" + g2) !== "EQUIPMENT_OK"))
      {
      player.ship.awardEquipment("EQ_CHUPACABRA_" + c1 + "_40_" + g2);
	  }
   if((g1 < 40) && (player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_40_" + g2) === "EQUIPMENT_OK"))
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_40_" + g2);
	  }
   }

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 2:55 pm
by Zireael
[the entire displayGaugeDigit1 goes here - it's too long to fit under the character limit]

Code: Select all

this.conditionSwitch = function()
   {
   //Chupa compass stuff
      if(player.ship.compassMode !== "COMPASS_MODE_TARGET")
      {
      if((player.alertCondition === 2) || (player.alertCondition === 3) || ((player.alertCondition === 1) && (player.ship.target)))
         {
	     if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_PRIMARY") === "EQUIPMENT_OK")
	        {		 
		    this.chupacabracompasschangedirection = "UP";// animation direction
		    this.chupacabracompasschangeframe = 0.0;// animation frame number 0
		    this.ccc = addFrameCallback(this.chupacabraCompassChange.bind(this));//----------
            return;		 
            }
         }
      if((player.alertCondition === 1) && (!player.ship.target))
         {
	     if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_SECONDARY") === "EQUIPMENT_OK")
	        {
		    this.chupacabracompasschangedirection = "DOWN";// animation direction
		    this.chupacabracompasschangeframe = 28.0;// animation frame number 28
		    this.ccc = addFrameCallback(this.chupacabraCompassChange.bind(this));//----------
            return;		 
		    }
         }
      }
   if((player.ship.compassMode === "COMPASS_MODE_TARGET") && (player.ship.target))
      {
      let tv = player.ship.target.position.subtract(player.ship.position).direction();
      let a = player.ship.heading.angleTo(tv);
      if((a < 0.1) && (player.ship.viewDirection === "VIEW_FORWARD"))
         {
		 if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_PRIMARY") === "EQUIPMENT_OK")
	        {		 
		    this.chupacabracompasschangedirection = "UP";// animation direction
		    this.chupacabracompasschangeframe = 0.0;// animation frame number 0
		    this.ccc = addFrameCallback(this.chupacabraCompassChange.bind(this));//----------
            return;			
            }		 
         }
      if((a >= 0.1) && (player.ship.viewDirection === "VIEW_FORWARD"))
         {
         if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_SECONDARY") === "EQUIPMENT_OK")
	        {
		    this.chupacabracompasschangedirection = "DOWN";// animation direction
		    this.chupacabracompasschangeframe = 28.0;// animation frame number 28
		    this.ccc = addFrameCallback(this.chupacabraCompassChange.bind(this));//---------- 
            return;			
		    }	     
         }
      if((a > 3.04) && (player.ship.viewDirection === "VIEW_AFT"))
         {
		 if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_PRIMARY") === "EQUIPMENT_OK")
	        {		 
		    this.chupacabracompasschangedirection = "UP";// animation direction
		    this.chupacabracompasschangeframe = 0.0;// animation frame number 0
		    this.ccc = addFrameCallback(this.chupacabraCompassChange.bind(this));//---------- 
			return;
            }	 
         }
      if((a <= 3.04) && (player.ship.viewDirection === "VIEW_AFT"))
         {
         if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_SECONDARY") === "EQUIPMENT_OK")
	        {
		    this.chupacabracompasschangedirection = "DOWN";// animation direction
		    this.chupacabracompasschangeframe = 28.0;// animation frame number 28
		    this.ccc = addFrameCallback(this.chupacabraCompassChange.bind(this));//----------   
		    }	     
         }
	  }
   }

   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.chupacabraCompassChange = function()
   {
   if(this.chupacabracompasschangedirection === "UP")
      {
	  this.chupacabracompasschangeframe += 1.0;
	  switch(this.chupacabracompasschangeframe)
         {
         case 1:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_PRIMARY");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME1");			
            break;
            }
         case 2:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME1");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME2");			
            break;
            }
         case 3:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME2");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME3");			
            break;
            }
         case 4:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME3");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME4");			
            break;
            }
         case 5:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME4");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME5");			
            break;
            }
         case 6:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME5");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME6");			
            break;
            }
         case 7:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME6");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME7");			
            break;
            }
         case 8:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME7");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME8");			
            break;
            }
         case 9:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME8");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME9");			
            break;
            }
         case 10:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME9");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME10");			
            break;
            }
         case 11:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME10");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME11");			
            break;
            }
         case 12:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME11");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME12");			
            break;
            }
         case 13:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME12");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME13");			
            break;
            }
         case 14:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME13");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME14");			
            break;
            }
         case 15:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME14");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME15");			
            break;
            }
         case 16:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME15");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME16");			
            break;
            }
         case 17:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME16");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME17");			
            break;
            }
         case 18:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME17");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME18");			
            break;
            }
         case 19:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME18");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME19");			
            break;
            }
         case 20:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME19");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME20");			
            break;
            }
         case 21:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME20");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME21");			
            break;
            }
         case 22:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME21");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME22");			
            break;
            }
         case 23:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME22");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME23");			
            break;
            }
         case 24:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME23");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME24");			
            break;
            }
         case 25:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME24");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME25");			
            break;
            }
         case 26:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME25");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME26");			
            break;
            }
         case 27:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME26");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME27");			
            break;
            }
         case 28:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME27");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_SECONDARY");
            removeFrameCallback(this.ccc);//----------   			
            break;
            }
         }
	  }
   if(this.chupacabracompasschangedirection === "DOWN")
      {
	  this.chupacabracompasschangeframe -= 1.0;
      switch(this.chupacabracompasschangeframe)
         {
		 case 0:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME1");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_PRIMARY");
            removeFrameCallback(this.ccc);//----------   			
            break;
            }
         case 1:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME2");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME1");			
            break;
            }
         case 2:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME3");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME2");			
            break;
            }
         case 3:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME4");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME3");			
            break;
            }
         case 4:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME5");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME4");			
            break;
            }
         case 5:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME6");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME5");			
            break;
            }
         case 6:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME7");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME6");			
            break;
            }
         case 7:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME8");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME7");			
            break;
            }
         case 8:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME9");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME8");			
            break;
            }
         case 9:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME10");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME9");			
            break;
            }
         case 10:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME11");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME10");			
            break;
            }
         case 11:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME12");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME11");			
            break;
            }
         case 12:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME13");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME12");			
            break;
            }
         case 13:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME14");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME13");			
            break;
            }
         case 14:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME15");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME14");			
            break;
            }
         case 15:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME16");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME15");			
            break;
            }
         case 16:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME17");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME16");			
            break;
            }
         case 17:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME18");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME17");			
            break;
            }
         case 18:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME19");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME18");			
            break;
            }
         case 19:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME20");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME19");			
            break;
            }
         case 20:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME21");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME20");			
            break;
            }
         case 21:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME22");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME21");			
            break;
            }
         case 22:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME23");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME22");			
            break;
            }
         case 23:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME24");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME23");			
            break;
            }
         case 24:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME25");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME24");			
            break;
            }
         case 25:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME26");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME25");			
            break;
            }
         case 26:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME27");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME26");			
            break;
            }	
         case 27:
            {
            player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_SECONDARY");			
            player.ship.awardEquipment("EQ_CHUPACABRA_COMPASS_FRAME27");						
            break;
            }
         }
      }
   }
   
this.guiScreenChanged = function()
   {
   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")
      {
      player.ship.hud = "numerichudv3.plist";
      return;
      }
   if(guiScreen === "GUI_SCREEN_EQUIP_SHIP")
      {
      player.ship.hud = "numerichudv3computerequip.plist";
      return;
      }
   player.ship.hud = "numerichudv3computer.plist";
   return;
   }

this.viewDirectionChanged = function()
   {
   if((player.ship.viewDirection === "VIEW_FORWARD") || (player.ship.viewDirection === "VIEW_AFT") || (player.ship.viewDirection === "VIEW_PORT") || (player.ship.viewDirection === "VIEW_STARBOARD"))
      {
	  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)
   {
   //Chupa checks for compass
    if(equipment === "EQ_CHUPACABRA_COMPASS_PRIMARY")
      {
      player.ship.setEquipmentStatus("EQ_CHUPACABRA_COMPASS_PRIMARY","EQUIPMENT_OK");
	  return;
      }
   if(equipment === "EQ_CHUPACABRA_COMPASS_SECONDARY")
      {
      player.ship.setEquipmentStatus("EQ_CHUPACABRA_COMPASS_SECONDARY","EQUIPMENT_OK");
	  return;
      }
   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.refresh = function()
   {
   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();
   //chupa gauge
   this.chupacabragaugechanged = "TRUE";
   this.displayGauge();
   this.chupacabragaugeframecounter = 2.0;
   this.numericgaugeframecounter = 2.0;// Forward Shield Capacitor
   this.prepareForwardShieldCapacitorReadout();
   this.numericgaugechanged = "TRUE";
   this.displayGaugeDigit4();
   this.displayGaugeDigit5();
   this.numericgaugeframecounter = 2.0;
   this.prepareAftShieldReadout();
   this.numericgaugechanged = "TRUE";
   this.displayGaugeDigit3();
   this.displayGaugeDigit4();
   this.displayGaugeDigit5();
   //Chupa gauge
   this.chupacabragaugechanged = "TRUE";
   this.displayGauge();
   this.chupacabragaugeframecounter = 2.0;
   this.numericgaugeframecounter = 2.0;// Aft Shield Capacitor
   this.prepareAftShieldCapacitorReadout();
   this.numericgaugechanged = "TRUE";
   this.displayGaugeDigit4();
   this.displayGaugeDigit5();
   this.numericgaugeframecounter = 1.0;
   this.prepareEnergyReadout();
   this.numericgaugechanged = "TRUE";
   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();
   //Chupa gauge
   this.chupacabragaugechanged = "TRUE";
   this.displayGauge();
   this.chupacabragaugeframecounter = 1.0;
   this.numericgaugeframecounter = 1.0;
   //All the others are only numeric
   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.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.chupacabragaugeframecounter = this.chupacabragaugelastframecounter;
   }   

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();
   //Clean up chupa, too
   this.chupacabragaugeselector = "FORWARDSHIELD";
   this.chupacabragaugecolor = "GREEN";
   this.removeLeftovers();
   this.chupacabragaugecolor = "YELLOW";
   this.removeLeftovers();
   this.chupacabragaugeselector = "AFTSHIELD";
   this.chupacabragaugecolor = "GREEN";
   this.removeLeftovers();
   this.chupacabragaugecolor = "YELLOW";
   this.removeLeftovers();
   this.chupacabragaugeselector = "SPEED";
   this.chupacabragaugecolor = "GREEN";
   this.removeLeftovers();
   this.chupacabragaugecolor = "YELLOW";
   this.removeLeftovers();
   this.removeExtraLeftovers();
   }
   
this.removeLeftovers = function()
   {
   let c1 = this.numericgaugecolor; 
   let g2 = this.numericgaugeselector;
   for (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);
	  }
   //Remove leftover chupas
   if(player.ship.equipmentStatus("EQ_CHUPACABRA_" + c1 + "_" + counter + "_" + g2) === "EQUIPMENT_OK")
         {
         player.ship.removeEquipment("EQ_CHUPACABRA_" + c1 + "_" + counter + "_" + g2);
	     }
      }
   }

this.removeExtraLeftovers = function()
   {
   for (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");
      }
   //Clean up chupa, too
   if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_PRIMARY") === "EQUIPMENT_OK")
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_PRIMARY");
	  }
   if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_SECONDARY") === "EQUIPMENT_OK")
      {
      player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_SECONDARY");
	  }
   if(player.ship.equipmentStatus("EQ_CHUPACABRA_COMPASS_FRAME" + counter) === "EQUIPMENT_OK")
        {
       player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_FRAME" + counter);
            }
   }
 
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");
   player.ship.removeEquipment("EQ_CHUPACABRA_COMPASS_SECONDARY");
   removeFrameCallback(this.pfsr);//----------
   removeFrameCallback(this.pfsrdg); //Chupa
   removeFrameCallback(this.pfsrdgd3);
   removeFrameCallback(this.pfsrdgd4);
   removeFrameCallback(this.pfsrdgd5);
   removeFrameCallback(this.pfscr);//----------
   removeFrameCallback(this.pfscrdgd4);
   removeFrameCallback(this.pfscrdgd5);
   removeFrameCallback(this.pasr);//----------
   removeFrameCallback(this.pasrdg); //Chupa
   removeFrameCallback(this.pasrdgd3);
   removeFrameCallback(this.pasrdgd4);
   removeFrameCallback(this.pasrdgd5);
   removeFrameCallback(this.pascr);//----------
   removeFrameCallback(this.pascrdgd4);
   removeFrameCallback(this.pascrdgd5);
   removeFrameCallback(this.per);//----------
   removeFrameCallback(this.perdgd3);
   removeFrameCallback(this.perdgd4);
   removeFrameCallback(this.perdgd5);
   removeFrameCallback(this.psr);//----------
   removeFrameCallback(this.psrdg); //Chupa
   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);
   removeFrameCallback(this.cs);//----------
   if(this.numericgaugeCheckTimer)
      {
      this.numericgaugeCheckTimer.stop();
      }
   }

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 3:45 pm
by spara
I might be able to help here. What are you exactly trying to do? Which parts are you trying to merge? I suggest that you start by installing both oxp's side by side. Then take away hud.plist from one and merge the relevant parts into the other oxp's hud.plist.

Hope that helps.

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 3:48 pm
by Zireael
spara wrote:
I might be able to help here. What are you exactly trying to do? Which parts are you trying to merge? I suggest that you start by installing both oxp's side by side. Then take away hud.plist from one and merge the relevant parts into the other oxp's hud.plist.

Hope that helps.
That's exactly what I tried to do. The end result fails somewhere around line 500.
I'm trying to merge Chupa's curved shields and speed graphs and the compass-as-target thingy into NumericHUD.

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 4:15 pm
by spara
Zireael wrote:
spara wrote:
I might be able to help here. What are you exactly trying to do? Which parts are you trying to merge? I suggest that you start by installing both oxp's side by side. Then take away hud.plist from one and merge the relevant parts into the other oxp's hud.plist.

Hope that helps.
That's exactly what I tried to do. The end result fails somewhere around line 500.
I'm trying to merge Chupa's curved shields and speed graphs and the compass-as-target thingy into NumericHUD.
Ok. Looks like there are a lot of player.ship.hud references in js-scripts. Those need to be handled properly. I'll take a closer look at it when I have some spare time.

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 4:30 pm
by Zireael
spara wrote:
Zireael wrote:
spara wrote:
I might be able to help here. What are you exactly trying to do? Which parts are you trying to merge? I suggest that you start by installing both oxp's side by side. Then take away hud.plist from one and merge the relevant parts into the other oxp's hud.plist.

Hope that helps.
That's exactly what I tried to do. The end result fails somewhere around line 500.
I'm trying to merge Chupa's curved shields and speed graphs and the compass-as-target thingy into NumericHUD.
Ok. Looks like there are a lot of player.ship.hud references in js-scripts. Those need to be handled properly. I'll take a closer look at it when I have some spare time.
Thanks a lot.

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Fri Dec 13, 2013 4:39 pm
by spara
That did not take long :D . Here's what I did:

1. Installed Chubacabrahud and Numerichud side by side.
2. Commented out all lines saying "player.ship.hud = ..." from chubacabrahud.js file.
3. Opened chubacabrahud.plist and copied relevant parts from dials section into dials section of numerichudv3.plist.

Seems to work.

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Mon Dec 16, 2013 9:09 am
by Zireael
Ok, since CSOB allows merging, I uploaded the working merged HUD to my dropbox. Enjoy!

https://www.dropbox.com/s/3lgbp6cxt86x5 ... %20HUD.zip

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Mon Dec 16, 2013 10:41 am
by Norby
Zireael wrote:
...%20%26%20Numeric%20...
Nice teamwork, but please avoid special characters in file and folder names (use underscore instead of space, "and" instead of &). Another example: there are many accentuated letter in my language (áéíóöőúüű :)) but I always use them without accents in file names to prevent problems.

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Sun Dec 22, 2013 4:43 pm
by Zireael
New version with a small fix to allow MFDs to work in 1.79.

https://www.dropbox.com/s/utg8vfcqanc2m ... %200.2.zip

Re: Trying to merge Chupacabra.oxp and NumericHUD.oxp for my

Posted: Mon Dec 23, 2013 6:11 am
by Diziet Sma
Thanks! I was thinking of modifying the Numeric HUD for MFDs myself.. It's always nice to have the work done for you.. 8)

However..

Image

The LT, AS, FS and SP legends in the middle of the picture should be removed.. they refer to Chupacabra gauges which are no longer there, and are just in the way.

And speaking personally, I prefer my shield and energy levels displayed in discrete units, rather than as percentages.. since there is always the question; "percentage of how much?"

For instance, if I'm in my Pitviper and I see that the shields are maxed out at 256, instead of their usual 384, then I know instantly that my Military Shield Enhancement unit is damaged or destroyed.. but 100% of 256 is still 100%, even though my shields have just lost 1/3 of their capacity. And seeing 576 energy units available is much more precise than 100 "somethings" of energy.

Sorry, but give me accuracy and precision, every time.. :wink:

Nice work, however.. I will definitely be adapting the ETA display and MFD capabilities to my own Numeric HUD.