mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 00:51:26 +00:00
* Base work for the unathi robot subspecies. * Adds metabolism species, kidney vars, and the robot unathi organs. * Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here. * First autakh implant power. * Fixes the organs action button this time. * Finishes more implants, and interactions with flashs and vaurca. * Prepare for great changes. * Drops the real bomb, boss. * He who fights with monsters. * Far more work into augments and limb removing powers. * Limb verbs should be good now. * A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case. * Probably the last work on implants. * Some extra touches. * Some tweaks to the species. * More fixes and adds kyre's sprites. * More runtime fixes. * Fixes the species name too. * Fixes travis. * Updates this file too to work with the new tools procs. * Adds changelog * Fixed changelog. * Unathi hair and lore description. * Some tweaks to this too. * Locks away them for now, they will be released after we got all the events and etc done. * Changes this chemical. * Fixes an airlock runtime. * Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning. * Organs removal changes; can't take out the organ if it is too damage. * Restricts them back again. * Robotic organs now have the proper icons and names. * Adds sprites for their organs and some extra tweaks. * Fixes this missing icon. * emp should also now hurt assited organs. * Tweaks more organ related things. * Fixes the head not being properly set as well. * Fixes their flags. * fixes the flag for real this time. * Poze's review. * Changes the au'takh organ buttons to don't be animated. * Helps with adminbus or something. * Fowl's requested changes. * Fixes a typo. * Robotic limb's brute and burn mods are now controlled by the limb model. * Fowl's changes once more. * Stops some spam. * More grammar. * No eal. * Skull's review.
90 lines
2.8 KiB
Plaintext
90 lines
2.8 KiB
Plaintext
/obj/machinery/atmospherics/unary/heat_exchanger
|
|
|
|
icon = 'icons/obj/atmospherics/heat_exchanger.dmi'
|
|
icon_state = "intact"
|
|
density = 1
|
|
|
|
name = "Heat Exchanger"
|
|
desc = "Exchanges heat between two input gases. Setup for fast heat transfer"
|
|
|
|
var/obj/machinery/atmospherics/unary/heat_exchanger/partner = null
|
|
var/update_cycle
|
|
|
|
update_icon()
|
|
if(node)
|
|
icon_state = "intact"
|
|
else
|
|
icon_state = "exposed"
|
|
|
|
return
|
|
|
|
atmos_init()
|
|
if(!partner)
|
|
var/partner_connect = turn(dir,180)
|
|
|
|
for(var/obj/machinery/atmospherics/unary/heat_exchanger/target in get_step(src,partner_connect))
|
|
if(target.dir & get_dir(src,target))
|
|
partner = target
|
|
partner.partner = src
|
|
break
|
|
|
|
..()
|
|
|
|
machinery_process()
|
|
..()
|
|
if(QDELETED(partner))
|
|
return 0
|
|
|
|
if(!SSair || SSair.times_fired <= update_cycle)
|
|
return 0
|
|
|
|
update_cycle = SSair.times_fired
|
|
partner.update_cycle = SSair.times_fired
|
|
|
|
var/air_heat_capacity = air_contents.heat_capacity()
|
|
var/other_air_heat_capacity = partner.air_contents.heat_capacity()
|
|
var/combined_heat_capacity = other_air_heat_capacity + air_heat_capacity
|
|
|
|
var/old_temperature = air_contents.temperature
|
|
var/other_old_temperature = partner.air_contents.temperature
|
|
|
|
if(combined_heat_capacity > 0)
|
|
var/combined_energy = partner.air_contents.temperature*other_air_heat_capacity + air_heat_capacity*air_contents.temperature
|
|
|
|
var/new_temperature = combined_energy/combined_heat_capacity
|
|
air_contents.temperature = new_temperature
|
|
partner.air_contents.temperature = new_temperature
|
|
|
|
if(network)
|
|
if(abs(old_temperature-air_contents.temperature) > 1)
|
|
network.update = 1
|
|
|
|
if(partner.network)
|
|
if(abs(other_old_temperature-partner.air_contents.temperature) > 1)
|
|
partner.network.update = 1
|
|
|
|
return 1
|
|
|
|
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
|
if (!W.iswrench())
|
|
return ..()
|
|
var/turf/T = src.loc
|
|
if (level==1 && isturf(T) && !T.is_plating())
|
|
user << "<span class='warning'>You must remove the plating first.</span>"
|
|
return 1
|
|
var/datum/gas_mixture/int_air = return_air()
|
|
var/datum/gas_mixture/env_air = loc.return_air()
|
|
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
|
user << "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>"
|
|
add_fingerprint(user)
|
|
return 1
|
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
|
user << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
|
if (do_after(user, 40, act_target = src))
|
|
user.visible_message( \
|
|
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
|
"<span class='notice'>You have unfastened \the [src].</span>", \
|
|
"You hear a ratchet.")
|
|
new /obj/item/pipe(loc, make_from=src)
|
|
qdel(src)
|