mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
fix gas overlays persisting after rebuilds
slight visual artifact when zones are rebuilt, overlays will be missing until the end of the current tick. otherwise works fine. Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
@@ -5,9 +5,9 @@
|
|||||||
/turf/var/datum/gas_mixture/air
|
/turf/var/datum/gas_mixture/air
|
||||||
|
|
||||||
/turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null)
|
/turf/simulated/proc/update_graphic(list/graphic_add = null, list/graphic_remove = null)
|
||||||
if(graphic_add)
|
if(graphic_add && graphic_add.len)
|
||||||
overlays += graphic_add
|
overlays += graphic_add
|
||||||
if(graphic_remove)
|
if(graphic_remove && graphic_remove.len)
|
||||||
overlays -= graphic_remove
|
overlays -= graphic_remove
|
||||||
|
|
||||||
/turf/proc/update_air_properties()
|
/turf/proc/update_air_properties()
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ Class Procs:
|
|||||||
if(invalid) return //Short circuit for explosions where rebuild is called many times over.
|
if(invalid) return //Short circuit for explosions where rebuild is called many times over.
|
||||||
c_invalidate()
|
c_invalidate()
|
||||||
for(var/turf/simulated/T in contents)
|
for(var/turf/simulated/T in contents)
|
||||||
|
T.update_graphic(graphic_remove = air.graphic) //we need to remove the overlays so they're not doubled when the zone is rebuilt
|
||||||
//T.dbg(invalid_zone)
|
//T.dbg(invalid_zone)
|
||||||
T.needs_air_update = 0 //Reset the marker so that it will be added to the list.
|
T.needs_air_update = 0 //Reset the marker so that it will be added to the list.
|
||||||
air_master.mark_for_update(T)
|
air_master.mark_for_update(T)
|
||||||
|
|||||||
Reference in New Issue
Block a user