diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm deleted file mode 100644 index 564b3e41f591..000000000000 --- a/code/game/objects/items/devices/suit_cooling.dm +++ /dev/null @@ -1,179 +0,0 @@ -/obj/item/device/suit_cooling_unit - name = "portable suit cooling unit" - desc = "A portable heat sink and liquid cooled radiator that can be hooked up to a space suit's existing temperature controls to provide industrial levels of cooling." - w_class = SIZE_LARGE - icon_state = "suitcooler0" - flags_equip_slot = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage - - //copied from tank.dm - flags_atom = FPRINT|CONDUCT - force = 5 - throwforce = 10 - throw_speed = SPEED_FAST - throw_range = 4 - - - - var/on = 0 //is it turned on? - var/cover_open = 0 //is the cover open? - var/obj/item/cell/cell - var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here - var/charge_consumption = 16.6 //charge per second at max_cooling - var/thermostat = T20C - - //TODO: make it heat up the surroundings when not in space - -/obj/item/device/suit_cooling_unit/Initialize(mapload, ...) - . = ..() - - START_PROCESSING(SSobj, src) - - cell = new/obj/item/cell(src) //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find - -/obj/item/device/suit_cooling_unit/Destroy() - STOP_PROCESSING(SSobj, src) - return ..() - -/obj/item/device/suit_cooling_unit/process() - if (!on || !cell) - return - - if (!ismob(loc)) - return - - if (!attached_to_suit(loc)) //make sure they have a suit and we are attached to it - return - - var/mob/living/carbon/human/H = loc - - var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling - var/env_temp = get_environment_temperature() //wont save you from a fire - var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling) - - if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision - return - - var/charge_usage = (temp_adj/max_cooling)*charge_consumption - - H.bodytemperature -= temp_adj*efficiency - H.recalculate_move_delay = TRUE - - cell.use(charge_usage) - - if(cell.charge <= 0) - turn_off() - -/obj/item/device/suit_cooling_unit/proc/get_environment_temperature() - if (ishuman(loc)) - var/mob/living/carbon/human/H = loc - return H.return_temperature() - - var/turf/T = get_turf(src) - return T.return_temperature() - -/obj/item/device/suit_cooling_unit/proc/attached_to_suit(mob/M) - if (!ishuman(M)) - return 0 - - var/mob/living/carbon/human/H = M - - if (!H.wear_suit || H.s_store != src) - return 0 - - return 1 - -/obj/item/device/suit_cooling_unit/proc/turn_on() - if(!cell) - return - if(cell.charge <= 0) - return - - on = 1 - updateicon() - -/obj/item/device/suit_cooling_unit/proc/turn_off() - if (ismob(src.loc)) - var/mob/M = src.loc - M.show_message("\The [src] clicks and whines as it powers down.", SHOW_MESSAGE_AUDIBLE) //let them know in case it's run out of power. - on = 0 - updateicon() - -/obj/item/device/suit_cooling_unit/attack_self(mob/user) - ..() - - if(cover_open && cell) - if(ishuman(user)) - user.put_in_hands(cell) - else - cell.forceMove(get_turf(loc)) - - cell.add_fingerprint(user) - cell.update_icon() - - to_chat(user, "You remove [cell].") - src.cell = null - updateicon() - return - - //TODO use a UI like the air tanks - if(on) - turn_off() - else - turn_on() - if (on) - to_chat(user, "You switch on [src].") - -/obj/item/device/suit_cooling_unit/attackby(obj/item/W as obj, mob/user as mob) - if (HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER)) - if(cover_open) - cover_open = 0 - to_chat(user, "You screw the panel into place.") - else - cover_open = 1 - to_chat(user, "You unscrew the panel.") - updateicon() - return - - if (istype(W, /obj/item/cell)) - if(cover_open) - if(cell) - to_chat(user, "There is \a [cell] already installed here.") - else - if(user.drop_held_item()) - W.forceMove(src) - cell = W - to_chat(user, "You insert [cell].") - updateicon() - return - - return ..() - -/obj/item/device/suit_cooling_unit/proc/updateicon() - if (cover_open) - if (cell) - icon_state = "suitcooler1" - else - icon_state = "suitcooler2" - else - icon_state = "suitcooler0" - -/obj/item/device/suit_cooling_unit/get_examine_text(mob/user) - . = ..() - if (on) - if (attached_to_suit(src.loc)) - . += "It's switched on and running." - else - . += "It's switched on, but not attached to anything." - else - . += "It is switched off." - - if (cover_open) - if(cell) - . += "The panel is open, exposing [cell]." - else - . += "The panel is open." - - if (cell) - . += "The charge meter reads [floor(cell.percent())]%." - else - . += "It doesn't have a power cell installed." diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 9c28ca42bc41..a8b056d0bb9d 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -32,7 +32,7 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS|BODY_FLAG_HANDS - allowed = list(/obj/item/device/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit) + allowed = list(/obj/item/device/flashlight,/obj/item/tank/emergency_oxygen) slowdown = 3 armor_melee = CLOTHING_ARMOR_NONE armor_bullet = CLOTHING_ARMOR_NONE diff --git a/code/modules/mob/living/carbon/human/life/life_helpers.dm b/code/modules/mob/living/carbon/human/life/life_helpers.dm index cab3ae21a782..9388204a967d 100644 --- a/code/modules/mob/living/carbon/human/life/life_helpers.dm +++ b/code/modules/mob/living/carbon/human/life/life_helpers.dm @@ -6,25 +6,6 @@ * Mostly for procs that are not called in the direct Life() loop, except for exact functionality matches (handle_breath, breathe, get_breath_from_internal for example) */ -//Calculate how vulnerable the human is to under- and overpressure. -//Returns 0 (equals 0 %) if sealed in an undamaged suit, 1 if unprotected (equals 100%). -//Suitdamage can modifiy this in 10% steps. -/mob/living/carbon/human/proc/get_pressure_weakness() - - var/pressure_adjustment_coefficient = 1 // Assume no protection at first. - - if(wear_suit && (wear_suit.flags_inventory & NOPRESSUREDMAGE) && head && (head.flags_inventory & NOPRESSUREDMAGE)) //Complete set of pressure-proof suit worn, assume fully sealed. - pressure_adjustment_coefficient = 0 - - //Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure protection. - if(istype(wear_suit, /obj/item/clothing/suit/space)) - var/obj/item/clothing/suit/space/S = wear_suit - if(S.can_breach && S.damage) - pressure_adjustment_coefficient += S.damage * 0.1 - - pressure_adjustment_coefficient = min(1, max(pressure_adjustment_coefficient, 0)) //So it isn't less than 0 or larger than 1. - return pressure_adjustment_coefficient - /mob/living/carbon/human/proc/stabilize_body_temperature() diff --git a/colonialmarines.dme b/colonialmarines.dme index 7915adce0587..54760dde8594 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1140,7 +1140,6 @@ #include "code\game\objects\items\devices\pipe_painter.dm" #include "code\game\objects\items\devices\portable_vendor.dm" #include "code\game\objects\items\devices\scanners.dm" -#include "code\game\objects\items\devices\suit_cooling.dm" #include "code\game\objects\items\devices\taperecorder.dm" #include "code\game\objects\items\devices\teleportation.dm" #include "code\game\objects\items\devices\transfer_valve.dm" diff --git a/maps/map_files/CORSAT/Corsat.dmm b/maps/map_files/CORSAT/Corsat.dmm index 435659e102e2..f335e4c41e8b 100644 --- a/maps/map_files/CORSAT/Corsat.dmm +++ b/maps/map_files/CORSAT/Corsat.dmm @@ -24911,7 +24911,6 @@ /area/corsat/sigma/south/complex) "bTM" = ( /obj/structure/surface/table/reinforced, -/obj/item/device/suit_cooling_unit, /turf/open/floor/corsat/retrosquareslight, /area/corsat/sigma/south/complex) "bTN" = (