[MIRROR] Cleans up internal temp code (#2853)
* Cleans up internal temp code (#30715) * cleanup * Update living.dm * Update atoms.dm * Update objs.dm * Cleans up internal temp code * Update living.dm * Update living.dm * fixes then ommits mob_temp stuff. * wew lad. commenting shit out is picky af.
This commit is contained in:
committed by
Poojawa
parent
cc49f70de8
commit
3e2f638793
+4
-1
@@ -636,4 +636,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
||||
return L.AllowDrop() ? L : get_turf(L)
|
||||
|
||||
/atom/Entered(atom/movable/AM, atom/oldLoc)
|
||||
SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
|
||||
SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
|
||||
|
||||
/atom/proc/return_temperature()
|
||||
return
|
||||
|
||||
@@ -766,7 +766,7 @@
|
||||
. = t_air.return_pressure()
|
||||
return
|
||||
|
||||
/obj/mecha/proc/return_temperature()
|
||||
/obj/mecha/return_temperature()
|
||||
var/datum/gas_mixture/t_air = return_air()
|
||||
if(t_air)
|
||||
. = t_air.return_temperature()
|
||||
|
||||
@@ -450,3 +450,7 @@
|
||||
|
||||
/obj/structure/closet/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/structure/closet/return_temperature()
|
||||
return
|
||||
@@ -180,3 +180,6 @@
|
||||
if(TT.has_exit(direction))
|
||||
setDir(direction)
|
||||
return
|
||||
|
||||
/obj/structure/transit_tube_pod/return_temperature()
|
||||
return air_contents.temperature
|
||||
@@ -396,4 +396,11 @@
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/can_see_pipes()
|
||||
return 0 //you can't see the pipe network when inside a cryo cell.
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/return_temperature()
|
||||
var/datum/gas_mixture/G = AIR1
|
||||
|
||||
if(G.total_moles() > 10)
|
||||
return G.temperature
|
||||
return ..()
|
||||
|
||||
#undef CRYOMOBS
|
||||
|
||||
@@ -712,30 +712,24 @@
|
||||
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure to restart it in next life().
|
||||
|
||||
/mob/living/proc/get_temperature(datum/gas_mixture/environment)
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
var/obj/mecha/M = loc
|
||||
loc_temp = M.return_temperature()
|
||||
|
||||
else if(istype(loc, /obj/structure/transit_tube_pod))
|
||||
loc_temp = environment.temperature
|
||||
|
||||
var/loc_temp = environment ? environment.temperature : T0C
|
||||
if(isobj(loc))
|
||||
var/obj/oloc = loc
|
||||
var/obj_temp = oloc.return_temperature()
|
||||
if(obj_temp != null)
|
||||
loc_temp = obj_temp
|
||||
/* if(ismob(loc))
|
||||
var/mob/living/mloc = loc
|
||||
var/mob_temp = mloc.return_temperature()
|
||||
if(mloc == DEAD)
|
||||
loc_temp = get_turf(loc) //wew
|
||||
else
|
||||
loc_temp = mob_temp
|
||||
*/
|
||||
//just gunna ommit this for now, it's on the 'to figgur out' list.
|
||||
else if(isspaceturf(get_turf(src)))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
|
||||
else if(istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
|
||||
var/obj/machinery/atmospherics/components/unary/cryo_cell/C = loc
|
||||
var/datum/gas_mixture/G = C.AIR1
|
||||
|
||||
if(G.total_moles() < 10)
|
||||
loc_temp = environment.temperature
|
||||
else
|
||||
loc_temp = G.temperature
|
||||
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
return loc_temp
|
||||
|
||||
/mob/living/proc/get_standard_pixel_x_offset(lying = 0)
|
||||
|
||||
Reference in New Issue
Block a user