Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Switching to a lower-tier submarine makes you lose upgrades

Open Regalis11 opened this issue 3 years ago • 1 comments

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [ ] My issue happened while using mods.

What happened?

When you switch to a lower-tier sub, the upgrades get clamped to the maximum of that sub. But when you switch back to the higher-tier one, they remain clamped, meaning you lose the upgrades.

Reproduction steps

  1. Select a tier 2 or 3 sub
  2. Max upgrades
  3. Switch to a lower tier sub
  4. Switch back to the original sub, notice the upgrades are no longer maxed

Bug prevalence

Happens every time I play

Version

0.19.11.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

Regalis11 avatar Oct 06 '22 16:10 Regalis11

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/1acf6d91e72ba126b67e0d61e4e15b193cac456c

Regalis11 avatar Oct 06 '22 16:10 Regalis11

Tested by maxing a Typhon2's upgrades, switching to a Dugong with clamped but maxed upgrades, and then switching back to Typhon2. Maximum upgrades were retained, issue is fixed.

Lithosagym avatar Oct 14 '22 22:10 Lithosagym

Reopening: the fix causes the upgrades to get clamped to the default maximum for that specific upgrade, ignoring the tier/class bonuses.

Steps to repro:

  1. Start a campaign with Typhon 2
  2. Max turret upgrades (4 levels thanks to the Attack class bonus)
  3. Start a new round
  4. Notice the upgrades get reduced to level 3

Regalis11 avatar Oct 19 '22 17:10 Regalis11

Tested above repro steps, working correctly. Closing.

Rokvach avatar Oct 20 '22 07:10 Rokvach