@@ -29,6 +29,10 @@
|
||||
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if (!is_open_container())
|
||||
to_chat(user, "<span class='warning'>[src]'s lid hasn't been opened!</span>")
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
to_chat(M, "<span class='notice'>You swallow a gulp of [src].</span>")
|
||||
@@ -50,6 +54,10 @@
|
||||
/obj/item/weapon/reagent_containers/food/drinks/afterattack(obj/target, mob/user , proximity)
|
||||
if(!proximity) return
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if (!is_open_container())
|
||||
to_chat(user, "<span class='warning'>[target]'s tab isn't open!</span>")
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty.</span>")
|
||||
@@ -87,11 +95,17 @@
|
||||
to_chat(user, "<span class='notice'>You heat [src] with [I].</span>")
|
||||
reagents.handle_reactions()
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Drinks. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/trophy
|
||||
name = "pewter cup"
|
||||
desc = "Everyone gets a trophy."
|
||||
@@ -287,7 +301,7 @@
|
||||
name = "detective's flask"
|
||||
desc = "The detective's only true friend."
|
||||
icon_state = "detflask"
|
||||
list_reagents = list("whiskey" = 30)
|
||||
list_reagents = list("hearty_punch" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/britcup
|
||||
name = "cup"
|
||||
@@ -312,7 +326,9 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans
|
||||
name = "soda can"
|
||||
|
||||
container_type = 0
|
||||
spillable = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
|
||||
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head")
|
||||
user.visible_message("<span class='warning'>[user] crushes the can of [src] on [user.p_their()] forehead!</span>", "<span class='notice'>You crush the can of [src] on your forehead.</span>")
|
||||
@@ -321,6 +337,16 @@
|
||||
crushed_can.icon_state = icon_state
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/attack_self(mob/user)
|
||||
if(!is_open_container())
|
||||
to_chat(user, "You pull back the tab of \the [src] with a satisfying pop.") //Ahhhhhhhh
|
||||
container_type = OPENCONTAINER
|
||||
playsound(src, "can_open", 50, 1)
|
||||
spillable = TRUE
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/cola
|
||||
name = "Space Cola"
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
///////////////////////////////////////////////Alchohol bottles! -Agouri //////////////////////////
|
||||
//Functionally identical to regular drinks. The only difference is that the default bottle size is 100. - Darem
|
||||
//Bottles now weaken and break when smashed on people's heads. - Giacom
|
||||
//Bottles now knockdown and break when smashed on people's heads. - Giacom
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 100
|
||||
throwforce = 15
|
||||
item_state = "broken_beer" //Generic held-item sprite until unique ones are made.
|
||||
var/const/duration = 13 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets)
|
||||
var/const/duration = 13 //Directly relates to the 'knockdown' duration. Lowered by armor (i.e. helmets)
|
||||
var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/throw_impact(atom/target,mob/thrower)
|
||||
@@ -80,7 +80,7 @@
|
||||
else
|
||||
headarmor = 0
|
||||
|
||||
//Calculate the weakening duration for the target.
|
||||
//Calculate the knockdown duration for the target.
|
||||
armor_duration = (duration - headarmor) + force
|
||||
|
||||
else
|
||||
@@ -88,7 +88,6 @@
|
||||
armor_block = target.run_armor_check(affecting, "melee")
|
||||
if(affecting == "head")
|
||||
armor_duration = duration + force
|
||||
armor_duration /= 10
|
||||
|
||||
//Apply the damage!
|
||||
armor_block = min(90,armor_block)
|
||||
@@ -98,9 +97,9 @@
|
||||
var/head_attack_message = ""
|
||||
if(affecting == "head" && istype(target, /mob/living/carbon/))
|
||||
head_attack_message = " on the head"
|
||||
//Weaken the target for the duration that we calculated and divide it by 5.
|
||||
//Knockdown the target for the duration that we calculated and divide it by 5.
|
||||
if(armor_duration)
|
||||
target.apply_effect(min(armor_duration, 10) , WEAKEN) // Never weaken more than a flash!
|
||||
target.apply_effect(min(armor_duration, 200) , KNOCKDOWN) // Never knockdown more than a flash!
|
||||
|
||||
//Display an attack message.
|
||||
if(target != user)
|
||||
|
||||
Reference in New Issue
Block a user