mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
adds condition to prevent chugging of unopened containers
This commit is contained in:
@@ -43,6 +43,9 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/MouseDrop(atom/over_object) //CHUG! CHUG! CHUG!
|
||||
var/mob/living/carbon/chugger = over_object
|
||||
if (!(flags & OPENCONTAINER))
|
||||
to_chat(chugger, "<span class='notice'>You need to open [src] first!</span>")
|
||||
return
|
||||
if(istype(chugger) && loc == chugger && src == chugger.get_active_hand() && reagents.total_volume)
|
||||
chugger.visible_message("<span class='notice'>[chugger] raises the [src] to their mouth and starts [pick("chugging","gulping")] it down like [pick("a savage","a mad beast","it's going out of style","there's no tomorrow")]!</span>", "<span class='notice'>You start chugging \the [src].</span>", "<span class='notice'>You hear what sounds like gulping.</span>")
|
||||
while(do_mob(chugger, chugger, 40)) //Between the default time for do_mob and the time it takes for a vampire to suck blood.
|
||||
|
||||
Reference in New Issue
Block a user