mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Advanced Alcoholism
You can now click-drag drink containers onto yourself to start chugging.
This commit is contained in:
@@ -41,6 +41,17 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/MouseDrop(atom/over_object) //CHUG! CHUG! CHUG!
|
||||
var/mob/living/carbon/chugger = over_object
|
||||
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.
|
||||
chugger.eat(src, chugger, 25) //Half of a glass, quarter of a bottle.
|
||||
if(!reagents.total_volume) //Finish in style.
|
||||
chugger.emote("gasp")
|
||||
chugger.visible_message("<span class='notice'>[chugger] [pick("finishes","downs","polishes off","slams")] the entire [src], what a [pick("savage","monster","champ","beast")]!</span>", "<span class='notice'>You finish off the [src]![prob(50) ? " Maybe that wasn't such a good idea..." : ""]</span>", "<span class='notice'>You hear a gasp and a clink.</span>")
|
||||
break
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
|
||||
@@ -936,7 +936,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
/mob/living/carbon/proc/can_eat(flags = 255)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/eat(var/obj/item/weapon/reagent_containers/food/toEat, mob/user)
|
||||
/mob/living/carbon/proc/eat(var/obj/item/weapon/reagent_containers/food/toEat, mob/user, var/bitesize_override)
|
||||
if(!istype(toEat))
|
||||
return 0
|
||||
var/fullness = nutrition + 10
|
||||
@@ -953,7 +953,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
else
|
||||
if(!forceFed(toEat, user, fullness))
|
||||
return 0
|
||||
consume(toEat)
|
||||
consume(toEat, bitesize_override)
|
||||
score_foodeaten++
|
||||
return 1
|
||||
|
||||
@@ -1006,7 +1006,8 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
|
||||
/*TO DO - If/when stomach organs are introduced, override this at the human level sending the item to the stomach
|
||||
so that different stomachs can handle things in different ways VB*/
|
||||
/mob/living/carbon/proc/consume(var/obj/item/weapon/reagent_containers/food/toEat)
|
||||
/mob/living/carbon/proc/consume(var/obj/item/weapon/reagent_containers/food/toEat, var/bitesize_override)
|
||||
var/bitesize = bitesize_override ? bitesize_override : toEat.bitesize
|
||||
if(!toEat.reagents)
|
||||
return
|
||||
if(satiety > -200)
|
||||
@@ -1014,9 +1015,9 @@ so that different stomachs can handle things in different ways VB*/
|
||||
if(toEat.consume_sound)
|
||||
playsound(loc, toEat.consume_sound, rand(10,50), 1)
|
||||
if(toEat.reagents.total_volume)
|
||||
var/fraction = min(toEat.bitesize/toEat.reagents.total_volume, 1)
|
||||
var/fraction = min(bitesize/toEat.reagents.total_volume, 1)
|
||||
toEat.reagents.reaction(src, toEat.apply_type, fraction)
|
||||
toEat.reagents.trans_to(src, toEat.bitesize*toEat.transfer_efficiency)
|
||||
toEat.reagents.trans_to(src, bitesize*toEat.transfer_efficiency)
|
||||
|
||||
/mob/living/carbon/get_access()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user