mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Updates and Fixes Gas Overlays
This commit is contained in:
@@ -66,8 +66,6 @@
|
||||
|
||||
air.temperature = temperature
|
||||
|
||||
update_visuals()
|
||||
|
||||
/turf/simulated/Destroy()
|
||||
visibilityChanged()
|
||||
QDEL_NULL(active_hotspot)
|
||||
@@ -209,6 +207,8 @@
|
||||
|
||||
air.react()
|
||||
|
||||
update_visuals()
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
hotspot_expose(air.temperature, CELL_VOLUME)
|
||||
for(var/atom/movable/item in src)
|
||||
@@ -219,13 +219,6 @@
|
||||
if(consider_superconductivity(starting = 1))
|
||||
remove = 0
|
||||
|
||||
if(air.temperature < T0C && air.return_pressure() > 10)
|
||||
icy = 1
|
||||
else if(air.temperature > T0C)
|
||||
icy = 0
|
||||
|
||||
update_visuals()
|
||||
|
||||
if(!excited_group && remove == 1)
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
@@ -237,27 +230,19 @@
|
||||
archived_cycle = SSair.times_fired
|
||||
|
||||
/turf/simulated/proc/update_visuals()
|
||||
if(icy && !icyoverlay)
|
||||
overlays |= icemaster
|
||||
icyoverlay = icemaster
|
||||
else if(icyoverlay && !icy)
|
||||
icyoverlay = null
|
||||
overlays -= icemaster
|
||||
|
||||
var/new_overlay_type = tile_graphic()
|
||||
if(new_overlay_type == atmos_overlay_type)
|
||||
return
|
||||
var/atmos_overlay = get_atmos_overlay_by_name(atmos_overlay_type)
|
||||
if(atmos_overlay)
|
||||
overlays -= atmos_overlay
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
vis_contents -= atmos_overlay
|
||||
|
||||
atmos_overlay = get_atmos_overlay_by_name(new_overlay_type)
|
||||
if(atmos_overlay)
|
||||
overlays += atmos_overlay
|
||||
vis_contents += atmos_overlay
|
||||
atmos_overlay_type = new_overlay_type
|
||||
|
||||
/turf/simulated/proc/get_atmos_overlay_by_name(var/name)
|
||||
/turf/simulated/proc/get_atmos_overlay_by_name(name)
|
||||
switch(name)
|
||||
if("plasma")
|
||||
return plmaster
|
||||
@@ -266,13 +251,13 @@
|
||||
return null
|
||||
|
||||
/turf/simulated/proc/tile_graphic()
|
||||
if(!air)
|
||||
return
|
||||
if(air.toxins > MOLES_PLASMA_VISIBLE)
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
return "plasma"
|
||||
|
||||
var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air.trace_gases
|
||||
if(sleeping_agent && (sleeping_agent.moles > 1))
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
return "sleeping_agent"
|
||||
return null
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
var/global/obj/effect/overlay/plmaster = null
|
||||
var/global/obj/effect/overlay/slmaster = null
|
||||
var/global/obj/effect/overlay/icemaster = null
|
||||
|
||||
// Event Manager, the manager for events.
|
||||
var/datum/event_manager/event_manager = new()
|
||||
|
||||
@@ -362,20 +362,18 @@ SUBSYSTEM_DEF(air)
|
||||
plmaster = new /obj/effect/overlay()
|
||||
plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
plmaster.icon_state = "plasma"
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
plmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
slmaster = new /obj/effect/overlay()
|
||||
slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
slmaster.icon_state = "sleeping_agent"
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
icemaster = new /obj/effect/overlay()
|
||||
icemaster.icon = 'icons/turf/overlays.dmi'
|
||||
icemaster.icon_state = "snowfloor"
|
||||
icemaster.layer = TURF_LAYER + 0.1
|
||||
icemaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
slmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
#undef SSAIR_PIPENETS
|
||||
#undef SSAIR_ATMOSMACHINERY
|
||||
@@ -383,4 +381,4 @@ SUBSYSTEM_DEF(air)
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
#undef SSAIR_HIGHPRESSURE
|
||||
#undef SSAIR_HOTSPOTS
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
@@ -91,8 +91,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
return
|
||||
|
||||
/turf/simulated/floor/proc/update_icon()
|
||||
if(air)
|
||||
update_visuals()
|
||||
update_visuals()
|
||||
overlays -= current_overlay
|
||||
if(current_overlay)
|
||||
overlays.Add(current_overlay)
|
||||
|
||||
Reference in New Issue
Block a user