FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.75k stars 407 forks source link

LightComponent Property on Turret carries over on Turret Swap #12697

Closed Lughbaloo closed 1 year ago

Lughbaloo commented 1 year ago

Disclaimers

What happened?

This issue happens without mods or customized turrets, but since all turrets probably use the same LightComponent settings, it's not really noticeable. It only became apparent to me after using a custom turret in the sub editor.

I've created a Turret with custom LightComponent values from default. When swapping out the turret during a campaign, the LightComponent property of the Turret section carries over to the new turret. Since the edited Turret had variables that are different than the previous searchlight including a shorter radius and a color change, it's obvious that the LightComponent carried over.

Reproduction steps

  1. Make a custom submarine, with turrets that have custom values on their LightComponent section.
  2. Start a campaign.
  3. Swap out the turret for any other turret at the Upgrades merchant.
  4. Use the Periscope or enter Freecam to see the LightComponent has transferred over from the previous turret.

Bug prevalence

Happens every now and then

Single player or multiplayer?

Happens in both single player and multiplayer

-

No response

Version

v1.0.21.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

DuckY-Y commented 1 year ago

Sure there could be an added option on the hardpoint to allow it to transfer the lighting values over, but I'm failing to see how this isn't an intended feature.

Regalis11 commented 1 year ago

Thank you for the report!

I would also say that this is intentional. Modifications to the original turret carry over to the new turret. I could imagine many players wanting the light properties to carry over (if you let's say have a "main turret" with a brighter light, or have changed the colors of the lights for aesthetic reasons). It would also be hard to draw the line on what should carry over and what shouldn't - if you've let's say made the turret consume less power or made it move faster, should that apply to the new turret too? I think in this case it's probably the best to keep the rules simple, and just go with "all modified properties carry over".

If you absolutely need the colors to change, it's also possible to work around this by turning the modified turret into a mod.