Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: What's the difference between "getWings()" and "getFittedWings()"?  (Read 1399 times)

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
What's the difference between "getWings()" and "getFittedWings()"?
« on: September 01, 2018, 09:07:35 PM »

Specifically within the ShipVariantAPI. The two methods both return lists of strings. Is there a fundamental difference between them, and what is it? ???
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24146
    • View Profile
Re: What's the difference between "getWings()" and "getFittedWings()"?
« Reply #1 on: September 01, 2018, 10:19:05 PM »

getWings() possibly includes null/empty values if some wings are not set.

For example in a 4 fighter bay ship, if there's a Talon slotted in bay 3, it'll return a list of {"", "", "talon_wing"}. Note that it will not return 4 element array in this case, just up to the last element with something in it. Unless something was slotted and then unslotted, then I don't remember what the expected behavior is :)

getFittedWings() will just return {"talon_wing"}
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: What's the difference between "getWings()" and "getFittedWings()"?
« Reply #2 on: September 01, 2018, 11:11:29 PM »

Awesome, thanks for clearing that up!  :D

One last thing, how do these methods react to built-in fighter wings? Do they count as "fitted"? And will a built-in wing always be first in the list, as they appear in the refit screen?
« Last Edit: September 01, 2018, 11:17:23 PM by AxleMC131 »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24146
    • View Profile
Re: What's the difference between "getWings()" and "getFittedWings()"?
« Reply #3 on: September 02, 2018, 08:44:01 AM »

Yes and yes!
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: What's the difference between "getWings()" and "getFittedWings()"?
« Reply #4 on: September 02, 2018, 10:57:42 PM »

Neato! Thanks muchly.
Logged