From 75f19938b3d93d4326097c2e7196ae78b6efcac2 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 24 Aug 2015 00:03:56 -0400 Subject: [PATCH 1/8] Fixes an apparent clonexadone typo --- .../reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 0009684c309..30bcf0ba6f3 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) From 286e16a0f37ba1b54038b1bd7d375ecb36c76b39 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 24 Aug 2015 00:11:40 -0400 Subject: [PATCH 2/8] Fixes cryogenic showers Changes shower temperature settings to use more reasonable temperature values. A menu is now shown when adjusting shower temperature. --- code/game/objects/structures/watercloset.dm | 52 +++++++++------------ 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 3da9f864851..62f98dcedac 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" From f28fa29d54fe97d51947d2bc8da53d347cf1dd45 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Mon, 24 Aug 2015 16:42:37 +0200 Subject: [PATCH 3/8] Having organs should no longer prevent vent crawling. --- code/modules/mob/living/living.dm | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 2c19a5a9dfb..fc9f6f65196 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -660,6 +660,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!" @@ -722,9 +742,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 From 8521df47f36aea530b1035900678db4e0f4f383e Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Mon, 24 Aug 2015 19:24:55 +0100 Subject: [PATCH 4/8] fix equalize() not equalizing gases --- code/ZAS/_gas_mixture_xgm.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ZAS/_gas_mixture_xgm.dm b/code/ZAS/_gas_mixture_xgm.dm index 62f47a36bd2..4dd22894862 100644 --- a/code/ZAS/_gas_mixture_xgm.dm +++ b/code/ZAS/_gas_mixture_xgm.dm @@ -99,7 +99,7 @@ /datum/gas_mixture/proc/equalize(datum/gas_mixture/sharer) - for(var/g in sharer.gas) + for(var/g in gas|sharer.gas) var/comb = gas[g] + sharer.gas[g] comb /= volume + sharer.volume gas[g] = comb * volume From 9a5da57d60a15e6f7e0d257a208ce9b338d55f23 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Mon, 24 Aug 2015 19:33:37 +0100 Subject: [PATCH 5/8] fix heatcap calculation in equalize() --- code/ZAS/_gas_mixture_xgm.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ZAS/_gas_mixture_xgm.dm b/code/ZAS/_gas_mixture_xgm.dm index 4dd22894862..594924eb474 100644 --- a/code/ZAS/_gas_mixture_xgm.dm +++ b/code/ZAS/_gas_mixture_xgm.dm @@ -99,15 +99,15 @@ /datum/gas_mixture/proc/equalize(datum/gas_mixture/sharer) + 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 From e03585898dac183463d5beaecfa4aba869a82736 Mon Sep 17 00:00:00 2001 From: HarpyEagle Date: Mon, 24 Aug 2015 16:23:30 -0400 Subject: [PATCH 6/8] Cleans up flashlight fix Moves icon state changes into update_icon(), less duplicated code. Also makes glowing slime extracts less dumb. --- code/game/objects/items/devices/flashlight.dm | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index c9de89d29cd..609bacc6c1d 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() return 1 @@ -165,11 +160,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) @@ -200,10 +191,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. From a2c121ed50f641ded42b0997e010b5da9155d963 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Mon, 24 Aug 2015 21:59:12 +0100 Subject: [PATCH 7/8] Fixes #7884, should fix #10859 --- code/modules/nano/nanoui.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index f134d5d93b4..85f22f62e79 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -347,7 +347,7 @@ nanoui is used to open and update nano browser uis template_data_json = list2json(templates) var/list/send_data = get_send_data(initial_data) - var/initial_data_json = replacetext(list2json_usecache(send_data), "'", "'") + var/initial_data_json = replacetext(list2json_usecache(send_data), """, "&#34;") var/url_parameters_json = list2json(list("src" = "\ref[src]")) From c1dc9d3f7e91ece091da86de59beb43d92f0447e Mon Sep 17 00:00:00 2001 From: Chinsky Date: Tue, 25 Aug 2015 03:35:19 +0300 Subject: [PATCH 8/8] Revert "Fixes #7884, should fix #10859" --- code/modules/nano/nanoui.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 85f22f62e79..f134d5d93b4 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -347,7 +347,7 @@ nanoui is used to open and update nano browser uis template_data_json = list2json(templates) var/list/send_data = get_send_data(initial_data) - var/initial_data_json = replacetext(list2json_usecache(send_data), """, "&#34;") + var/initial_data_json = replacetext(list2json_usecache(send_data), "'", "'") var/url_parameters_json = list2json(list("src" = "\ref[src]"))