Adds ice tiles to cold pressurized turfs

This commit is contained in:
ZomgPonies
2015-12-08 01:24:38 -05:00
parent b8db2dd78d
commit 4922d60054
3 changed files with 23 additions and 13 deletions
+15 -12
View File
@@ -46,13 +46,12 @@
var/datum/gas_mixture/air
var/archived_cycle = 0
var/current_cycle = 0
var/icy = 0
var/obj/effect/hotspot/active_hotspot
var/temperature_archived //USED ONLY FOR SOLIDS
var/atmos_overlay_type = "" //current active overlay
/turf/simulated/New()
..()
@@ -67,6 +66,8 @@
air.temperature = temperature
update_visuals()
/turf/simulated/Destroy()
visibilityChanged()
if(active_hotspot)
@@ -209,8 +210,6 @@
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)
@@ -221,6 +220,13 @@
if(consider_superconductivity(starting = 1))
remove = 0
if(air.temperature < T0C && air.return_pressure() > 10)
icy = 1
else
icy = 0
update_visuals()
if(!excited_group && remove == 1)
air_master.remove_from_active(src)
@@ -232,17 +238,14 @@
archived_cycle = air_master.current_cycle
/turf/simulated/proc/update_visuals()
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
overlays = 0
if(icy)
overlays += icemaster
atmos_overlay = get_atmos_overlay_by_name(new_overlay_type)
var/new_overlay_type = tile_graphic()
var/atmos_overlay = get_atmos_overlay_by_name(new_overlay_type)
if (atmos_overlay)
overlays += atmos_overlay
atmos_overlay_type = new_overlay_type
/turf/simulated/proc/get_atmos_overlay_by_name(var/name)
switch(name)
+1
View File
@@ -1,5 +1,6 @@
var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null
var/global/obj/effect/overlay/icemaster = null
// nanomanager, the manager for Nano UIs
var/datum/nanomanager/nanomanager = new()
+7 -1
View File
@@ -140,4 +140,10 @@ var/global/datum/controller/process/air_system/air_master
slmaster.icon = 'icons/effects/tile_effects.dmi'
slmaster.icon_state = "sleeping_agent"
slmaster.layer = FLY_LAYER
slmaster.mouse_opacity = 0
slmaster.mouse_opacity = 0
icemaster = new /obj/effect/overlay()
icemaster.icon = 'icons/turf/overlays.dmi'
icemaster.icon_state = "snowfloor"
icemaster.layer = TURF_LAYER+0.1
icemaster.mouse_opacity = 0