Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: [0.8a] Safety overrides reduces weapon ranges past "null" units  (Read 2548 times)

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile

Noticed this only today. The description for the Safety Overrides hullmod has an error which causes it to display the bit about reducing weapon range incorrectly, specifically:

"... and drastically reduces weapon ranges past null units."

Traced this back to the hullmod file and found the cause in "getDescriptionParam" (relevant bits highlighted):

Spoiler


...
   public String getDescriptionParam(int index, HullSize hullSize) {
      if (index == 0) return "" + ((Float) speed.get(HullSize.FRIGATE)).intValue();
      if (index == 1) return "" + ((Float) speed.get(HullSize.DESTROYER)).intValue();
      if (index == 2) return "" + ((Float) speed.get(HullSize.CRUISER)).intValue();
      //if (index == 3) return "" + ((Float) speed.get(HullSize.)).intValue();
      if (index == 3) return Misc.getRoundedValue(FLUX_DISSIPATION_MULT);
      if (index == 4) return Misc.getRoundedValue(PEAK_MULT);
      //if (index == 3) return Misc.getRoundedValue(CR_DEG_MULT);
      if (index == 3) return Misc.getRoundedValue(RANGE_THRESHOLD);
//      if (index == 4) return Misc.getRoundedValue(RECOIL_MULT);
      //if (index == 3) return (int)OVERLOAD_DUR + "%";
...


As you can see, between the commented-out bits and the active statements, you've repeated an index value (3). An easy fix, but might want to check on that.

[close]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8a] Safety overrides reduces weapon ranges past "null" units
« Reply #1 on: May 12, 2017, 01:32:49 PM »

Thanks, was reported a little while back - is fixed!
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: [0.8a] Safety overrides reduces weapon ranges past "null" units
« Reply #2 on: May 12, 2017, 03:19:14 PM »

Thanks, was reported a little while back - is fixed!

Ah, awesome. I didn't know it had already been reported - my apologies.  ;D
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8a] Safety overrides reduces weapon ranges past "null" units
« Reply #3 on: May 12, 2017, 03:24:34 PM »

No worries, would rather have an extra report than no report at all :)
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: [0.8a] Safety overrides reduces weapon ranges past "null" units
« Reply #4 on: May 12, 2017, 04:15:19 PM »

Haha, fair enough! I presume this is fixed for 0.8.1? Cos I don't like messing with stock files, but I might just fix it myself for now.  ;)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8a] Safety overrides reduces weapon ranges past "null" units
« Reply #5 on: May 12, 2017, 04:25:01 PM »

Yeah, it's fixed for .1.
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: [0.8a] Safety overrides reduces weapon ranges past "null" units
« Reply #6 on: May 12, 2017, 04:42:41 PM »

Yeah, it's fixed for .1.

Sweet. :D
Logged