From a57ec7acdd3b05d892bed0ef664e7bb428fc93e0 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 10 May 2014 10:45:17 +0930 Subject: [PATCH 1/7] Fixes #4810 --- code/modules/mob/living/carbon/human/life.dm | 10 ++++--- code/modules/mob/living/carbon/monkey/life.dm | 28 +++++++++++-------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index fe535fc897..cfcc611f19 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -575,6 +575,11 @@ proc/handle_environment(datum/gas_mixture/environment) if(!environment) return + + //Moved pressure calculations here for use in skip-processing check. + var/pressure = environment.return_pressure() + var/adjusted_pressure = calculate_affecting_pressure(pressure) + if(!istype(get_turf(src), /turf/space)) //space is not meant to change your body temperature. var/loc_temp = T0C if(istype(loc, /obj/mecha)) @@ -586,7 +591,7 @@ else loc_temp = environment.temperature - if(abs(loc_temp - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE) + if(adjusted_pressure < species.warning_low_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE) return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp //Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit. @@ -638,9 +643,6 @@ // Account for massive pressure differences. Done by Polymorph // Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense! - - var/pressure = environment.return_pressure() - var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob. if(status_flags & GODMODE) return 1 //godmode if(adjusted_pressure >= species.hazard_high_pressure) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 7e2d73abe4..4a096f9b79 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -22,7 +22,7 @@ if(loc) environment = loc.return_air() - if (stat != DEAD) + if (stat != DEAD) if(!istype(src,/mob/living/carbon/monkey/diona)) //still breathing //First, resolve location and get a breath if(air_master.current_cycle%4==2) @@ -79,7 +79,7 @@ if(prob(1)) emote(pick("scratch","jump","roll","tail")) updatehealth() - + /mob/living/carbon/monkey/calculate_affecting_pressure(var/pressure) ..() @@ -174,9 +174,9 @@ for (var/ID in virus2) var/datum/disease2/disease/V = virus2[ID] V.cure(src) - + for(var/obj/effect/decal/cleanable/O in view(1,src)) - if(istype(O,/obj/effect/decal/cleanable/blood)) + if(istype(O,/obj/effect/decal/cleanable/blood)) var/obj/effect/decal/cleanable/blood/B = O if(B.virus2.len) for (var/ID in B.virus2) @@ -397,9 +397,18 @@ if(!environment) return - if(abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE) - return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp - + //Moved these vars here for use in the fuck-it-skip-processing check. + var/pressure = environment.return_pressure() + var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob. + + if(adjusted_pressure < WARNING_HIGH_PRESSURE && adjusted_pressure > WARNING_LOW_PRESSURE && abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE) + + //Hopefully should fix the walk-inside-still-pressure-warning issue. + if(pressure_alert) + pressure_alert = 0 + + return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp + var/environment_heat_capacity = environment.heat_capacity() if(istype(get_turf(src), /turf/space)) var/turf/heat_turf = get_turf(src) @@ -414,9 +423,6 @@ bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000) //Account for massive pressure differences - - var/pressure = environment.return_pressure() - var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob. switch(adjusted_pressure) if(HAZARD_HIGH_PRESSURE to INFINITY) adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) ) @@ -468,7 +474,7 @@ adjustToxLoss(-1) adjustOxyLoss(-1) - if(reagents && reagents.reagent_list.len) + if(reagents && reagents.reagent_list.len) reagents.metabolize(src,alien) if (drowsyness) From f32d2811327d44b507687087365529af6c4b7f5e Mon Sep 17 00:00:00 2001 From: Loganbacca Date: Sun, 11 May 2014 18:30:18 +1200 Subject: [PATCH 2/7] Compressed matter implanter fix Compressed matter implanters will now correctly remove the compressed item from the game world if it is in an inventory (player or storage container). --- code/game/objects/items/weapons/implants/implanter.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 3706ef6bfd..f1f5d8521e 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -51,7 +51,7 @@ src.imp = null update() - + return @@ -120,6 +120,12 @@ if (c.scanned) user << "\red Something is already scanned inside the implant!" return - imp:scanned = A + c.scanned = A + if(istype(A.loc,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = A.loc + H.u_equip(A) + else if(istype(A.loc,/obj/item/weapon/storage)) + var/obj/item/weapon/storage/S = A.loc + S.remove_from_storage(A) A.loc.contents.Remove(A) update() From 8e15a76da13787f0be9f5b80f7f78c735106daff Mon Sep 17 00:00:00 2001 From: Ravensdale Date: Mon, 12 May 2014 01:15:45 -0700 Subject: [PATCH 3/7] Fixes runtime with yellow slime extracts. --- code/game/objects/items/devices/flashlight.dm | 24 ++++++++++++++++++- code/modules/reagents/Chemistry-Recipes.dm | 7 +++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index bb8132744f..3d9cb6031a 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -194,4 +194,26 @@ user.visible_message("[user] activates the flare.", "You pull the cord on the flare, activating it!") src.force = on_damage src.damtype = "fire" - processing_objects += src \ No newline at end of file + processing_objects += src + +/obj/item/device/flashlight/slime + gender = PLURAL + name = "glowing slime extract" + desc = "A glowing ball of what appears to be amber." + icon = 'icons/obj/lighting.dmi' + icon_state = "floor1" //not a slime extract sprite but... something close enough! + item_state = "slime" + w_class = 1 + m_amt = 0 + g_amt = 0 + brightness_on = 6 + on = 1 //Bio-luminesence has one setting, on. + +/obj/item/device/flashlight/slime/New() + SetLuminosity(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/attack_self(mob/user) + return //Bio-luminescence does not toggle. \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 9ecfa7fe18..66654edb1b 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -1227,9 +1227,10 @@ datum required_other = 1 on_reaction(var/datum/reagents/holder) for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null)) - O.show_message(text("\red The slime begins to emit a soft light."), 1) - var/obj/item/slime_extract/yellow/Y = holder - Y.luminosity = 6 + O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1) + var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime + F.loc = get_turf(holder.my_atom) + //Purple slimepsteroid From 76f8a94974b1b9f78a69c9d707bb9d879451a1aa Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 12 May 2014 21:24:00 -0500 Subject: [PATCH 4/7] Removes the special name coloring of those with special roles from inappropriate times. Basically if we don't want a privmsg link we're not going to include the font change as well. This should fix it from displaying the coloring code in logs and other places not meant to be html (irc bot). --- code/__HELPERS/unsorted.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 099f166875..dd2a2b9dcc 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -538,7 +538,7 @@ Turf and target are seperate in case you want to teleport some distance from a t else if(M.name) name = M.name - if(is_special_character(M)) + if(include_link && is_special_character(M)) . += "/([name])" //Orange else . += "/([name])" From 25983be804a107371be5d70557d564d016eb6555 Mon Sep 17 00:00:00 2001 From: Loganbacca Date: Tue, 13 May 2014 23:29:11 +1200 Subject: [PATCH 5/7] Added exception for breaking full tile windows on top of single pane windows --- code/_onclick/adjacent.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index b39df75189..fa08ea6f6b 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -108,7 +108,12 @@ if( O.flags&ON_BORDER) // windows have throwpass but are on border, check them first if( O.dir & target_dir || O.dir&(O.dir-1) ) // full tile windows are just diagonals mechanically - return 0 + var/obj/structure/window/W = target_atom + if(istype(W)) + if(!W.is_fulltile()) //exception for breaking full tile windows on top of single pane windows + return 0 + else + return 0 else if( !border_only ) // dense, not on border, cannot pass over return 0 From 2d2a1459078ac4baf0af014133e90041f3a2798b Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 14 May 2014 00:47:01 -0400 Subject: [PATCH 6/7] Replaces broken generator in eng hard storage --- code/modules/power/port_gen.dm | 2 +- maps/tgstation2.dmm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 7f18f75fc7..168e492c25 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -42,7 +42,7 @@ display round(lastgen) and plasmatank amount //Baseline portable generator. Has all the default handling. Not intended to be used on it's own (since it generates unlimited power). /obj/machinery/power/port_gen - name = "Portable Generator" + name = "Placeholder Generator" //seriously, don't use this. It can't be anchored without VV magic. desc = "A portable generator for emergency backup power" icon = 'icons/obj/power.dmi' icon_state = "portgen0" diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index 526a6786f9..706758221c 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -5684,7 +5684,7 @@ "cfp" = (/obj/machinery/atmospherics/pipe/simple/visible/green{tag = "icon-intact (SOUTHEAST)"; icon_state = "intact"; dir = 6},/turf/simulated/floor,/area/atmos) "cfq" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only{dir = 2},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/atmos) "cfr" = (/obj/structure/closet/crate/solar,/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/turf/simulated/floor/plating,/area/engine/storage_hard) -"cfs" = (/obj/machinery/power/port_gen,/turf/simulated/floor/plating,/area/engine/storage_hard) +"cfs" = (/obj/machinery/power/port_gen/pacman,/turf/simulated/floor/plating,/area/engine/storage_hard) "cft" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/unary/vent_scrubber{on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor,/area/engine/workshop) "cfu" = (/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/turf/simulated/floor,/area/engine/workshop) "cfv" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/turf/simulated/floor,/area/engine/workshop) From 4ceada67fdead8a27917f47a64f10f910820f536 Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 14 May 2014 01:15:01 -0400 Subject: [PATCH 7/7] Fixes #4965 --- code/modules/virus2/disease2.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm index 422ca221f6..d21f8b72af 100644 --- a/code/modules/virus2/disease2.dm +++ b/code/modules/virus2/disease2.dm @@ -67,7 +67,7 @@ //Space antibiotics stop disease completely if(mob.reagents.has_reagent("spaceacillin")) if(stage == 1 && prob(20)) - src.cure() + src.cure(mob) return //Virus food speeds up disease progress