From ec4c776c809f5ebef2c65852097e05e04c1f5a11 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:55:25 -0700 Subject: [PATCH 01/18] get this party started with carbon monoxide --- code/__DEFINES/atmospherics.dm | 1 + code/__DEFINES/species.dm | 12 ++-- .../atmospherics/auxgm/breathing_classes.dm | 2 +- code/modules/atmospherics/auxgm/gas_types.dm | 15 +++- .../modules/atmospherics/gasmixtures/auxgm.dm | 1 + .../atmospherics/machinery/airalarm.dm | 13 ++-- .../machinery/portable/canister.dm | 6 ++ .../machinery/portable/scrubber.dm | 2 +- code/modules/power/port_gen.dm | 7 ++ .../chemistry/reagents/other_reagents.dm | 71 ++++++++++++++++++- code/modules/surgery/organs/lungs.dm | 27 +++++++ 11 files changed, 142 insertions(+), 15 deletions(-) diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 22e69cd06d9f..261f71830172 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -337,6 +337,7 @@ #define GAS_HYDROGEN "h2" #define GAS_CHLORINE "cl2" #define GAS_HYDROGEN_CHLORIDE "hcl" +#define GAS_CO "co" #define GAS_FLAG_DANGEROUS (1<<0) #define GAS_FLAG_BREATH_PROC (1<<1) diff --git a/code/__DEFINES/species.dm b/code/__DEFINES/species.dm index 1a8cd17d802a..28229082335a 100644 --- a/code/__DEFINES/species.dm +++ b/code/__DEFINES/species.dm @@ -1,12 +1,12 @@ // Pressure limits. /// This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) -#define HAZARD_HIGH_PRESSURE 550 +#define HAZARD_HIGH_PRESSURE 340 /// This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) -#define WARNING_HIGH_PRESSURE 325 +#define WARNING_HIGH_PRESSURE 238 /// This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE) -#define WARNING_LOW_PRESSURE 50 +#define WARNING_LOW_PRESSURE 70 /// This is when the black ultra-low pressure icon is displayed. (This one is set as a constant) -#define HAZARD_LOW_PRESSURE 20 +#define HAZARD_LOW_PRESSURE 40 /// This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount. #define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 @@ -28,11 +28,11 @@ /// The body temperature limit the human body can take before it starts taking damage from heat. /// This also affects how fast the body normalises it's temperature when hot. /// 340k is about 66c, and rather high for a human. -#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 30) +#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 20) /// The body temperature limit the human body can take before it starts taking damage from cold. /// This also affects how fast the body normalises it's temperature when cold. /// 270k is about -3c, that is below freezing and would hurt over time. -#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 40) +#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 30) //VOX DEFINES diff --git a/code/modules/atmospherics/auxgm/breathing_classes.dm b/code/modules/atmospherics/auxgm/breathing_classes.dm index cfc82adbffa1..462a635bfa89 100644 --- a/code/modules/atmospherics/auxgm/breathing_classes.dm +++ b/code/modules/atmospherics/auxgm/breathing_classes.dm @@ -24,7 +24,7 @@ gases = list( GAS_O2 = 1, GAS_PLUOXIUM = 8, - GAS_CO2 = -0.7, // CO2 isn't actually toxic, just an asphyxiant + GAS_CO2 = -0.2, // CO2 isn't actually toxic, just an asphyxiant ) products = list( GAS_CO2 = 1, diff --git a/code/modules/atmospherics/auxgm/gas_types.dm b/code/modules/atmospherics/auxgm/gas_types.dm index 662b88046956..7bec9d61ff01 100644 --- a/code/modules/atmospherics/auxgm/gas_types.dm +++ b/code/modules/atmospherics/auxgm/gas_types.dm @@ -29,6 +29,19 @@ ) ) +/datum/gas/carbon_monoxide + id = GAS_CO + specific_heat = 30 + name = "Carbon Monoxide" + breath_results = GAS_CO + + flags = GAS_FLAG_DANGEROUS + fire_burn_rate = 1 + fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50 + + fusion_power = 0 + enthalpy = -110500 + /datum/gas/carbon_dioxide //what the fuck is this? id = GAS_CO2 specific_heat = 30 @@ -161,7 +174,7 @@ specific_heat = 10 name = "Hydrogen" flags = GAS_FLAG_DANGEROUS - moles_visible = MOLES_GAS_VISIBLE + //moles_visible = MOLES_GAS_VISIBLE color = "#ffe" fusion_power = 0 fire_products = list(GAS_H2O = 1) diff --git a/code/modules/atmospherics/gasmixtures/auxgm.dm b/code/modules/atmospherics/gasmixtures/auxgm.dm index e774d1060ec3..8e4ec3eb30e2 100644 --- a/code/modules/atmospherics/gasmixtures/auxgm.dm +++ b/code/modules/atmospherics/gasmixtures/auxgm.dm @@ -38,6 +38,7 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(GAS_O2, GAS_N2, GAS_CO2, GA /datum/gas var/id = "" + /// heat capacity? thats the only explanation on what this var is var/specific_heat = 0 var/name = "" var/gas_overlay = "generic" //icon_state in icons/effects/atmospherics.dmi diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 236c7b040d99..fc1f92eef72b 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -107,9 +107,9 @@ var/datum/radio_frequency/radio_connection //anything outright hazardous (flammable, toxic, generally Weird) - var/list/filter_basic = list(GAS_CO2, GAS_PLASMA, GAS_NITROUS, GAS_BZ, GAS_TRITIUM, GAS_NITRYL, GAS_FREON, GAS_HYDROGEN, GAS_CHLORINE, GAS_HYDROGEN_CHLORIDE) + var/list/filter_basic = list(GAS_CO2, GAS_PLASMA, GAS_NITROUS, GAS_BZ, GAS_TRITIUM, GAS_NITRYL, GAS_FREON, GAS_HYDROGEN, GAS_CHLORINE, GAS_HYDROGEN_CHLORIDE, GAS_CO) //anything that isn't o2 or n2. - var/list/filter_extra = list(GAS_CO2, GAS_PLASMA, GAS_NITROUS, GAS_BZ, GAS_TRITIUM, GAS_NITRYL, GAS_FREON, GAS_HYDROGEN, GAS_CHLORINE, GAS_HYDROGEN_CHLORIDE, GAS_H2O, GAS_HYPERNOB, GAS_STIMULUM, GAS_PLUOXIUM) + var/list/filter_extra = list(GAS_CO2, GAS_PLASMA, GAS_NITROUS, GAS_BZ, GAS_TRITIUM, GAS_NITRYL, GAS_FREON, GAS_HYDROGEN, GAS_CHLORINE, GAS_HYDROGEN_CHLORIDE, GAS_H2O, GAS_HYPERNOB, GAS_STIMULUM, GAS_PLUOXIUM, GAS_CO) var/list/TLV = list( // Breathable air. "pressure" = new/datum/tlv(HAZARD_LOW_PRESSURE, WARNING_LOW_PRESSURE, WARNING_HIGH_PRESSURE, HAZARD_HIGH_PRESSURE), // kPa. Values are min2, min1, max1, max2 @@ -129,7 +129,8 @@ GAS_FREON = new/datum/tlv/dangerous, GAS_HYDROGEN = new/datum/tlv/dangerous, GAS_CHLORINE = new/datum/tlv/dangerous, - GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous + GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, + GAS_CO = new/datum/tlv/dangerous ) /obj/machinery/airalarm/server // No checks here. @@ -151,7 +152,8 @@ GAS_FREON = new/datum/tlv/no_checks, GAS_HYDROGEN = new/datum/tlv/no_checks, GAS_CHLORINE = new/datum/tlv/dangerous, - GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous + GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, + GAS_CO = new/datum/tlv/dangerous ) heating_manage = FALSE @@ -174,7 +176,8 @@ GAS_FREON = new/datum/tlv/dangerous, GAS_HYDROGEN = new/datum/tlv/dangerous, GAS_CHLORINE = new/datum/tlv/dangerous, - GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous + GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, + GAS_CO = new/datum/tlv/dangerous ) heating_manage = FALSE diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index cb6a1b9b0bb0..3092e1a36db1 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -84,6 +84,12 @@ icon_state = "black" gas_type = GAS_CO2 +/obj/machinery/portable_atmospherics/canister/carbon_monoxide + name = "co canister" + desc = "Carbon Monoxide. Highly dangerous and flammable" + icon_state = "black" + gas_type = GAS_CO + /obj/machinery/portable_atmospherics/canister/toxins name = "plasma canister" desc = "Plasma gas. The reason YOU are here. Highly toxic." diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 7505d2b8789e..4c52f643f00f 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -8,7 +8,7 @@ var/volume_rate = 1000 var/overpressure_m = 80 var/use_overlays = TRUE - var/list/scrubbing = list(GAS_PLASMA, GAS_CO2, GAS_NITROUS, GAS_BZ, GAS_NITRYL, GAS_TRITIUM, GAS_HYPERNOB, GAS_H2O, GAS_FREON, GAS_HYDROGEN) + var/list/scrubbing = list(GAS_PLASMA, GAS_CO2, GAS_NITROUS, GAS_BZ, GAS_NITRYL, GAS_TRITIUM, GAS_HYPERNOB, GAS_H2O, GAS_FREON, GAS_HYDROGEN, GAS_CO) /obj/machinery/portable_atmospherics/scrubber/Destroy() var/turf/T = get_turf(src) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index e63cd1298616..d7605652f6fb 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -94,6 +94,8 @@ var/sheet_left = 0 // How much is left of the sheet var/time_per_sheet = 260 var/current_heat = 0 + var/pollution_multiplier = 3 + var/pollution_gas = GAS_CO /obj/machinery/power/port_gen/pacman/Initialize() . = ..() @@ -171,6 +173,9 @@ overheat() qdel(src) + var/turf/current_turf = get_turf(src) + current_turf.atmos_spawn_air("[pollution_gas]=[power_output*pollution_multiplier];TEMP=[((current_heat-32)/1.8+273.15)]") + /obj/machinery/power/port_gen/pacman/handleInactive() current_heat = max(current_heat - 2, 0) if(current_heat == 0) @@ -291,6 +296,7 @@ circuit = /obj/item/circuitboard/machine/pacman/super sheet_path = /obj/item/stack/sheet/mineral/uranium power_gen = 15000 + pollution_multiplier = 0.2 /obj/machinery/power/port_gen/pacman/super/overheat() . =..() @@ -303,6 +309,7 @@ circuit = /obj/item/circuitboard/machine/pacman/mrs sheet_path = /obj/item/stack/sheet/mineral/diamond power_gen = 40000 + pollution_multiplier = 0.1 /obj/machinery/power/port_gen/pacman/mrs/overheat() . =..() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 56d248e1d447..6218c6fd639d 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -598,7 +598,7 @@ name = "Sulfur" description = "A sickly yellow solid mostly known for its nasty smell. It's actually much more helpful than it looks in biochemisty." reagent_state = SOLID - color = "#BF8C00" // rgb: 191, 140, 0 + color = "#f0e518" taste_description = "rotten eggs" /datum/reagent/carbon @@ -908,6 +908,14 @@ color = "#A8A8A8" // rgb: 168, 168, 168 taste_description = "metal" +/datum/reagent/quartz + name = "Quartz" + description = "A fine dust of Quartz, a precursor to silicon and glass." + reagent_state = SOLID + color = "#fcedff" + taste_mult = 0 + material = /datum/material/quartz + /datum/reagent/silicon name = "Silicon" description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." @@ -1185,6 +1193,67 @@ M.confused = min(M.confused + 2, 5) ..() +/datum/reagent/carbon_monoxide + name = "Carbon Monoxide" + description = "A highly dangerous gas for sapients." + reagent_state = GAS + metabolization_rate = 1.5 * REAGENTS_METABOLISM + color = "#96898c" + var/accumilation + +/datum/reagent/carbon_monoxide/on_mob_life(mob/living/carbon/victim) + accumilation += volume + switch(accumilation) + if(10 to 50) + victim.Dizzy(accumilation/20) + to_chat(src, "You feel dizzy.") + if(50 to 150) + to_chat(victim, "[pick("Your head hurts.", "Your head pounds.")]") + victim.Dizzy(accumilation) + victim.adjustStaminaLoss(1) + if(150 to 250) + to_chat(victim, "[pick("Your head hurts a lot.", "Your head pounds incessantly.")]") + victim.adjustStaminaLoss(3) + victim.Dizzy(accumilation/20) + victim.confused += (accumilation/50) + victim.gain_trauma(/datum/brain_trauma/mild/expressive_aphasia) + if(250 to 450) + to_chat(victim, "[pick("What were you doing...?", "Where are you...?", "What's going on...?")]") + victim.adjustStaminaLoss(10) + victim.Stun(35) + + victim.Dizzy(accumilation/20) + victim.confused += (accumilation/50) + victim.drowsyness += (accumilation/50) + + victim.adjustToxLoss(accumilation/100*REM, 0) + + victim.gain_trauma(/datum/brain_trauma/mild/concussion) + victim.gain_trauma(/datum/brain_trauma/mild/speech_impediment) + + if(450 to 3000) + victim.Unconscious(20 SECONDS) + + victim.drowsyness += (accumilation/100) + victim.adjustToxLoss(accumilation/100*REM, 0) + if(3000 to INFINITY) //anti salt measure, if they reach this, just fucking kill them at this point + victim.death() + victim.cure_trauma_type(/datum/brain_trauma/mild/concussion) + victim.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) + victim.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) + + qdel(src) + return + return ..() + +/datum/reagent/carbon_monoxide/on_mob_delete(mob/living/living_mob) + var/mob/living/carbon/living_carbon = living_mob + if(accumilation <= 150) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/concussion) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) + + /datum/reagent/stimulum name = "Stimulum" description = "An unstable experimental gas that greatly increases the energy of those that inhale it." //WS Edit -- No longer references toxin damage. diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index f6af39b201c0..aaf892b4cf79 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -323,6 +323,33 @@ H.reagents.add_reagent(/datum/reagent/stimulum, max(0, 5 - existing)) breath.adjust_moles(GAS_STIMULUM, -gas_breathed) + // Carbon Monoxide + var/carbon_monoxide_pp = PP(breath,GAS_CO) + if (carbon_monoxide_pp > gas_stimulation_min) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2) + var/datum/reagent/carbon_monoxide/monoxide_reagent = H.reagents.has_reagent(/datum/reagent/carbon_monoxide) + if(!monoxide_reagent) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2) + switch(carbon_monoxide_pp) + if (0 to 100) + monoxide_reagent.accumilation = min(monoxide_reagent.accumilation,50) + if (100 to 400) + monoxide_reagent.accumilation = clamp(monoxide_reagent.accumilation,50, 150) + if (400 to 800) + monoxide_reagent.accumilation = clamp(monoxide_reagent.accumilation, 150, 250) + if (800 to 3200) + monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 250) + if (3200 to INFINITY) + monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 450) + else + var/datum/reagent/carbon_monoxide/monoxide_reagent = H.reagents.has_reagent(/datum/reagent/carbon_monoxide) + if(monoxide_reagent) + monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 150) + monoxide_reagent.volume = min(monoxide_reagent.volume, 20) + + + breath.adjust_moles(GAS_CO, -gas_breathed) + /obj/item/organ/lungs/proc/handle_too_little_breath(mob/living/carbon/human/H = null, breath_pp = 0, safe_breath_min = 0, true_pp = 0) . = 0 if(!H || !safe_breath_min) //the other args are either: Ok being 0 or Specifically handled. From 7f44e89815f428eda9f6ea6c7d3400f6958599e3 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:42:45 -0700 Subject: [PATCH 02/18] removes flammablity --- code/modules/atmospherics/auxgm/gas_types.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/atmospherics/auxgm/gas_types.dm b/code/modules/atmospherics/auxgm/gas_types.dm index 7bec9d61ff01..0729b9ce2821 100644 --- a/code/modules/atmospherics/auxgm/gas_types.dm +++ b/code/modules/atmospherics/auxgm/gas_types.dm @@ -36,8 +36,6 @@ breath_results = GAS_CO flags = GAS_FLAG_DANGEROUS - fire_burn_rate = 1 - fire_temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 50 fusion_power = 0 enthalpy = -110500 From 31bbc79f748cb562e507fac9920e3dd36d142d35 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:16:23 -0700 Subject: [PATCH 03/18] should be better --- .../chemistry/reagents/other_reagents.dm | 20 ++++++++++++++++++- code/modules/surgery/organs/lungs.dm | 11 ++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 6218c6fd639d..688bcf006470 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1202,6 +1202,10 @@ var/accumilation /datum/reagent/carbon_monoxide/on_mob_life(mob/living/carbon/victim) + if(holder.has_reagent(/datum/reagent/oxygen)) + holder.remove_reagent(/datum/reagent/carbon_monoxide, 2*REM) + accumilation = accumilation/4 + accumilation += volume switch(accumilation) if(10 to 50) @@ -1243,9 +1247,23 @@ victim.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) qdel(src) - return + accumilation -= (metabolization_rate * victim.metabolism_efficiency) + if(accumilation > 0) + qdel(src) return ..() +/datum/reagent/carbon_monoxide/expose_obj(obj/O, reac_volume) + if((!O) || (!reac_volume)) + return FALSE + var/temp = holder ? holder.chem_temp : T20C + O.atmos_spawn_air("[GAS_CO]=[reac_volume/2];TEMP=[temp]") + +/datum/reagent/carbon_monoxide/expose_turf(turf/open/T, reac_volume) + if(istype(T)) + var/temp = holder ? holder.chem_temp : T20C + T.atmos_spawn_air("[GAS_CO]=[reac_volume/2];TEMP=[temp]") + return + /datum/reagent/carbon_monoxide/on_mob_delete(mob/living/living_mob) var/mob/living/carbon/living_carbon = living_mob if(accumilation <= 150) diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index aaf892b4cf79..a9471f08be22 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -326,7 +326,7 @@ // Carbon Monoxide var/carbon_monoxide_pp = PP(breath,GAS_CO) if (carbon_monoxide_pp > gas_stimulation_min) - H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide,1) var/datum/reagent/carbon_monoxide/monoxide_reagent = H.reagents.has_reagent(/datum/reagent/carbon_monoxide) if(!monoxide_reagent) H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2) @@ -334,18 +334,21 @@ if (0 to 100) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation,50) if (100 to 400) - monoxide_reagent.accumilation = clamp(monoxide_reagent.accumilation,50, 150) + monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 150) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2) if (400 to 800) - monoxide_reagent.accumilation = clamp(monoxide_reagent.accumilation, 150, 250) + monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 250) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide,4) if (800 to 3200) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 250) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide,8) if (3200 to INFINITY) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 450) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide,16) else var/datum/reagent/carbon_monoxide/monoxide_reagent = H.reagents.has_reagent(/datum/reagent/carbon_monoxide) if(monoxide_reagent) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 150) - monoxide_reagent.volume = min(monoxide_reagent.volume, 20) breath.adjust_moles(GAS_CO, -gas_breathed) From 50e86c91cb08fd9244d5d241d1c7e87eaa41b095 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:19:32 -0700 Subject: [PATCH 04/18] brings back this anti salt measure --- code/modules/mob/living/carbon/death.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index 1804a1497187..2b759d87e8f9 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -24,7 +24,7 @@ M.Scale(1.8, 1.2) animate(src, time = 40, transform = M, easing = SINE_EASING) -/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts, safe_gib = FALSE) +/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts, safe_gib = TRUE) if(safe_gib) // If you want to keep all the mob's items and not have them deleted for(var/obj/item/W in src) dropItemToGround(W) From 0584462da66d28049d3cc42a9785ecc70d3ff17c Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Tue, 17 Sep 2024 21:02:56 -0700 Subject: [PATCH 05/18] yeah --- code/__DEFINES/atmospherics.dm | 8 +- code/__HELPERS/unsorted.dm | 8 ++ code/controllers/subsystem/explosions.dm | 2 + code/game/objects/items.dm | 23 ++++++ code/game/objects/items/extinguisher.dm | 10 ++- code/game/objects/items/shrapnel.dm | 2 + code/game/objects/items/tanks/tanks.dm | 66 ++++++++++------ .../components/unary_devices/tank.dm | 75 +++++++++++++++++-- .../machinery/portable/canister.dm | 44 ++++++++++- .../chemistry/reagents/other_reagents.dm | 8 -- 10 files changed, 200 insertions(+), 46 deletions(-) diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 261f71830172..96759bdcdc07 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -168,13 +168,13 @@ //TANKS /// temperature in kelvins at which a tank will start to melt -#define TANK_MELT_TEMPERATURE 1000000 +#define TANK_MELT_TEMPERATURE 800 + T0C /// Tank starts leaking -#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) +#define TANK_LEAK_PRESSURE (10 * ONE_ATMOSPHERE + 5) /// Tank spills all contents into atmosphere -#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) +#define TANK_RUPTURE_PRESSURE (11 * ONE_ATMOSPHERE) /// Boom 3x3 base explosion -#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) +#define TANK_FRAGMENT_PRESSURE (12.*ONE_ATMOSPHERE) /// +1 for each SCALE kPa aboe threshold #define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) #define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 36764c6bae9f..f619fd54af6f 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1542,3 +1542,11 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) if(dir & WEST) return WEST return 0 + +/proc/flame_radius(turf/epicenter, radius = 1, power = 5, fire_color = "red") + if(!isturf(epicenter)) + CRASH("flame_radius used without a valid turf parameter") + radius = clamp(radius, 1, 50) //Sanitize inputs + + for(var/turf/turf_to_flame as anything in filled_turfs(epicenter, radius, "circle")) + turf_to_flame.IgniteTurf(power, fire_color) diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm index 3e044a441c0a..c71e46d9872d 100644 --- a/code/controllers/subsystem/explosions.dm +++ b/code/controllers/subsystem/explosions.dm @@ -358,6 +358,8 @@ SUBSYSTEM_DEF(explosions) if(flame_dist && prob(40) && !isspaceturf(T) && !T.density) flameturf += T + if(flame_range) + flame_radius(epicenter, flame_dist, flame_range*2) //--- THROW ITEMS AROUND --- var/throw_dir = get_dir(epicenter,T) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 376d1ba16d11..22ad5a4f3e44 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -832,6 +832,29 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb if(isturf(location)) location.hotspot_expose(flame_heat, 5) + if(!prob(0.2)) + return + + for(var/dir in GLOB.cardinals) + var/ruined_round = FALSE + var/turf/test_turf = get_step(location, dir) + for(var/obj/to_test as obj in test_turf.contents) + if(istype(to_test, /obj/structure/reagent_dispensers/fueltank)) + to_chat("A single ember from [src] drops gently onto [to_test]. Uh oh.") + to_test.fire_act() + ruined_round = TRUE + break + if(istype(to_test, /obj/machinery/atmospherics/components/unary/tank)) + to_chat("A flash fire forms around [src]!") + location.IgniteTurf(flame_heat/20) + new /obj/effect/hotspot(location) + ruined_round = TRUE + break + if(ruined_round) + break + + + /obj/item/proc/ignition_effect(atom/A, mob/user) if(get_temperature()) . = "[user] lights [A] with [src]." diff --git a/code/game/objects/items/extinguisher.dm b/code/game/objects/items/extinguisher.dm index 106ee2a50525..126daf09fc43 100644 --- a/code/game/objects/items/extinguisher.dm +++ b/code/game/objects/items/extinguisher.dm @@ -188,7 +188,15 @@ var/turf/my_target = particles[W] if(!W) continue - step_towards(W,my_target) + var/turf/tomove = get_step_towards(W,my_target) + var/movedir = get_dir(W, tomove) + if(!W.CanPassThrough(tomove, movedir)) + if(isopenturf(tomove)) + W.forceMove(tomove) + particles -= W + else + W.Move(tomove) + if(!W.reagents) continue W.reagents.expose(get_turf(W)) diff --git a/code/game/objects/items/shrapnel.dm b/code/game/objects/items/shrapnel.dm index 959649c8c59b..f60513cd8645 100644 --- a/code/game/objects/items/shrapnel.dm +++ b/code/game/objects/items/shrapnel.dm @@ -70,6 +70,8 @@ armour_penetration = -35 dismemberment = 10 shrapnel_type = /obj/item/shrapnel/hot + ricochets_max = 10 + ricochet_incidence_leeway = 0 damage_type = BURN /obj/projectile/bullet/shrapnel/hot/on_hit(atom/target, blocked = FALSE) diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index c45911f98f4a..b98439dc3351 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -6,6 +6,7 @@ flags_1 = CONDUCT_1 slot_flags = ITEM_SLOT_BACK hitsound = 'sound/weapons/smash.ogg' + resistance_flags = FIRE_PROOF // its metal, but the gas inside isnt nessarily fireproof... pressure_resistance = ONE_ATMOSPHERE * 5 force = 5 throwforce = 10 @@ -16,7 +17,6 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 30) var/datum/gas_mixture/air_contents = null var/distribute_pressure = ONE_ATMOSPHERE - var/integrity = 3 var/volume = 70 supports_variations = VOX_VARIATION @@ -219,8 +219,33 @@ /obj/item/tank/process() //Allow for reactions air_contents.react() + var/turf/open/current_turf = get_turf(src) + if(current_turf) + temperature_expose(current_turf.air, current_turf.air.return_temperature(), current_turf.air.return_pressure()) check_status() +/obj/item/tank/fire_act(exposed_temperature, exposed_volume) + . = ..() + var/tank_temperature = air_contents.return_temperature() + tank_temperature = ((tank_temperature * 4) + exposed_temperature)/5 //slowly equalize with the air, since this is over an active fire, we heat up faster + air_contents.set_temperature(tank_temperature) + if(exposed_temperature > TANK_MELT_TEMPERATURE) + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) + if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + + +/obj/item/tank/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(!isturf(loc)) //so people dont freeze to death by cold air during eva + return ..() + var/tank_temperature = air_contents.return_temperature() + tank_temperature = ((tank_temperature * 6) + exposed_temperature)/7 //slowly equalize with the air + air_contents.set_temperature(tank_temperature) + if(exposed_temperature > TANK_MELT_TEMPERATURE) + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) + if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + /obj/item/tank/proc/check_status() //Handle exploding, leaking, and rupturing of the tank @@ -232,40 +257,33 @@ if(pressure > TANK_FRAGMENT_PRESSURE) if(!istype(src.loc, /obj/item/transfer_valve)) + message_admins("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") + log_admin("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively") //Give the gas a chance to build up more pressure through reacting air_contents.react(src) pressure = air_contents.return_pressure() - var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE + var/range = (pressure-TANK_RUPTURE_PRESSURE)/TANK_FRAGMENT_SCALE var/turf/epicenter = get_turf(loc) explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) + + AddComponent(/datum/component/pellet_cloud, projectile_type=/obj/projectile/bullet/shrapnel/hot, round(range)) if(istype(src.loc, /obj/item/transfer_valve)) qdel(src.loc) else - qdel(src) + return obj_destruction() else if(pressure > TANK_RUPTURE_PRESSURE || temperature > TANK_MELT_TEMPERATURE) - if(integrity <= 0) - var/turf/T = get_turf(src) - if(!T) - return - T.assume_air(air_contents) - playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3) - qdel(src) - else - integrity-- - - else if(pressure > TANK_LEAK_PRESSURE) - if(integrity <= 0) - var/turf/T = get_turf(src) - if(!T) - return - var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25) - T.assume_air(leaked_gas) - else - integrity-- + take_damage(max((pressure - TANK_RUPTURE_PRESSURE), 0), BRUTE, 0) + take_damage(max((temperature - TANK_MELT_TEMPERATURE), 0), BRUTE, 0) + +/obj/item/tank/obj_destruction(damage_flag) + var/turf/T = get_turf(src) + if(!T) + return ..() + T.assume_air(air_contents) + playsound(src.loc, 'sound/effects/spray.ogg', 100, TRUE, -3) + return ..() - else if(integrity < 3) - integrity++ diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index 774fde011889..6321e2125b7c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -1,4 +1,4 @@ -#define AIR_CONTENTS ((25*ONE_ATMOSPHERE)*(air_contents.return_volume())/(R_IDEAL_GAS_EQUATION*air_contents.return_temperature())) +#define AIR_CONTENTS ((50*ONE_ATMOSPHERE)*(air_contents.return_volume())/(R_IDEAL_GAS_EQUATION*air_contents.return_temperature())) /obj/machinery/atmospherics/components/unary/tank icon = 'icons/obj/atmospherics/pipes/pressure_tank.dmi' icon_state = "generic" @@ -6,6 +6,7 @@ name = "pressure tank" desc = "A large vessel containing pressurized gas." + obj_integrity = 800 max_integrity = 800 density = TRUE layer = ABOVE_WINDOW_LAYER @@ -15,7 +16,7 @@ var/gas_type = 0 /obj/machinery/atmospherics/components/unary/tank/New() - ..() + . = ..() var/datum/gas_mixture/air_contents = airs[1] air_contents.set_volume(volume) air_contents.set_temperature(T20C) @@ -24,13 +25,77 @@ name = "[name] ([GLOB.gas_data.names[gas_type]])" setPipingLayer(piping_layer) +/obj/machinery/atmospherics/components/unary/tank/Initialize(mapload) + . = ..() + SSair.start_processing_machine(src, mapload) + +/obj/machinery/atmospherics/components/unary/tank/process_atmos() + var/datum/gas_mixture/air_contents = airs[1] + + //handle melting + var/current_temp = air_contents.return_temperature() + if(current_temp > TANK_MELT_TEMPERATURE) + take_damage(max((current_temp - TANK_MELT_TEMPERATURE), 0), BRUTE, 0) + + //handle external melting + var/turf/open/current_turf = get_turf(src) + if(current_turf) + temperature_expose(current_turf.air, current_turf.air.return_temperature(), current_turf.air.return_pressure()) + + update_appearance() + + +/obj/machinery/atmospherics/components/unary/tank/fire_act(exposed_temperature, exposed_volume) + . = ..() + var/datum/gas_mixture/air_contents = airs[1] + var/tank_temperature = air_contents.return_temperature() + tank_temperature = ((tank_temperature * 4) + exposed_temperature)/5 //equalize with the air - since this means theres an active fire on the canister's tile + air_contents.set_temperature(tank_temperature) + if(exposed_temperature > TANK_MELT_TEMPERATURE) + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) + if(exposed_volume > volume*2) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + + +/obj/machinery/atmospherics/components/unary/tank/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(exposed_temperature > TANK_MELT_TEMPERATURE) //dont equalize temperature as this would affect atmos balance, we only want fires to be more dangerous + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) + if(exposed_volume > volume*2) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + +/obj/machinery/atmospherics/components/unary/tank/obj_destruction(damage_flag) + var/datum/gas_mixture/air_contents = airs[1] + //Give the gas a chance to build up more pressure through reacting + air_contents.react(src) + var/pressure = air_contents.return_pressure() + var/range = (pressure-TANK_LEAK_PRESSURE)/TANK_FRAGMENT_SCALE + var/turf/epicenter = get_turf(loc) + if(range > 2) + message_admins("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") + log_admin("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") + log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively") + investigate_log("was destroyed.", INVESTIGATE_ATMOS) + + explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) + + AddComponent(/datum/component/pellet_cloud, projectile_type=/obj/projectile/bullet/shrapnel/hot, round(range)) + + var/turf/T = get_turf(src) + T.assume_air(air_contents) + air_update_turf() + + density = FALSE + playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3) + + return ..() + /obj/machinery/atmospherics/components/unary/tank/air icon_state = "grey" name = "pressure tank (Air)" /obj/machinery/atmospherics/components/unary/tank/air/New() - ..() + . = ..() var/datum/gas_mixture/air_contents = airs[1] air_contents.set_moles(GAS_O2, AIR_CONTENTS * 0.2) air_contents.set_moles(GAS_N2, AIR_CONTENTS * 0.8) @@ -45,8 +110,8 @@ /obj/machinery/atmospherics/components/unary/tank/fuel icon_state = "orange" -/obj/machinery/atmospherics/components/unary/tank/fuel/New() - ..() +/obj/machinery/atmospherics/components/unary/tank/fuel/Initialize(mapload) + . = ..() var/datum/gas_mixture/air_contents = airs[1] air_contents.set_moles(GAS_O2, AIR_CONTENTS * 0.3) air_contents.set_moles(GAS_PLASMA, AIR_CONTENTS * 0.6) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 3092e1a36db1..ee5e0c676baf 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -286,12 +286,23 @@ if(pressure > 100) . += "can-o" + num2text(pressure_display) - -/obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/obj/machinery/portable_atmospherics/canister/fire_act(exposed_temperature, exposed_volume) + . = ..() + var/can_temperature = air_contents.return_temperature() + can_temperature = ((can_temperature * 4) + exposed_temperature)/5 //equalize with the air - since this means theres an active fire on the canister's tile + air_contents.set_temperature(can_temperature) if(exposed_temperature > temperature_resistance) - take_damage(5, BURN, 0) + take_damage(max((exposed_temperature - temperature_resistance), 0), BURN, 0) + if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) +/obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(exposed_temperature > temperature_resistance) //dont equalize temperature as this would affect atmos balance, we only want fires to be more dangerous + take_damage(max((exposed_temperature - temperature_resistance), 0), BURN, 0) + if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + /obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) if(!(machine_stat & BROKEN)) @@ -326,6 +337,22 @@ /obj/machinery/portable_atmospherics/canister/proc/canister_break() disconnect() + + //Give the gas a chance to build up more pressure through reacting + air_contents.react(src) + var/pressure = air_contents.return_pressure() + var/range = (pressure-TANK_RUPTURE_PRESSURE)/TANK_FRAGMENT_SCALE + var/turf/epicenter = get_turf(loc) + if(range > 2) + message_admins("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") + log_admin("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") + log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively") + investigate_log("was destroyed.", INVESTIGATE_ATMOS) + + explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) + + AddComponent(/datum/component/pellet_cloud, projectile_type=/obj/projectile/bullet/shrapnel/hot, round(range)) + var/turf/T = get_turf(src) T.assume_air(air_contents) air_update_turf() @@ -333,7 +360,6 @@ obj_break() density = FALSE playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3) - investigate_log("was destroyed.", INVESTIGATE_ATMOS) if(holding) holding.forceMove(T) @@ -357,6 +383,16 @@ valve_open = !valve_open timing = FALSE + //handle melting + var/current_temp = air_contents.return_temperature() + if(current_temp > temperature_resistance) + take_damage(max((current_temp - temperature_resistance), 0), BRUTE, 0) + + //handle external melting + var/turf/open/current_turf = get_turf(src) + if(current_turf) + temperature_expose(current_turf.air, current_turf.air.return_temperature(), current_turf.air.return_pressure()) + // Handle gas transfer. if(valve_open) var/turf/T = get_turf(src) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 688bcf006470..a49d29e8257a 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -908,14 +908,6 @@ color = "#A8A8A8" // rgb: 168, 168, 168 taste_description = "metal" -/datum/reagent/quartz - name = "Quartz" - description = "A fine dust of Quartz, a precursor to silicon and glass." - reagent_state = SOLID - color = "#fcedff" - taste_mult = 0 - material = /datum/material/quartz - /datum/reagent/silicon name = "Silicon" description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." From 205585a9d1510e1fc91b62f1ab3138ddc51a890a Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Tue, 17 Sep 2024 22:58:25 -0700 Subject: [PATCH 06/18] gatekeeping ass component --- code/__HELPERS/unsorted.dm | 35 ++++++++++++++++ code/controllers/subsystem/explosions.dm | 2 +- code/datums/components/pellet_cloud.dm | 6 +-- code/game/objects/items.dm | 6 +-- code/game/objects/items/tanks/tanks.dm | 2 +- .../atmospherics/machinery/airalarm.dm | 6 +-- .../components/unary_devices/tank.dm | 2 +- .../machinery/portable/canister.dm | 2 +- code/modules/power/port_gen.dm | 2 +- .../chemistry/reagents/other_reagents.dm | 42 ++++++++++++------- code/modules/surgery/organs/lungs.dm | 14 +++---- 11 files changed, 83 insertions(+), 36 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index f619fd54af6f..1b4e2b5ce208 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1543,6 +1543,41 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) return WEST return 0 +/proc/filled_turfs(atom/center, radius = 3, type = "circle", include_edge = TRUE) + var/turf/center_turf = get_turf(center) + if(radius < 0 || !center) + return + if(radius == 0) + return list(center_turf) + + var/list/directions + switch(type) + if("square") + directions = GLOB.alldirs + if("circle") + directions = GLOB.cardinals + + var/list/results = list(center_turf) + var/list/turfs_to_check = list() + turfs_to_check += center_turf + for(var/i = radius; i > 0; i--) + for(var/X in turfs_to_check) + var/turf/T = X + for(var/direction in directions) + var/turf/AdjT = get_step(T, direction) + if(!AdjT) + continue + if (AdjT in results) // Ignore existing turfs + continue + if(AdjT.density) + if(include_edge) + results += AdjT + continue + + turfs_to_check += AdjT + results += AdjT + return results + /proc/flame_radius(turf/epicenter, radius = 1, power = 5, fire_color = "red") if(!isturf(epicenter)) CRASH("flame_radius used without a valid turf parameter") diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm index c71e46d9872d..a20970c48304 100644 --- a/code/controllers/subsystem/explosions.dm +++ b/code/controllers/subsystem/explosions.dm @@ -359,7 +359,7 @@ SUBSYSTEM_DEF(explosions) if(flame_dist && prob(40) && !isspaceturf(T) && !T.density) flameturf += T if(flame_range) - flame_radius(epicenter, flame_dist, flame_range*2) + flame_radius(epicenter, flame_range, flame_range*2) //--- THROW ITEMS AROUND --- var/throw_dir = get_dir(epicenter,T) diff --git a/code/datums/components/pellet_cloud.dm b/code/datums/components/pellet_cloud.dm index 19b1e2094993..d5e3f330fb62 100644 --- a/code/datums/components/pellet_cloud.dm +++ b/code/datums/components/pellet_cloud.dm @@ -46,8 +46,6 @@ var/mob/living/shooter /datum/component/pellet_cloud/Initialize(projectile_type=/obj/item/shrapnel, magnitude=5) - if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent) && !issupplypod(parent)) - return COMPONENT_INCOMPATIBLE if(magnitude < 1) stack_trace("Invalid magnitude [magnitude] < 1 on pellet_cloud, parent: [parent]") @@ -57,7 +55,7 @@ if(isammocasing(parent)) num_pellets = magnitude - else if(isgrenade(parent) || islandmine(parent) || issupplypod(parent)) + else radius = magnitude /datum/component/pellet_cloud/Destroy(force, silent) @@ -78,6 +76,8 @@ RegisterSignal(parent, COMSIG_MINE_TRIGGERED, PROC_REF(create_blast_pellets)) else if(issupplypod(parent)) RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, PROC_REF(create_blast_pellets)) + else + RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, PROC_REF(create_blast_pellets)) /datum/component/pellet_cloud/UnregisterFromParent() UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_PELLET_CLOUD_INIT, COMSIG_GRENADE_PRIME, COMSIG_GRENADE_ARMED, COMSIG_MOVABLE_MOVED, COMSIG_MINE_TRIGGERED, COMSIG_ITEM_DROPPED)) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 22ad5a4f3e44..63a74761513d 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -832,7 +832,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb if(isturf(location)) location.hotspot_expose(flame_heat, 5) - if(!prob(0.2)) + if(!prob(1)) return for(var/dir in GLOB.cardinals) @@ -840,12 +840,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb var/turf/test_turf = get_step(location, dir) for(var/obj/to_test as obj in test_turf.contents) if(istype(to_test, /obj/structure/reagent_dispensers/fueltank)) - to_chat("A single ember from [src] drops gently onto [to_test]. Uh oh.") + visible_message("A single ember from [src] drops gently onto [to_test]. Uh oh.") to_test.fire_act() ruined_round = TRUE break if(istype(to_test, /obj/machinery/atmospherics/components/unary/tank)) - to_chat("A flash fire forms around [src]!") + visible_message("A flash fire forms around [src]!") location.IgniteTurf(flame_heat/20) new /obj/effect/hotspot(location) ruined_round = TRUE diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index b98439dc3351..10c32fc68cd9 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -269,7 +269,7 @@ explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) - AddComponent(/datum/component/pellet_cloud, projectile_type=/obj/projectile/bullet/shrapnel/hot, round(range)) + AddComponent(/datum/component/pellet_cloud, /obj/projectile/bullet/shrapnel/hot, round(range)) if(istype(src.loc, /obj/item/transfer_valve)) qdel(src.loc) else diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index fc1f92eef72b..27c5e6ae2d89 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -130,7 +130,7 @@ GAS_HYDROGEN = new/datum/tlv/dangerous, GAS_CHLORINE = new/datum/tlv/dangerous, GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, - GAS_CO = new/datum/tlv/dangerous + GAS_CO = new/datum/tlv(-1, -1, 0.002, 2) ) /obj/machinery/airalarm/server // No checks here. @@ -153,7 +153,7 @@ GAS_HYDROGEN = new/datum/tlv/no_checks, GAS_CHLORINE = new/datum/tlv/dangerous, GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, - GAS_CO = new/datum/tlv/dangerous + GAS_CO = new/datum/tlv(-1, -1, 5, 10) ) heating_manage = FALSE @@ -177,7 +177,7 @@ GAS_HYDROGEN = new/datum/tlv/dangerous, GAS_CHLORINE = new/datum/tlv/dangerous, GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, - GAS_CO = new/datum/tlv/dangerous + GAS_CO = new/datum/tlv(-1, -1, 5, 10) ) heating_manage = FALSE diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index 6321e2125b7c..d41d9e56b793 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -78,7 +78,7 @@ explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) - AddComponent(/datum/component/pellet_cloud, projectile_type=/obj/projectile/bullet/shrapnel/hot, round(range)) + AddComponent(/datum/component/pellet_cloud, /obj/projectile/bullet/shrapnel/hot, round(range)) var/turf/T = get_turf(src) T.assume_air(air_contents) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index ee5e0c676baf..0a5d718652c4 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -351,7 +351,7 @@ explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) - AddComponent(/datum/component/pellet_cloud, projectile_type=/obj/projectile/bullet/shrapnel/hot, round(range)) + AddComponent(/datum/component/pellet_cloud, /obj/projectile/bullet/shrapnel/hot, round(range)) var/turf/T = get_turf(src) T.assume_air(air_contents) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index d7605652f6fb..0038c73d928f 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -94,7 +94,7 @@ var/sheet_left = 0 // How much is left of the sheet var/time_per_sheet = 260 var/current_heat = 0 - var/pollution_multiplier = 3 + var/pollution_multiplier = 2.5 var/pollution_gas = GAS_CO /obj/machinery/power/port_gen/pacman/Initialize() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index a49d29e8257a..e78d62150a78 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -523,6 +523,11 @@ color = "#808080" // rgb: 128, 128, 128 taste_mult = 0 // oderless and tasteless +/datum/reagent/oxygen/on_mob_life(mob/living/carbon/M) + . = ..() + if(holder.has_reagent(/datum/reagent/carbon_monoxide)) //100% o2 will help with monoxide poisioning... since we cant do that, we just do this instead + holder.remove_reagent(/datum/reagent/carbon_monoxide, volume*4) + /datum/reagent/oxygen/expose_obj(obj/O, reac_volume) if((!O) || (!reac_volume)) return 0 @@ -1189,7 +1194,7 @@ name = "Carbon Monoxide" description = "A highly dangerous gas for sapients." reagent_state = GAS - metabolization_rate = 1.5 * REAGENTS_METABOLISM + metabolization_rate = 0.1 * REAGENTS_METABOLISM color = "#96898c" var/accumilation @@ -1201,47 +1206,53 @@ accumilation += volume switch(accumilation) if(10 to 50) - victim.Dizzy(accumilation/20) to_chat(src, "You feel dizzy.") if(50 to 150) to_chat(victim, "[pick("Your head hurts.", "Your head pounds.")]") - victim.Dizzy(accumilation) + victim.Dizzy(5) victim.adjustStaminaLoss(1) if(150 to 250) - to_chat(victim, "[pick("Your head hurts a lot.", "Your head pounds incessantly.")]") + to_chat(victim, "[pick("Your head hurts!", "You feel a burning knife inside your brain!", "A wave of pain fills your head!")]") victim.adjustStaminaLoss(3) - victim.Dizzy(accumilation/20) + victim.Stun(10) + victim.Dizzy(5) victim.confused += (accumilation/50) victim.gain_trauma(/datum/brain_trauma/mild/expressive_aphasia) - if(250 to 450) + victim.gain_trauma(/datum/brain_trauma/mild/muscle_weakness) + if(250 to 350) to_chat(victim, "[pick("What were you doing...?", "Where are you...?", "What's going on...?")]") - victim.adjustStaminaLoss(10) + victim.adjustStaminaLoss(5) victim.Stun(35) - victim.Dizzy(accumilation/20) + victim.Dizzy(5) victim.confused += (accumilation/50) victim.drowsyness += (accumilation/50) victim.adjustToxLoss(accumilation/100*REM, 0) + victim.gain_trauma(/datum/brain_trauma/mild/expressive_aphasia) + victim.gain_trauma(/datum/brain_trauma/mild/muscle_weakness) victim.gain_trauma(/datum/brain_trauma/mild/concussion) victim.gain_trauma(/datum/brain_trauma/mild/speech_impediment) - if(450 to 3000) + if(350 to 3000) victim.Unconscious(20 SECONDS) victim.drowsyness += (accumilation/100) victim.adjustToxLoss(accumilation/100*REM, 0) if(3000 to INFINITY) //anti salt measure, if they reach this, just fucking kill them at this point victim.death() + victim.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) victim.cure_trauma_type(/datum/brain_trauma/mild/concussion) victim.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) victim.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) qdel(src) + return TRUE accumilation -= (metabolization_rate * victim.metabolism_efficiency) - if(accumilation > 0) - qdel(src) + if(accumilation < 0) + holder.remove_reagent(/datum/reagent/carbon_monoxide, volume) + return TRUE //to avoid a runtime return ..() /datum/reagent/carbon_monoxide/expose_obj(obj/O, reac_volume) @@ -1258,10 +1269,11 @@ /datum/reagent/carbon_monoxide/on_mob_delete(mob/living/living_mob) var/mob/living/carbon/living_carbon = living_mob - if(accumilation <= 150) - living_carbon.cure_trauma_type(/datum/brain_trauma/mild/concussion) - living_carbon.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) - living_carbon.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) + if(accumilation <= 140) + victim.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) + victim.cure_trauma_type(/datum/brain_trauma/mild/concussion) + victim.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) + victim.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) /datum/reagent/stimulum diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index a9471f08be22..fada199eeb51 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -326,24 +326,24 @@ // Carbon Monoxide var/carbon_monoxide_pp = PP(breath,GAS_CO) if (carbon_monoxide_pp > gas_stimulation_min) - H.reagents.add_reagent(/datum/reagent/carbon_monoxide,1) + H.reagents.add_reagent(/datum/reagent/carbon_monoxide, 1) var/datum/reagent/carbon_monoxide/monoxide_reagent = H.reagents.has_reagent(/datum/reagent/carbon_monoxide) if(!monoxide_reagent) H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2) switch(carbon_monoxide_pp) - if (0 to 100) + if (0 to 20) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation,50) - if (100 to 400) + if (20 to 100) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 150) H.reagents.add_reagent(/datum/reagent/carbon_monoxide,2) - if (400 to 800) + if (100 to 200) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 250) H.reagents.add_reagent(/datum/reagent/carbon_monoxide,4) - if (800 to 3200) + if (200 to 400) monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 250) H.reagents.add_reagent(/datum/reagent/carbon_monoxide,8) - if (3200 to INFINITY) - monoxide_reagent.accumilation = min(monoxide_reagent.accumilation, 450) + if (400 to INFINITY) + monoxide_reagent.accumilation = max(monoxide_reagent.accumilation, 450) H.reagents.add_reagent(/datum/reagent/carbon_monoxide,16) else var/datum/reagent/carbon_monoxide/monoxide_reagent = H.reagents.has_reagent(/datum/reagent/carbon_monoxide) From 0e5c49bb3950693d3a66328ba4bf4d97804c96d8 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:29:40 -0700 Subject: [PATCH 07/18] last m inute changes --- code/__DEFINES/species.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/species.dm b/code/__DEFINES/species.dm index 28229082335a..9e292ea0f957 100644 --- a/code/__DEFINES/species.dm +++ b/code/__DEFINES/species.dm @@ -1,10 +1,10 @@ // Pressure limits. /// This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) -#define HAZARD_HIGH_PRESSURE 340 +#define HAZARD_HIGH_PRESSURE 303 /// This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) -#define WARNING_HIGH_PRESSURE 238 +#define WARNING_HIGH_PRESSURE 202 /// This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE) -#define WARNING_LOW_PRESSURE 70 +#define WARNING_LOW_PRESSURE 60 /// This is when the black ultra-low pressure icon is displayed. (This one is set as a constant) #define HAZARD_LOW_PRESSURE 40 From b0db41f8b032427f6499b6201ebc57b56daf2dcd Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:34:49 -0700 Subject: [PATCH 08/18] fucker --- code/modules/projectiles/gun.dm | 1 - .../modules/reagents/chemistry/reagents/other_reagents.dm | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index f97dc5a5ce86..b59a1530a209 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -984,7 +984,6 @@ human_holder = src for(var/obj/item/gun/at_risk in get_all_contents()) var/chance_to_fire = GUN_NO_SAFETY_MALFUNCTION_CHANCE_MEDIUM - var/did_fire = FALSE if(human_holder) // gun is less likely to go off in a holster if(at_risk == human_holder.s_store) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index e78d62150a78..b1514fd60d6d 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1270,10 +1270,10 @@ /datum/reagent/carbon_monoxide/on_mob_delete(mob/living/living_mob) var/mob/living/carbon/living_carbon = living_mob if(accumilation <= 140) - victim.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) - victim.cure_trauma_type(/datum/brain_trauma/mild/concussion) - victim.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) - victim.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) + living_mob.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) + living_mob.cure_trauma_type(/datum/brain_trauma/mild/concussion) + living_mob.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) + living_mob.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) /datum/reagent/stimulum From bfb5c49c874157c9269f0e47aa61b7dd5ba98358 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:41:46 -0700 Subject: [PATCH 09/18] FUCK --- .../modules/reagents/chemistry/reagents/other_reagents.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index b1514fd60d6d..6184ba19aaba 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1270,10 +1270,10 @@ /datum/reagent/carbon_monoxide/on_mob_delete(mob/living/living_mob) var/mob/living/carbon/living_carbon = living_mob if(accumilation <= 140) - living_mob.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) - living_mob.cure_trauma_type(/datum/brain_trauma/mild/concussion) - living_mob.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) - living_mob.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/concussion) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) + living_living_carbonmob.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) /datum/reagent/stimulum From 109e2947380546249ea88d674cc93bf7095d7e93 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:42:32 -0700 Subject: [PATCH 10/18] bitch --- code/modules/reagents/chemistry/reagents/other_reagents.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 6184ba19aaba..2ab11b49d146 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1273,7 +1273,7 @@ living_carbon.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) living_carbon.cure_trauma_type(/datum/brain_trauma/mild/concussion) living_carbon.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) - living_living_carbonmob.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) /datum/reagent/stimulum From 65521fe3a15343141aa32360e32b26ea0475396f Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:47:50 -0700 Subject: [PATCH 11/18] CI fail --- .../atmospherics/machinery/components/unary_devices/tank.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index d41d9e56b793..a58a59258b42 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -110,7 +110,7 @@ /obj/machinery/atmospherics/components/unary/tank/fuel icon_state = "orange" -/obj/machinery/atmospherics/components/unary/tank/fuel/Initialize(mapload) +/obj/machinery/atmospherics/components/unary/tank/fuel/New() . = ..() var/datum/gas_mixture/air_contents = airs[1] air_contents.set_moles(GAS_O2, AIR_CONTENTS * 0.3) From e72401d9967cef30aa6191338be593101afe0dd6 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:35:29 -0700 Subject: [PATCH 12/18] fixes, l inux auxmos works weirdly --- code/modules/atmospherics/machinery/airalarm.dm | 6 +++--- code/modules/power/port_gen.dm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 27c5e6ae2d89..6d147db95c55 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -130,7 +130,7 @@ GAS_HYDROGEN = new/datum/tlv/dangerous, GAS_CHLORINE = new/datum/tlv/dangerous, GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, - GAS_CO = new/datum/tlv(-1, -1, 0.002, 2) + GAS_CO = new/datum/tlv/dangerous, ) /obj/machinery/airalarm/server // No checks here. @@ -153,7 +153,7 @@ GAS_HYDROGEN = new/datum/tlv/no_checks, GAS_CHLORINE = new/datum/tlv/dangerous, GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, - GAS_CO = new/datum/tlv(-1, -1, 5, 10) + GAS_CO = new/datum/tlv/dangerous ) heating_manage = FALSE @@ -177,7 +177,7 @@ GAS_HYDROGEN = new/datum/tlv/dangerous, GAS_CHLORINE = new/datum/tlv/dangerous, GAS_HYDROGEN_CHLORIDE = new/datum/tlv/dangerous, - GAS_CO = new/datum/tlv(-1, -1, 5, 10) + GAS_CO = new/datum/tlv/dangerous ) heating_manage = FALSE diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 0038c73d928f..69325239cbc7 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -94,7 +94,7 @@ var/sheet_left = 0 // How much is left of the sheet var/time_per_sheet = 260 var/current_heat = 0 - var/pollution_multiplier = 2.5 + var/pollution_multiplier = 2 var/pollution_gas = GAS_CO /obj/machinery/power/port_gen/pacman/Initialize() From 8efcbbdc510b62faa1434add62dd7c6473dfe309 Mon Sep 17 00:00:00 2001 From: rye-rice <58402542+rye-rice@users.noreply.github.com> Date: Wed, 18 Sep 2024 10:56:46 -0700 Subject: [PATCH 13/18] Update code/datums/components/pellet_cloud.dm Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Signed-off-by: rye-rice <58402542+rye-rice@users.noreply.github.com> --- code/datums/components/pellet_cloud.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/datums/components/pellet_cloud.dm b/code/datums/components/pellet_cloud.dm index d5e3f330fb62..27e257e4fb08 100644 --- a/code/datums/components/pellet_cloud.dm +++ b/code/datums/components/pellet_cloud.dm @@ -74,8 +74,6 @@ RegisterSignal(parent, COMSIG_GRENADE_PRIME, PROC_REF(create_blast_pellets)) else if(islandmine(parent)) RegisterSignal(parent, COMSIG_MINE_TRIGGERED, PROC_REF(create_blast_pellets)) - else if(issupplypod(parent)) - RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, PROC_REF(create_blast_pellets)) else RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, PROC_REF(create_blast_pellets)) From 361b504e430caf2064623fd4d3a4bb2fe6797ef6 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:01:38 -0700 Subject: [PATCH 14/18] on second thought --- code/modules/power/port_gen.dm | 4 ++-- code/modules/reagents/chemistry/reagents/other_reagents.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 69325239cbc7..2b6fccf4982c 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -94,10 +94,10 @@ var/sheet_left = 0 // How much is left of the sheet var/time_per_sheet = 260 var/current_heat = 0 - var/pollution_multiplier = 2 + var/pollution_multiplier = 1 var/pollution_gas = GAS_CO -/obj/machinery/power/port_gen/pacman/Initialize() +/obj/machinery/power/port_gen/pacman/Initializge() . = ..() if(anchored) connect_to_network() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 2ab11b49d146..f73724f9c6c6 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1213,7 +1213,7 @@ victim.adjustStaminaLoss(1) if(150 to 250) to_chat(victim, "[pick("Your head hurts!", "You feel a burning knife inside your brain!", "A wave of pain fills your head!")]") - victim.adjustStaminaLoss(3) + victim.adjustStaminaLoss(1) victim.Stun(10) victim.Dizzy(5) victim.confused += (accumilation/50) @@ -1221,7 +1221,7 @@ victim.gain_trauma(/datum/brain_trauma/mild/muscle_weakness) if(250 to 350) to_chat(victim, "[pick("What were you doing...?", "Where are you...?", "What's going on...?")]") - victim.adjustStaminaLoss(5) + victim.adjustStaminaLoss(3) victim.Stun(35) victim.Dizzy(5) From 10310415d56c800db9f4586609dc81b976715b6d Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:14:13 -0700 Subject: [PATCH 15/18] lets see --- .../reagents/chemistry/reagents/other_reagents.dm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index f73724f9c6c6..7c0f889a1ece 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1269,11 +1269,10 @@ /datum/reagent/carbon_monoxide/on_mob_delete(mob/living/living_mob) var/mob/living/carbon/living_carbon = living_mob - if(accumilation <= 140) - living_carbon.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) - living_carbon.cure_trauma_type(/datum/brain_trauma/mild/concussion) - living_carbon.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) - living_carbon.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/muscle_weakness) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/concussion) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/speech_impediment) + living_carbon.cure_trauma_type(/datum/brain_trauma/mild/expressive_aphasia) /datum/reagent/stimulum From dc73e62d41f133abaddcec41eca616b9677beeb4 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:16:53 -0700 Subject: [PATCH 16/18] typo --- code/modules/power/port_gen.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 2b6fccf4982c..d8b55eb1d27b 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -97,7 +97,7 @@ var/pollution_multiplier = 1 var/pollution_gas = GAS_CO -/obj/machinery/power/port_gen/pacman/Initializge() +/obj/machinery/power/port_gen/pacman/Initialize() . = ..() if(anchored) connect_to_network() From beb7563f69f99d13a17f362a48ac38b0769f59aa Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:02:50 -0700 Subject: [PATCH 17/18] changes for TM --- code/__DEFINES/atmospherics.dm | 8 ++++---- code/game/objects/items.dm | 4 ++-- code/game/objects/items/tanks/tanks.dm | 16 +++++++++------ .../components/unary_devices/tank.dm | 20 +++++++++++-------- .../machinery/portable/canister.dm | 16 +++++++++------ .../mining_mobs/elites/goliath_broodmother.dm | 2 +- .../chemistry/reagents/other_reagents.dm | 8 +++----- 7 files changed, 42 insertions(+), 32 deletions(-) diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 96759bdcdc07..1443bdb0b03c 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -168,13 +168,13 @@ //TANKS /// temperature in kelvins at which a tank will start to melt -#define TANK_MELT_TEMPERATURE 800 + T0C +#define TANK_MELT_TEMPERATURE 1000 + T0C /// Tank starts leaking -#define TANK_LEAK_PRESSURE (10 * ONE_ATMOSPHERE + 5) +#define TANK_LEAK_PRESSURE (20 * ONE_ATMOSPHERE + 5) /// Tank spills all contents into atmosphere -#define TANK_RUPTURE_PRESSURE (11 * ONE_ATMOSPHERE) +#define TANK_RUPTURE_PRESSURE (20 * ONE_ATMOSPHERE) /// Boom 3x3 base explosion -#define TANK_FRAGMENT_PRESSURE (12.*ONE_ATMOSPHERE) +#define TANK_FRAGMENT_PRESSURE (30.*ONE_ATMOSPHERE) /// +1 for each SCALE kPa aboe threshold #define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) #define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 63a74761513d..0dc066b7ff90 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -840,12 +840,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb var/turf/test_turf = get_step(location, dir) for(var/obj/to_test as obj in test_turf.contents) if(istype(to_test, /obj/structure/reagent_dispensers/fueltank)) - visible_message("A single ember from [src] drops gently onto [to_test]. Uh oh.") + location.visible_message("A single ember from [src] drops gently onto [to_test]. Uh oh.") to_test.fire_act() ruined_round = TRUE break if(istype(to_test, /obj/machinery/atmospherics/components/unary/tank)) - visible_message("A flash fire forms around [src]!") + location.visible_message("A flash fire forms around [src]!") location.IgniteTurf(flame_heat/20) new /obj/effect/hotspot(location) ruined_round = TRUE diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 10c32fc68cd9..676ebaaa0ea8 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -227,12 +227,12 @@ /obj/item/tank/fire_act(exposed_temperature, exposed_volume) . = ..() var/tank_temperature = air_contents.return_temperature() - tank_temperature = ((tank_temperature * 4) + exposed_temperature)/5 //slowly equalize with the air, since this is over an active fire, we heat up faster + tank_temperature += exposed_temperature/20 //slowly equalize with the air, since this is over an active fire, we heat up faster air_contents.set_temperature(tank_temperature) if(exposed_temperature > TANK_MELT_TEMPERATURE) - take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE)/2, 0), BURN, 0) if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion - take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) /obj/item/tank/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) @@ -242,9 +242,13 @@ tank_temperature = ((tank_temperature * 6) + exposed_temperature)/7 //slowly equalize with the air air_contents.set_temperature(tank_temperature) if(exposed_temperature > TANK_MELT_TEMPERATURE) - take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE)/2, 0), BURN, 0) if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion - take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) + +/obj/item/tank/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration) + . = ..() + shake_animation(damage_amount, max(damage_amount/2, 2)) /obj/item/tank/proc/check_status() //Handle exploding, leaking, and rupturing of the tank @@ -267,7 +271,7 @@ var/turf/epicenter = get_turf(loc) - explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) + explosion(epicenter, round(range*0.05), round(range*0.5), round(range), round(range*1.5)) AddComponent(/datum/component/pellet_cloud, /obj/projectile/bullet/shrapnel/hot, round(range)) if(istype(src.loc, /obj/item/transfer_valve)) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index a58a59258b42..bdb9e8adc266 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -49,19 +49,23 @@ . = ..() var/datum/gas_mixture/air_contents = airs[1] var/tank_temperature = air_contents.return_temperature() - tank_temperature = ((tank_temperature * 4) + exposed_temperature)/5 //equalize with the air - since this means theres an active fire on the canister's tile + tank_temperature += exposed_temperature/20 //equalize with the air - since this means theres an active fire on the canister's tile air_contents.set_temperature(tank_temperature) if(exposed_temperature > TANK_MELT_TEMPERATURE) - take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) - if(exposed_volume > volume*2) // implosion - take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE)/2, 0), BURN, 0) + if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) /obj/machinery/atmospherics/components/unary/tank/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > TANK_MELT_TEMPERATURE) //dont equalize temperature as this would affect atmos balance, we only want fires to be more dangerous - take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0) - if(exposed_volume > volume*2) // implosion - take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE)/2, 0), BURN, 0) + if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) + +/obj/machinery/atmospherics/components/unary/tank/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration) + . = ..() + shake_animation(damage_amount, max(damage_amount/2, 2)) /obj/machinery/atmospherics/components/unary/tank/obj_destruction(damage_flag) var/datum/gas_mixture/air_contents = airs[1] @@ -76,7 +80,7 @@ log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively") investigate_log("was destroyed.", INVESTIGATE_ATMOS) - explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) + explosion(epicenter, round(range*0.05), round(range*0.5), round(range), round(range*1.5)) AddComponent(/datum/component/pellet_cloud, /obj/projectile/bullet/shrapnel/hot, round(range)) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 0a5d718652c4..5ef00f162471 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -289,19 +289,23 @@ /obj/machinery/portable_atmospherics/canister/fire_act(exposed_temperature, exposed_volume) . = ..() var/can_temperature = air_contents.return_temperature() - can_temperature = ((can_temperature * 4) + exposed_temperature)/5 //equalize with the air - since this means theres an active fire on the canister's tile + can_temperature += exposed_temperature/20 //equalize with the air - since this means theres an active fire on the canister's tile air_contents.set_temperature(can_temperature) if(exposed_temperature > temperature_resistance) - take_damage(max((exposed_temperature - temperature_resistance), 0), BURN, 0) + take_damage(max((exposed_temperature - temperature_resistance)/2, 0), BURN, 0) if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion - take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) /obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > temperature_resistance) //dont equalize temperature as this would affect atmos balance, we only want fires to be more dangerous - take_damage(max((exposed_temperature - temperature_resistance), 0), BURN, 0) + take_damage(max((exposed_temperature - temperature_resistance)/2, 0), BURN, 0) if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion - take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0) + take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) + +/obj/machinery/portable_atmospherics/canister/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration) + . = ..() + shake_animation(damage_amount, max(damage_amount/2, 2)) /obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) @@ -349,7 +353,7 @@ log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively") investigate_log("was destroyed.", INVESTIGATE_ATMOS) - explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) + explosion(epicenter, round(range*0.05), round(range*0.5), round(range), round(range*1.5)) AddComponent(/datum/component/pellet_cloud, /obj/projectile/bullet/shrapnel/hot, round(range)) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm index 94dd221945b9..f75710b86da7 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm @@ -212,7 +212,7 @@ /mob/living/simple_animal/hostile/asteroid/elite/broodmother_child/death() . = ..() visible_message("[src] explodes!") - explosion(get_turf(loc),0,0,0,flame_range = 3, adminlog = FALSE) + explosion(get_turf(loc),0,0,0,flame_range = 2, adminlog = FALSE) gib() //Tentacles have less stun time compared to regular variant, to balance being able to use them much more often. Also, 10 more damage. diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 7c0f889a1ece..d6538ddc621a 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1210,13 +1210,11 @@ if(50 to 150) to_chat(victim, "[pick("Your head hurts.", "Your head pounds.")]") victim.Dizzy(5) - victim.adjustStaminaLoss(1) if(150 to 250) to_chat(victim, "[pick("Your head hurts!", "You feel a burning knife inside your brain!", "A wave of pain fills your head!")]") - victim.adjustStaminaLoss(1) victim.Stun(10) victim.Dizzy(5) - victim.confused += (accumilation/50) + victim.confused = (accumilation/50) victim.gain_trauma(/datum/brain_trauma/mild/expressive_aphasia) victim.gain_trauma(/datum/brain_trauma/mild/muscle_weakness) if(250 to 350) @@ -1225,8 +1223,8 @@ victim.Stun(35) victim.Dizzy(5) - victim.confused += (accumilation/50) - victim.drowsyness += (accumilation/50) + victim.confused = (accumilation/50) + victim.drowsyness = (accumilation/50) victim.adjustToxLoss(accumilation/100*REM, 0) From cede190d5679a5a6a8d313d9c10e7faab48dd7d5 Mon Sep 17 00:00:00 2001 From: retlaw34 <58402542+retlaw34@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:12:12 -0700 Subject: [PATCH 18/18] wawa --- code/modules/power/port_gen.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index d8b55eb1d27b..a4021a3216cb 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -94,7 +94,7 @@ var/sheet_left = 0 // How much is left of the sheet var/time_per_sheet = 260 var/current_heat = 0 - var/pollution_multiplier = 1 + var/pollution_multiplier = 0 var/pollution_gas = GAS_CO /obj/machinery/power/port_gen/pacman/Initialize() @@ -296,7 +296,7 @@ circuit = /obj/item/circuitboard/machine/pacman/super sheet_path = /obj/item/stack/sheet/mineral/uranium power_gen = 15000 - pollution_multiplier = 0.2 + pollution_multiplier = 0 /obj/machinery/power/port_gen/pacman/super/overheat() . =..() @@ -309,7 +309,7 @@ circuit = /obj/item/circuitboard/machine/pacman/mrs sheet_path = /obj/item/stack/sheet/mineral/diamond power_gen = 40000 - pollution_multiplier = 0.1 + pollution_multiplier = 0 /obj/machinery/power/port_gen/pacman/mrs/overheat() . =..()