[MIRROR] Adds some new drink functions, buffs Brave Bull (#2838)
* Adds some new drink functions, buffs Brave Bull (#30521) * Adds some new drink functions, buffs Brave Bull * Light holder object * Cleans Tequila Sunrise if its light object is eaten * QDEL_NULL * Health clamp * Adds some new drink functions, buffs Brave Bull
This commit is contained in:
committed by
Poojawa
parent
b08ec542e7
commit
53421365f1
@@ -566,6 +566,8 @@
|
||||
my_atom.on_reagent_change()
|
||||
if(!no_react)
|
||||
handle_reactions()
|
||||
if(isliving(my_atom))
|
||||
R.on_mob_add(my_atom)
|
||||
return TRUE
|
||||
|
||||
else
|
||||
|
||||
@@ -58,6 +58,10 @@
|
||||
holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
return
|
||||
|
||||
// Called when this reagent is first added to a mob
|
||||
/datum/reagent/proc/on_mob_add(mob/M)
|
||||
return
|
||||
|
||||
// Called when this reagent is removed while inside a mob
|
||||
/datum/reagent/proc/on_mob_delete(mob/M)
|
||||
return
|
||||
|
||||
@@ -470,6 +470,13 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "Bloody Mary"
|
||||
glass_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder."
|
||||
|
||||
/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/M)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
C.blood_volume = min(BLOOD_VOLUME_NORMAL, C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/brave_bull
|
||||
name = "Brave Bull"
|
||||
id = "bravebull"
|
||||
@@ -480,16 +487,18 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "bravebullglass"
|
||||
glass_name = "Brave Bull"
|
||||
glass_desc = "Tequila and Coffee liqueur, brought together in a mouthwatering mixture. Drink up."
|
||||
var/tough_text
|
||||
|
||||
/datum/reagent/consumable/ethanol/brave_bull/on_mob_life(mob/living/M)
|
||||
if(M.maxHealth == initial(M.maxHealth)) //Brave Bull makes you sturdier, and thus capable of withstanding a tiny bit more punishment.
|
||||
M.maxHealth += 5
|
||||
M.health += 5
|
||||
return ..()
|
||||
/datum/reagent/consumable/ethanol/brave_bull/on_mob_add(mob/living/M)
|
||||
tough_text = pick("brawny", "tenacious", "tough", "hardy", "sturdy") //Tuff stuff
|
||||
to_chat(M, "<span class='notice'>You feel [tough_text]!</span>")
|
||||
M.maxHealth += 10 //Brave Bull makes you sturdier, and thus capable of withstanding a tiny bit more punishment.
|
||||
M.health += 10
|
||||
|
||||
/datum/reagent/consumable/ethanol/brave_bull/on_mob_delete(mob/living/M)
|
||||
if(M.maxHealth != initial(M.maxHealth))
|
||||
M.maxHealth = initial(M.maxHealth)
|
||||
to_chat(M, "<span class='notice'>You no longer feel [tough_text].</span>")
|
||||
M.maxHealth -= 10
|
||||
M.health = min(M.health - 10, M.maxHealth) //This can indeed crit you if you're alive solely based on alchol ingestion
|
||||
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise
|
||||
name = "Tequila Sunrise"
|
||||
@@ -501,6 +510,23 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "tequilasunriseglass"
|
||||
glass_name = "tequila Sunrise"
|
||||
glass_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..."
|
||||
var/obj/effect/light_holder
|
||||
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_add(mob/living/M)
|
||||
to_chat(M, "<span class='notice'>You feel gentle warmth spread through your body!</span>")
|
||||
light_holder = new(M)
|
||||
light_holder.set_light(3, 0.7, "#FFCC00") //Tequila Sunrise makes you radiate dim light, like a sunrise!
|
||||
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_life(mob/living/M)
|
||||
if(QDELETED(light_holder))
|
||||
M.reagents.del_reagent("tequilasunrise") //If we lost our light object somehow, remove the reagent
|
||||
else if(light_holder.loc != M)
|
||||
light_holder.forceMove(M)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_delete(mob/living/M)
|
||||
to_chat(M, "<span class='notice'>The warmth in your body fades.</span>")
|
||||
QDEL_NULL(light_holder)
|
||||
|
||||
/datum/reagent/consumable/ethanol/toxins_special
|
||||
name = "Toxins Special"
|
||||
@@ -556,6 +582,21 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "manlydorfglass"
|
||||
glass_name = "The Manly Dorf"
|
||||
glass_desc = "A manly concoction made from Ale and Beer. Intended for true men only."
|
||||
var/dorf_mode
|
||||
|
||||
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_add(mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna.check_mutation(DWARFISM))
|
||||
to_chat(H, "<span class='notice'>Now THAT is MANLY!</span>")
|
||||
boozepwr = 5 //We've had worse in the mines
|
||||
dorf_mode = TRUE
|
||||
|
||||
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/M)
|
||||
if(dorf_mode)
|
||||
M.adjustBruteLoss(-2)
|
||||
M.adjustFireLoss(-2)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/longislandicedtea
|
||||
name = "Long Island Iced Tea"
|
||||
@@ -592,6 +633,9 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "Kahlua, Irish Cream, and cognac. You will get bombed."
|
||||
shot_glass_icon_state = "b52glass"
|
||||
|
||||
/datum/reagent/consumable/ethanol/b52/on_mob_add(mob/living/M)
|
||||
playsound(M, 'sound/effects/explosion_distant.ogg', 100, FALSE)
|
||||
|
||||
/datum/reagent/consumable/ethanol/irishcoffee
|
||||
name = "Irish Coffee"
|
||||
id = "irishcoffee"
|
||||
|
||||
Reference in New Issue
Block a user