mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[MIRROR] Fix two gas assertion runtimes (#816)
* Fix two gas assertion runtimes (#53718) /datum/gas_mixture/proc/remove(amount) has a code path that can return null. All the code following the runtimes assume some bit of gas_mixture was actually removed at all. No need to trigger this code if there's no gas_mixture removed, can early return instead. * Fix two gas assertion runtimes Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -363,6 +363,10 @@ This section is for the destabilized SM
|
||||
var/datum/gas_mixture/removed
|
||||
var/gasefficency = 0.5
|
||||
removed = env.remove(gasefficency * env.total_moles())
|
||||
|
||||
if(!removed)
|
||||
return
|
||||
|
||||
removed.assert_gases(/datum/gas/bz, /datum/gas/miasma)
|
||||
if(!removed || !removed.total_moles() || isspaceturf(loc_turf))
|
||||
removed.gases[/datum/gas/bz][MOLES] += 0.5
|
||||
|
||||
Reference in New Issue
Block a user