Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: [0.9.1a-RC6] Crew CTRL-Click Behavior  (Read 1032 times)

Goumindong

  • Admiral
  • *****
  • Posts: 1896
    • View Profile
[0.9.1a-RC6] Crew CTRL-Click Behavior
« on: May 14, 2019, 10:49:10 AM »

As of a new game, no mods, random start.

When i go to offload crew because i have too many(for whatever reason). The game consistently fails to remove 1 extra crew when i ctrl-click in order to disembark to maximum fullness. Does not repeat with any other commodities as far as i can tell. So if my Crew maximum is 581 and i have 700, CTRL-click will move me to 582.

When refilling up to maximum it. works properly. If i have <580 crew and ctrl click crew i will fill up to 581
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: [0.9.1a-RC6] Crew CTRL-Click Behavior
« Reply #1 on: May 14, 2019, 11:35:54 AM »

Thanks for the report! Could I possibly get your save? Not seeing this over here. fractalsoftworks [at] gmail [dot] com
Logged

BringerofBabies

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: [0.9.1a-RC6] Crew CTRL-Click Behavior
« Reply #2 on: May 14, 2019, 04:32:17 PM »

I don't have a save, but previously I saw this for both crew and fuel (in a modded game, but I don't think anything would have affected this). I heavily used the hull mods to increase storage capacity, so I assumed it was a disagreement about how things are rounded.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: [0.9.1a-RC6] Crew CTRL-Click Behavior
« Reply #3 on: May 14, 2019, 04:43:01 PM »

Thank you for chiming in! Yeah, rounding was my thought as well - and it might still be the issue somehow - but looking at the code, it seems to be properly rounding all the capacities down if they're fractional.

If you happen to see this again, would you mind sending me a save?
Logged

BringerofBabies

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: [0.9.1a-RC6] Crew CTRL-Click Behavior
« Reply #4 on: May 14, 2019, 05:08:31 PM »

Hmm, even if everything is rounded down, if it is rounded too late it could cause this problem. For example, a capacity of 30.5, currently filled with 50 units:
Real capacity would be 30, but if the Ctrl click behavior went from the original capacity instead of the real capacity, then the amount to remove would be (50-30.5), or 19.5, and would be rounded down to 19, leaving us with the 1 over capacity still.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: [0.9.1a-RC6] Crew CTRL-Click Behavior
« Reply #5 on: May 14, 2019, 06:05:41 PM »

That looks like what was actually happening, yeah. I'd assumed another method was also rounding down but it wasn't, so it was indeed using the un-rounded-down max capacity when starting the calculation... Thanks for, uh, making me feel like an idiot, but also pointing this out :)

Should be fixed!
Logged

BringerofBabies

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: [0.9.1a-RC6] Crew CTRL-Click Behavior
« Reply #6 on: May 15, 2019, 05:15:28 AM »

Woo, debugging other people's code in my head while writing my own unit tests!
Logged