mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
This is more okay.
This commit is contained in:
@@ -6,22 +6,27 @@
|
||||
/turf/var/datum/gas_mixture/air
|
||||
|
||||
/turf/simulated/proc/set_graphic(const/newGraphics)
|
||||
var/list/overlayGraphics
|
||||
if (!isnum(newGraphics))
|
||||
return
|
||||
|
||||
if (isnum(newGraphics))
|
||||
overlayGraphics = list()
|
||||
|
||||
if (GRAPHICS_PLASMA & newGraphics)
|
||||
overlayGraphics += plmaster
|
||||
|
||||
if (GRAPHICS_N2O & newGraphics)
|
||||
overlayGraphics += slmaster
|
||||
|
||||
if (gasGraphics)
|
||||
if (!newGraphics) // Clear overlay, or simply 0.
|
||||
overlays -= gasGraphics
|
||||
gasGraphics = null
|
||||
return
|
||||
|
||||
var/list/overlayGraphics = list()
|
||||
|
||||
if (GRAPHICS_PLASMA & newGraphics)
|
||||
overlayGraphics += plmaster
|
||||
|
||||
if (GRAPHICS_N2O & newGraphics)
|
||||
overlayGraphics += slmaster
|
||||
|
||||
if (overlayGraphics.len)
|
||||
if (gasGraphics)
|
||||
overlays -= gasGraphics
|
||||
gasGraphics = null
|
||||
|
||||
if (overlayGraphics && overlayGraphics.len)
|
||||
overlays += overlayGraphics
|
||||
gasGraphics = overlayGraphics.Copy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user