Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Potential minor issue in REDACTED theme generator  (Read 1188 times)

Morathar

  • Lieutenant
  • **
  • Posts: 64
    • View Profile
Potential minor issue in REDACTED theme generator
« on: January 06, 2019, 03:28:55 PM »

While trying to figure out how to modify the chances of getting REDACTED systems (which barely appear in small sectors thanks to competition with certain mod's theme generators), I stumbled upon the following odd bit of code in RemnantThemeGenerator.java:

Code
		float skipProb = CONSTELLATION_SKIP_PROB;
if (total < num / (1f - skipProb)) {
skipProb = 1f - (num / total);
}
skipProb = 0f;

It's entirely possible that hard-coding skipProb to 0 is intentional, but it looks suspiciously like leftover debug code, so I thought I'd better mention it.


Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: Potential minor issue in REDACTED theme generator
« Reply #1 on: January 06, 2019, 09:20:34 PM »

Thank you! I suspect you're right, though there's an off chance I set it to 0 because the "proper" looking code wasn't producing good results. Going to comment that out and take a look :)
Logged