diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 7a5d278a22..03803fea24 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -16,14 +16,9 @@
/obj/item/device/flashlight/initialize()
..()
- if(on)
- icon_state = "[initial(icon_state)]-on"
- set_light(brightness_on)
- else
- icon_state = "[initial(icon_state)]"
- set_light(0)
+ update_icon()
-/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
+/obj/item/device/flashlight/update_icon()
if(on)
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
@@ -36,7 +31,7 @@
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
return 0
on = !on
- update_brightness(user)
+ update_icon()
user.update_action_buttons()
return 1
@@ -171,11 +166,7 @@
on = 0
src.force = initial(src.force)
src.damtype = initial(src.damtype)
- if(ismob(loc))
- var/mob/U = loc
- update_brightness(U)
- else
- update_brightness(null)
+ update_icon()
/obj/item/device/flashlight/flare/attack_self(mob/user)
@@ -206,10 +197,11 @@
on = 1 //Bio-luminesence has one setting, on.
/obj/item/device/flashlight/slime/New()
+ ..()
set_light(brightness_on)
- spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
- update_brightness()
- icon_state = initial(icon_state)
+
+/obj/item/device/flashlight/slime/update_icon()
+ return
/obj/item/device/flashlight/slime/attack_self(mob/user)
return //Bio-luminescence does not toggle.
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 7ffe728030..c0c5b95614 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -129,6 +129,7 @@
var/watertemp = "normal" //freezing, normal, or boiling
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
var/is_washing = 0
+ var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C)
/obj/machinery/shower/New()
..()
@@ -150,7 +151,7 @@
if(on)
if (M.loc == loc)
wash(M)
- check_heat(M)
+ process_heat(M)
for (var/atom/movable/G in src.loc)
G.clean_blood()
@@ -158,15 +159,11 @@
if(I.type == /obj/item/device/analyzer)
user << "The water temperature seems to be [watertemp]."
if(istype(I, /obj/item/weapon/wrench))
+ var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
user << "You begin to adjust the temperature valve with \the [I]."
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 50))
- switch(watertemp)
- if("normal")
- watertemp = "freezing"
- if("freezing")
- watertemp = "boiling"
- if("boiling")
- watertemp = "normal"
+ watertemp = newtemp
user.visible_message("[user] adjusts the shower with \the [I].", "You adjust the shower with \the [I].")
add_fingerprint(user)
@@ -177,8 +174,8 @@
if(on)
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
- if(watertemp == "freezing")
- return
+ if(temperature_settings[watertemp] < T20C)
+ return //no mist for cold water
if(!ismist)
spawn(50)
if(src && on)
@@ -200,7 +197,7 @@
wash(O)
if(ismob(O))
mobpresent += 1
- check_heat(O)
+ process_heat(O)
/obj/machinery/shower/Uncrossed(atom/movable/O)
if(ismob(O))
@@ -304,8 +301,8 @@
if(!on) return
wash_floor()
if(!mobpresent) return
- for(var/mob/living/carbon/C in loc)
- check_heat(C)
+ for(var/mob/living/L in loc)
+ process_heat(L)
/obj/machinery/shower/proc/wash_floor()
if(!ismist && is_washing)
@@ -317,22 +314,19 @@
spawn(100)
is_washing = 0
-/obj/machinery/shower/proc/check_heat(mob/M as mob)
- if(!on || watertemp == "normal") return
- if(iscarbon(M))
- var/mob/living/carbon/C = M
-
- if(watertemp == "freezing")
- C.bodytemperature = max(80, C.bodytemperature - 80)
- C << "The water is freezing!"
- return
- if(watertemp == "boiling")
- C.bodytemperature = min(500, C.bodytemperature + 35)
- C.adjustFireLoss(5)
- C << "The water is searing!"
- return
-
-
+/obj/machinery/shower/proc/process_heat(mob/living/M)
+ if(!on || !istype(M)) return
+
+ var/temperature = temperature_settings[watertemp]
+ var/temp_adj = between(BODYTEMP_COOLING_MAX, temperature - M.bodytemperature, BODYTEMP_HEATING_MAX)
+ M.bodytemperature += temp_adj
+
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(temperature >= H.species.heat_level_1)
+ H << "The water is searing hot!"
+ else if(temperature <= H.species.cold_level_1)
+ H << "The water is freezing cold!"
/obj/item/weapon/bikehorn/rubberducky
name = "rubber ducky"
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 632bd4dc73..6333d56d0e 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -659,6 +659,26 @@ default behaviour is:
resting = !resting
src << "\blue You are now [resting ? "resting" : "getting up"]"
+/mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item)
+ if(istype(carried_item, /obj/item/weapon/implant))
+ return 1
+ if(istype(carried_item, /obj/item/clothing/mask/facehugger))
+ return 1
+ return 0
+
+/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
+ if(carried_item in internal_organs)
+ return 1
+ return ..()
+
+/mob/living/carbon/human/is_allowed_vent_crawl_item(var/obj/item/carried_item)
+ if(carried_item in organs)
+ return 1
+ return ..()
+
+/mob/living/simple_animal/spiderbot/is_allowed_vent_crawl_item(var/obj/item/carried_item)
+ return carried_item != held_item
+
/mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn
if(stat)
src << "You must be conscious to do this!"
@@ -721,9 +741,10 @@ default behaviour is:
if(!ignore_items)
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
- if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
- src << "\red You can't be carrying items or have items equipped when vent crawling!"
- return
+ if(is_allowed_vent_crawl_item(carried_item))
+ continue
+ src << "You can't be carrying items or have items equipped when vent crawling!"
+ return
if(isslime(src))
var/mob/living/carbon/slime/S = src
diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm
index 0009684c30..30bcf0ba6f 100644
--- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm
+++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm
@@ -144,7 +144,7 @@
/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(M.bodytemperature < 170)
M.adjustCloneLoss(-30 * removed)
- M.adjustOxyLoss(-3 * removed)
+ M.adjustOxyLoss(-30 * removed)
M.heal_organ_damage(30 * removed, 30 * removed)
M.adjustToxLoss(-30 * removed)
diff --git a/code/modules/xgm/xgm_gas_mixture.dm b/code/modules/xgm/xgm_gas_mixture.dm
index b1c3a775d1..41100f6f1c 100644
--- a/code/modules/xgm/xgm_gas_mixture.dm
+++ b/code/modules/xgm/xgm_gas_mixture.dm
@@ -97,15 +97,15 @@
/datum/gas_mixture/proc/equalize(datum/gas_mixture/sharer)
- for(var/g in sharer.gas)
+ var/our_heatcap = heat_capacity()
+ var/share_heatcap = sharer.heat_capacity()
+
+ for(var/g in gas|sharer.gas)
var/comb = gas[g] + sharer.gas[g]
comb /= volume + sharer.volume
gas[g] = comb * volume
sharer.gas[g] = comb * sharer.volume
- var/our_heatcap = heat_capacity()
- var/share_heatcap = sharer.heat_capacity()
-
if(our_heatcap + share_heatcap)
temperature = ((temperature * our_heatcap) + (sharer.temperature * share_heatcap)) / (our_heatcap + share_heatcap)
sharer.temperature = temperature
diff --git a/maps/exodus-1.dmm b/maps/exodus-1.dmm
index f6a34cc9af..d75f47eb4d 100644
--- a/maps/exodus-1.dmm
+++ b/maps/exodus-1.dmm
@@ -5101,7 +5101,7 @@
"bUe" = (/obj/machinery/light{dir = 1},/obj/machinery/door/firedoor,/turf/simulated/floor{tag = "icon-whiteblue (NORTH)"; icon_state = "whiteblue"; dir = 1},/area/medical/medbay4)
"bUf" = (/obj/structure/sign/science{pixel_x = 32},/obj/machinery/atmospherics/unary/vent_pump/on{dir = 8},/turf/simulated/floor{icon_state = "white"},/area/rnd/research)
"bUg" = (/turf/simulated/wall,/area/rnd/misc_lab)
-"bUh" = (/obj/machinery/light_switch{pixel_y = -23},/obj/machinery/power/apc{dir = 8; name = "west bump"; pixel_x = -24},/obj/structure/cable/green{d2 = 4; icon_state = "0-4"},/turf/simulated/floor{icon_state = "floorgrime"},/area/rnd/storage)
+"bUh" = (/obj/machinery/light_switch{pixel_y = -23},/obj/machinery/power/apc{dir = 8; name = "west bump"; pixel_x = -24},/obj/structure/cable/green{d2 = 4; icon_state = "0-4"},/obj/machinery/vending/cigarette{pixel_x = 0; pixel_y = 2},/turf/simulated/floor{icon_state = "floorgrime"},/area/rnd/storage)
"bUi" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/green{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor{icon_state = "warningcorner"; dir = 8},/area/rnd/storage)
"bUj" = (/obj/structure/sign/fire{pixel_x = 32; pixel_y = 0},/turf/simulated/floor{dir = 9; icon_state = "whitehall"},/area/rnd/research)
"bUk" = (/obj/structure/ore_box,/obj/machinery/light{dir = 4},/turf/simulated/shuttle/floor,/area/shuttle/mining/station)
@@ -5168,7 +5168,7 @@
"bVt" = (/obj/structure/table/reinforced,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab)
"bVu" = (/obj/machinery/computer/security/telescreen{desc = "Used to monitor the proceedings inside the test chamber."; name = "Test Chamber Monitor"; network = list("Miscellaneous Reseach"); pixel_x = 32; pixel_y = 0},/obj/structure/cable/green{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab)
"bVv" = (/obj/machinery/atmospherics/portables_connector{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor,/area/rnd/mixing)
-"bVw" = (/obj/machinery/vending/cigarette{pixel_x = 0; pixel_y = 2},/turf/simulated/floor{icon_state = "white"},/area/rnd/research)
+"bVw" = (/obj/machinery/vending/coffee,/turf/simulated/floor{icon_state = "white"},/area/rnd/research)
"bVx" = (/obj/machinery/door/firedoor/border_only,/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/door/airlock/glass_engineering{name = "Engineering Break Room"; req_one_access = list(10)},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/engineering/break_room)
"bVy" = (/obj/machinery/atmospherics/unary/heat_exchanger{dir = 8},/turf/simulated/floor{dir = 10; icon_state = "warning"},/area/rnd/mixing)
"bVz" = (/obj/machinery/atmospherics/pipe/manifold/visible,/obj/machinery/meter,/turf/simulated/floor{icon_state = "white"},/area/rnd/mixing)