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: Anubis-class Cruiser (12/20/24)

Author Topic: About 'Generate Slipsurge' abilities detecting star types affecting translation  (Read 838 times)

Achi Cirno

  • Ensign
  • *
  • Posts: 35
  • sine qua non
    • View Profile

Hi Alex:

I'm here on behalf of fossic translation team to ask whether you may change the way on how 'Generate Slipsurge' ability detect which type of star player's fleet is currently nearby.

Code
String name =spec.getName().toLowerCase();
if(name.contains("neutron")||spec.isPulsar()){
key = StarTypeS.NEUTRON_STAR;
}else if(name.contains("dwarf")){
key = StarTypes.WHITE_DWARF;
}else if(name.contains("giant")){
key = StarTypes.BLUE_GIANT;
}else if(name.contains("supergiant")){
key = StarTypeS.BLUE_SUPERGIANT;
}else if(name.contains(" hole")){
key = StarTypes.BLACK_HOLE,
}else if(name.contains("brown")){
key = StarTypes.BROWN DWARF:
}

This may prove problematic cuz right now it detects and reads name which we changed due to translation. We hope that there maybe a better solution for this.

Thanks
Fossic

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24997
    • View Profile

Hi - I understand the translation already has to make changes to the code, right? It seems like this is one more case where that is necessary, one of what I assume is already many. Am I missing some aspect of this that makes it less possible than all the other cases of code changes you have to make?
Logged

Achi Cirno

  • Ensign
  • *
  • Posts: 35
  • sine qua non
    • View Profile

Yes, we do changes basic code. Tho we just hope there might be a better way than catching name string which wont affect things like other modded content,etc.

I'll talk with the team and see what we can do.

Thanks