Fixed the champagne bottle being able to be popped multiple times (#19275)

Fixed the champagne bottle being able to be popped multiple times

Fixes #19221
This commit is contained in:
Fluffy
2024-05-31 06:04:09 +00:00
committed by GitHub
parent 4cd0d1d891
commit d70ba41854
2 changed files with 66 additions and 1 deletions
@@ -353,7 +353,8 @@
return ..()
balloon_alert(user, "fiddling with cork...")
if(do_after(user, 1 SECONDS, src))
return open(user, sabrage = FALSE, froth_severity = pick(0, 1))
if(!is_open_container())
return open(user, sabrage = FALSE, froth_severity = pick(0, 1))
/obj/item/reagent_containers/food/drinks/bottle/champagne/attackby(obj/item/attacking_item, mob/user)
. = ..()
@@ -373,6 +374,12 @@
if(!do_after(user, 2 SECONDS, src)) //takes longer because you are supposed to take the foil off the bottle first
return
if(is_open_container())
balloon_alert(user, "the bottle was already open, you spill some on the floor...")
if(reagents.total_volume)
src.reagents.remove_any(reagents.total_volume / 5)
return
///The bonus to success chance that the user gets for being a command role
var/command_bonus = (user.mind?.assigned_role in command_positions) ? 20 : 0