Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Rapid explosions if oxygen generator set on fire

Open BatskaEngineer opened this issue 2 years ago • 7 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?

If a container that can refill oxygen tanks (i.g. oxygen generator/oxygen tank shelf) is set on fire, it causes rapid explosions to happen when oxygen tanks reach 0% condition. This keeps on going until the power is cut or the fire is out

Reproduction steps

  1. Start a round or a test in sub editor
  2. Find oxygen generator/oxygen tank shelf that is powered
  3. Set it on fire
  4. Observe* *For me the explosions were only visible in the test mode. In the actual round there was no sound or visual effect, but the damage from the explosions was there

Bug prevalence

Happens every time I play

Version

0.18.15.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

BatskaEngineer avatar Jul 23 '22 22:07 BatskaEngineer

FWIW I consider this a feature not a bug. The bug here is that the oxygen generator is surviving those explosions.

mLuby avatar Jul 24 '22 03:07 mLuby

Well, yeah. Everything works as it should. Oxygen in a tank deteriorates to 0%, that triggers explosion, generator fills up empty tank with a tiny amount of oxygen, that causes the tank to deteriorate again and the cycle repeats. Technically it is not a bug, but the result, I believe, is unintentional and undesirable

BatskaEngineer avatar Jul 24 '22 03:07 BatskaEngineer

Cheap unlimited explosions, now we have to convert them to energy somehow (think Minecraft with mods).

metakot avatar Jul 25 '22 06:07 metakot

I don't think the slightest amount of oxygen in a tank should be yielding a full-scale explosion, nor should an oxygen generator be surviving said explosions. so im going to consider this both a matter of design and a bug.

It could be considered a feature to have the oxygen coming out of an oxygen generator expload repeatedly, but personally I think the generator should end up a hunk of scrap metal in need of repairs after that happens. Perhaps just make the oxygen generator itself vulnerable to fire damage (I mean, it is full of oxygen too right?) and then expload itself like oxygen tanks do

NilanthAnimosus avatar Jul 28 '22 11:07 NilanthAnimosus

I just gave it another quick thought.

I don't think that just making oxygen generator vulnerable to fire or explosions will do the trick. Since O2 generator can be set to invulnerable to damage in the sub designer and oxygen tank shelves that can fill up oxygen tanks do not even have health, this solution may not always work.

I think the best fix for it is to make structures that refill oxygen consider surrounding conditions as well. Because the deterioration rate when on fire is higher than the rate that the bottle is filled up at, the total rate is negative, so it should not start filling up empty bottles in the first place

Edit: Not saying that making O2 generator vulnerable to fire or explosions is not a cool idea. It's just the one I proposed is more universal

BatskaEngineer avatar Jul 29 '22 07:07 BatskaEngineer

Was about to post a ticket but I found yours so:

If oxygen bottles are placed inside powered O2 shelves, their oxygen refills If there's a fire in the room, the condition of the oxygen bottle degrades and it explodes when reaching 0, but the condition will keep regenerating. This spams a lot of mini explosions as the bottles keep leaving and reaching 0 condition.

Add a simple Remove to the xml so the bottle is destroyed on exploding to fire.

    <Holdable canbecombined="true" slots="Any,RightHand,LeftHand" holdpos="30,-15" handle1="0,5" handle2="0,-5" msg="ItemMsgPickUpSelect">
      <StatusEffect type="OnFire" target="This" Condition="-10.0" tags="onfire" duration="1" stackable="false" />
      <StatusEffect type="OnBroken" target="This" delay="1" stackable="false">
        <Conditional HasStatusTag="onfire" />
        <sound file="Content/Items/Weapons/ExplosionSmall1.ogg" range="5000" />
        <sound file="Content/Items/Weapons/ExplosionDebris1.ogg" range="5000" />
        <Explosion range="250.0" structuredamage="20" force="3.0" ignorefireeffectsfortags="oxygensource,weldingtoolfuel">
          <Affliction identifier="burn" strength="5" />
          <Affliction identifier="stun" strength="4" />
        </Explosion>
		<Remove />
      </StatusEffect>

Oxygen tanks and Aluminium are easy to come by so this shouldnt be a problem.

ubertpendragon avatar Aug 01 '22 11:08 ubertpendragon

Remove oxygen from the game - it'd be funny.

Ek-Videogames avatar Aug 06 '22 03:08 Ek-Videogames

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/694c3f5380350596bf87d3637267c8d17f4d9e91 by preventing the generators and shelves from filling up tanks while on fire.

Regalis11 avatar Aug 16 '22 06:08 Regalis11

Don't 😕 me I'm drowning in Aluminium/oxygen tanks, every single thing involving humans has them (outposts, pirates, beacons, wrecks...)

ubertpendragon avatar Aug 16 '22 07:08 ubertpendragon

Tested against dev commit https://github.com/Regalis11/Barotrauma-development/commit/17a4e29619e49adc0a329be654296cf8f8ddc5d6, works correctly, closing.

NilanthAnimosus avatar Aug 25 '22 03:08 NilanthAnimosus