This is more okay.

This commit is contained in:
ESwordTheCat
2014-05-14 03:05:02 -08:00
parent 33606e740e
commit be9dcef9f0

View File

@@ -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()