vgstation-coders / vgstation13

Butts
GNU Affero General Public License v3.0
266 stars 545 forks source link

TTVs do not explode when teleported onto blob tiles. #22301

Open ghost opened 5 years ago

ghost commented 5 years ago

Contrary to https://github.com/vgstation-coders/vgstation13/pull/21550

When a blob hits a TTV, it will trigger it (mostly to make sure the above changes do not invalidate bombs)

Blobs delete TTVs without triggering them.

Kurfursten commented 5 years ago

it did explode the bomb trigger was there, it sent an adminwarn (also I saw all the strongblobs and core get weakened)

ghost commented 5 years ago

Nope, those were welder tanks. The TTVs didn't even generate a sound/shake and not even a bhangmeter report.

ghost commented 5 years ago

[17:12:23]DEBUG: Runtime in <b>transfer_valve.dm</b>, line <b>160</b>: <b>Cannot read null.volume</b> <a href='?_src_=holder;viewruntime=[0x21046b2f]'>[view]</a>

Exxion commented 5 years ago

Something very fucked up must have happened for that runtime to occur One of the tanks had a null air_contents

Kurfursten commented 5 years ago

This is a really bizarre runtime. What that's saying is that one of the tanks or its air_contents ceased to exist before it blew up. But transfer_valve doesn't even have a /Destroy that clears its references for the garbage collector so even if it was getting deleted, it shouldn't be causing that. Additionally, it shouldn't even be calling merge_gases() unless both tanks exist due to a sanity check in toggle_valve.

Exxion commented 5 years ago

Oh, I get it The TTV is, in fact, getting deleted, and /atom/movable/Destroy() qdels all contents The TTV lacks a Destroy() so the tanks don't get dereferenced, but the tanks do delete their air_contents So yes, the bug is just that the bomb is getting deleted before it attempts to explode

EDIT: Which is presumably caused by the bomb getting blob_act()ed multiple times due to being near the core Doesn't explain why it didn't explode, then

Exxion commented 5 years ago

Oh I'm a dumbass The bomb doesn't explode immediately when the tanks mix. The tanks just mix. It doesn't explode until the next process() tick. So the tanks mix and the bomb is immediately deleted, before it has a chance to go off.

Kurfursten commented 5 years ago

Could we make an immediate call to update that gas mixture from the blob_act?

Exxion commented 5 years ago

The gas_mixture is updated immediately, but the tank doesn't give a shit until it checks the mixture's pressure I was thinking about doing some tweaks to gas_mixtures that would make this cleaner but as a temporary measure you could just do something silly like call tank_two.process() before deleting the TTV