mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Merge pull request #3030 from Razharas/UnaryMachinery
General cryo and unary atmos machinery fix
This commit is contained in:
@@ -51,6 +51,14 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
default_change_direction_wrench(mob/user, /obj/item/weapon/wrench/W)
|
||||
if(..())
|
||||
initialize_directions = dir
|
||||
if(node)
|
||||
disconnect(node)
|
||||
initialize()
|
||||
. = 1
|
||||
|
||||
build_network()
|
||||
if(!network && node)
|
||||
network = new /datum/pipe_network()
|
||||
@@ -82,6 +90,7 @@
|
||||
|
||||
disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference==node)
|
||||
node.disconnect(src)
|
||||
del(network)
|
||||
node = null
|
||||
|
||||
|
||||
@@ -43,11 +43,6 @@
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
if(default_change_direction_wrench(user, I))
|
||||
if(node)
|
||||
disconnect(node)
|
||||
initialize()
|
||||
if(node)
|
||||
node.update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/update_icon()
|
||||
@@ -165,11 +160,6 @@
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
if(default_change_direction_wrench(user, I))
|
||||
if(node)
|
||||
disconnect(node)
|
||||
initialize()
|
||||
if(node)
|
||||
node.update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/update_icon()
|
||||
|
||||
@@ -226,11 +226,6 @@
|
||||
return
|
||||
|
||||
if(default_change_direction_wrench(user, I))
|
||||
if(node)
|
||||
disconnect(node)
|
||||
initialize()
|
||||
if(node)
|
||||
node.update_icon()
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
@@ -241,6 +236,8 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/open_machine()
|
||||
if(!state_open && !panel_open)
|
||||
layer = 3
|
||||
if(occupant)
|
||||
occupant.bodytemperature = Clamp(occupant.bodytemperature, 261, 360)
|
||||
..()
|
||||
if(beaker)
|
||||
beaker.loc = src
|
||||
@@ -272,6 +269,7 @@
|
||||
return
|
||||
if(occupant)
|
||||
if(occupant.stat == 2 || occupant.health >= 100) //Why waste energy on dead or healthy people
|
||||
occupant.bodytemperature = T0C
|
||||
return
|
||||
occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature) * current_heat_capacity / (current_heat_capacity + air_contents.heat_capacity())
|
||||
occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user