From 9df1ff28eff97428e379700c7b83addcb3d6b943 Mon Sep 17 00:00:00 2001 From: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Date: Fri, 31 Oct 2025 18:59:15 -0400 Subject: [PATCH] Makes soda cans explode when exposed at low pressure. (#93571) ## About The Pull Request Fun idea discussed on the discord. At low pressure, cans of soda will burst at 67.458 kPa, which is WAY higher than I would have expected, but that may just say something about the construction of the average can of soda. ## Why It's Good For The Game Fun little realism feature, which I found amusing enough for a quick 15 minute project. Only applies to cans that are actually exposed to atmos, so a held can while in space or in the bag won't trigger this reaction. ## Changelog :cl: add: Leaving a can of soda exposed to the elements at low pressure will now burst. /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/game/objects/effects/decals/cleanable/mess.dm | 4 ++++ code/modules/reagents/reagent_containers/cups/soda.dm | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/code/game/objects/effects/decals/cleanable/mess.dm b/code/game/objects/effects/decals/cleanable/mess.dm index 1a2e307c1b3..717dd4f7086 100644 --- a/code/game/objects/effects/decals/cleanable/mess.dm +++ b/code/game/objects/effects/decals/cleanable/mess.dm @@ -383,3 +383,7 @@ GLOBAL_LIST_EMPTY(nebula_vomits) flick("rubble_bounce", src) icon_state = "rubble" update_appearance(UPDATE_ICON_STATE) + +/obj/effect/decal/cleanable/can_bits + name = "shredded can" + desc = "This story doesn't hold water anymore." diff --git a/code/modules/reagents/reagent_containers/cups/soda.dm b/code/modules/reagents/reagent_containers/cups/soda.dm index e8304d71cb9..569d40d33cd 100644 --- a/code/modules/reagents/reagent_containers/cups/soda.dm +++ b/code/modules/reagents/reagent_containers/cups/soda.dm @@ -5,6 +5,8 @@ #define SODA_FIZZINESS_THROWN 15 /// How much fizziness is added to the can of soda by shaking it, in percentage points #define SODA_FIZZINESS_SHAKE 5 +/// At what atmospheric pressure do we burst a soda can? Empirical evidance (one googled experiment video) states that ~67.458 kPa is where a can bursts. +#define SODA_EXPLOSION_PRESSURE 67.458 /obj/item/reagent_containers/cup/soda_cans name = "soda can" @@ -24,6 +26,7 @@ /obj/item/reagent_containers/cup/soda_cans/Initialize(mapload, vol) . = ..() AddElement(/datum/element/slapcrafting, string_list(list(/datum/crafting_recipe/improv_explosive))) + AddElement(/datum/element/atmos_sensitive, mapload) //Enables soda cans to explode in vaccuum. /obj/item/reagent_containers/cup/soda_cans/random/Initialize(mapload) ..() @@ -170,8 +173,16 @@ . += span_notice("You examine [src] closer, and note the following...") . += "\t[span_warning("You get a menacing aura of fizziness from it...")]" +/obj/item/reagent_containers/cup/soda_cans/should_atmos_process(datum/gas_mixture/air, exposed_temperature) + return ((air.return_pressure() <= SODA_EXPLOSION_PRESSURE) && !(reagents.flags & OPENCONTAINER)) + +/obj/item/reagent_containers/cup/soda_cans/atmos_expose(datum/gas_mixture/air, exposed_temperature) + if(reagents.total_volume && !(reagents.flags & OPENCONTAINER)) + burst_soda(loc) + #undef SODA_FIZZINESS_THROWN #undef SODA_FIZZINESS_SHAKE +#undef SODA_EXPLOSION_PRESSURE /obj/item/reagent_containers/cup/soda_cans/cola name = "Space Cola"