Merge polaris sync 01 17 2018

Planes, layers, human/update_icon()
This commit is contained in:
Arokha Sieyes
2018-01-17 17:56:51 -05:00
committed by Leshana
277 changed files with 20347 additions and 2214 deletions
+14 -11
View File
@@ -71,20 +71,23 @@
else if(istype(loc, /turf/space/))
parent.radiate_heat_to_space(surface, 1)
if(buckled_mob)
var/hc = pipe_air.heat_capacity()
var/avg_temp = (pipe_air.temperature * hc + buckled_mob.bodytemperature * 3500) / (hc + 3500)
pipe_air.temperature = avg_temp
buckled_mob.bodytemperature = avg_temp
if(has_buckled_mobs())
for(var/M in buckled_mobs)
var/mob/living/L = M
var/heat_limit = 1000
var/hc = pipe_air.heat_capacity()
var/avg_temp = (pipe_air.temperature * hc + L.bodytemperature * 3500) / (hc + 3500)
pipe_air.temperature = avg_temp
L.bodytemperature = avg_temp
var/mob/living/carbon/human/H = buckled_mob
if(istype(H) && H.species)
heat_limit = H.species.heat_level_3
var/heat_limit = 1000
if(pipe_air.temperature > heat_limit + 1)
buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BP_TORSO, used_weapon = "Excessive Heat")
var/mob/living/carbon/human/H = L
if(istype(H) && H.species)
heat_limit = H.species.heat_level_3
if(pipe_air.temperature > heat_limit + 1)
L.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BP_TORSO, used_weapon = "Excessive Heat")
//fancy radiation glowing
if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K
+37 -68
View File
@@ -1,3 +1,6 @@
//
// Base type of pipes
//
/obj/machinery/atmospherics/pipe
var/datum/gas_mixture/air_temporary // used when reconstructing a pipeline that broke
@@ -100,7 +103,7 @@
qdel(meter)
qdel(src)
/obj/machinery/atmospherics/proc/change_color(var/new_color)
/obj/machinery/atmospherics/pipe/proc/change_color(var/new_color)
//only pass valid pipe colors please ~otherwise your pipe will turn invisible
if(!pipe_color_check(new_color))
return
@@ -108,21 +111,6 @@
pipe_color = new_color
update_icon()
/*
/obj/machinery/atmospherics/pipe/add_underlay(var/obj/machinery/atmospherics/node, var/direction)
if(istype(src, /obj/machinery/atmospherics/pipe/tank)) //todo: move tanks to unary devices
return ..()
if(node)
var/temp_dir = get_dir(src, node)
underlays += icon_manager.get_atmos_icon("pipe_underlay_intact", temp_dir, color_cache_name(node))
return temp_dir
else if(direction)
underlays += icon_manager.get_atmos_icon("pipe_underlay_exposed", direction, pipe_color)
else
return null
*/
/obj/machinery/atmospherics/pipe/color_cache_name(var/obj/machinery/atmospherics/node)
if(istype(src, /obj/machinery/atmospherics/pipe/tank))
return ..()
@@ -137,6 +125,20 @@
else
return pipe_color
/obj/machinery/atmospherics/pipe/hide(var/i)
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
/obj/machinery/atmospherics/pipe/process()
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
..()
else
. = PROCESS_KILL
//
// Simple Pipes - Just a tube, maybe bent
//
/obj/machinery/atmospherics/pipe/simple
icon = 'icons/atmos/pipes.dmi'
icon_state = ""
@@ -166,17 +168,6 @@
icon = null
alpha = 255
/obj/machinery/atmospherics/pipe/simple/hide(var/i)
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
/obj/machinery/atmospherics/pipe/simple/process()
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
..()
else
. = PROCESS_KILL
/obj/machinery/atmospherics/pipe/simple/check_pressure(pressure)
var/datum/gas_mixture/environment = loc.return_air()
@@ -411,7 +402,9 @@
level = 2
//
// Manifold Pipes - Three way "T" joints
//
/obj/machinery/atmospherics/pipe/manifold
icon = 'icons/atmos/manifold.dmi'
icon_state = ""
@@ -444,20 +437,9 @@
if(WEST)
initialize_directions = NORTH|EAST|SOUTH
/obj/machinery/atmospherics/pipe/manifold/hide(var/i)
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
/obj/machinery/atmospherics/pipe/manifold/pipeline_expansion()
return list(node1, node2, node3)
/obj/machinery/atmospherics/pipe/manifold/process()
if(!parent)
..()
else
. = PROCESS_KILL
/obj/machinery/atmospherics/pipe/manifold/Destroy()
if(node1)
node1.disconnect(src)
@@ -674,6 +656,10 @@
/obj/machinery/atmospherics/pipe/manifold/hidden/purple
color = PIPE_COLOR_PURPLE
//
// 4-Way Manifold Pipes - 4 way "cross" junction
//
/obj/machinery/atmospherics/pipe/manifold4w
icon = 'icons/atmos/manifold.dmi'
icon_state = ""
@@ -699,12 +685,6 @@
/obj/machinery/atmospherics/pipe/manifold4w/pipeline_expansion()
return list(node1, node2, node3, node4)
/obj/machinery/atmospherics/pipe/manifold4w/process()
if(!parent)
..()
else
. = PROCESS_KILL
/obj/machinery/atmospherics/pipe/manifold4w/Destroy()
if(node1)
node1.disconnect(src)
@@ -813,11 +793,6 @@
..()
update_icon()
/obj/machinery/atmospherics/pipe/manifold4w/hide(var/i)
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
/obj/machinery/atmospherics/pipe/manifold4w/atmos_init()
for(var/obj/machinery/atmospherics/target in get_step(src,1))
@@ -939,6 +914,9 @@
/obj/machinery/atmospherics/pipe/manifold4w/hidden/purple
color = PIPE_COLOR_PURPLE
//
// Pipe Cap - They go on the end
//
/obj/machinery/atmospherics/pipe/cap
name = "pipe endcap"
desc = "An endcap for pipes"
@@ -957,19 +935,9 @@
/obj/machinery/atmospherics/pipe/cap/init_dir()
initialize_directions = dir
/obj/machinery/atmospherics/pipe/cap/hide(var/i)
if(istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
/obj/machinery/atmospherics/pipe/cap/pipeline_expansion()
return list(node)
/obj/machinery/atmospherics/pipe/cap/process()
if(!parent)
..()
else
. = PROCESS_KILL
/obj/machinery/atmospherics/pipe/cap/Destroy()
if(node)
node.disconnect(src)
@@ -1061,7 +1029,9 @@
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
//
// Tanks - These are implemented as pipes with large volume
//
/obj/machinery/atmospherics/pipe/tank
icon = 'icons/atmos/tank_vr.dmi' //VOREStation Edit - New Icons
icon_state = "air_map"
@@ -1084,12 +1054,6 @@
/obj/machinery/atmospherics/pipe/tank/init_dir()
initialize_directions = dir
/obj/machinery/atmospherics/pipe/tank/process()
if(!parent)
..()
else
. = PROCESS_KILL
/obj/machinery/atmospherics/pipe/tank/Destroy()
if(node1)
node1.disconnect(src)
@@ -1227,6 +1191,9 @@
..()
icon_state = "n2o"
//
// Vent Pipe - Unpowered vent
//
/obj/machinery/atmospherics/pipe/vent
icon = 'icons/obj/atmospherics/pipe_vent.dmi'
icon_state = "intact"
@@ -1308,7 +1275,9 @@
else
icon_state = "exposed"
//
// Universal Pipe Adapter - Designed for connecting scrubbers, normal, and supply pipes together.
//
/obj/machinery/atmospherics/pipe/simple/visible/universal
name="Universal pipe adapter"
desc = "An adapter for regular, supply and scrubbers pipes"