diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index ce51eaf770d..bb342cc6ae0 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -9,19 +9,35 @@ flags = OPENCONTAINER amount_per_transfer_from_this = 5 volume = 50 + var/shaken = 0 on_reagent_change() return attack_self(mob/user as mob) if(!is_open_container()) - open(user) + if(user.a_intent == I_HURT && !shaken) + shaken = 1 + user << "You shake the [src]!" + playsound(loc,'sound/items/Shaking_Soda_Can.ogg', rand(10,50), 1) + return + if(shaken) + boom(user) + else + open(user) proc/open(mob/user) playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1) user << "You open [src] with an audible pop!" flags |= OPENCONTAINER + proc/boom(user) + user << "The [src] explodes all over you as you open it!" + playsound(loc,'sound/items/Soda_Burst.ogg', rand(20,50), 1) + QDEL_NULL(reagents) + flags |= OPENCONTAINER + shaken = 0 + attack(mob/M as mob, mob/user as mob, def_zone) if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT) return ..() diff --git a/html/changelogs/Printer16-SodaCanExplode.yml b/html/changelogs/Printer16-SodaCanExplode.yml new file mode 100644 index 00000000000..26f89537158 --- /dev/null +++ b/html/changelogs/Printer16-SodaCanExplode.yml @@ -0,0 +1,4 @@ +author: Printer16 +delete-after: True +changes: + - rscadd: "Using a soda can with harm intent now shakes it up causing it to explode on whoever opens it." diff --git a/sound/items/Shaking_Soda_Can.ogg b/sound/items/Shaking_Soda_Can.ogg new file mode 100644 index 00000000000..ae343700389 Binary files /dev/null and b/sound/items/Shaking_Soda_Can.ogg differ diff --git a/sound/items/Soda_Burst.ogg b/sound/items/Soda_Burst.ogg new file mode 100644 index 00000000000..58e7257181b Binary files /dev/null and b/sound/items/Soda_Burst.ogg differ