Adds the ability for people to light alcoholic shots; adds the flaming moe!

This commit is contained in:
Citinited
2017-07-30 09:52:13 +01:00
parent ad4e2ea019
commit 576adfb4e9
6 changed files with 125 additions and 13 deletions
+6
View File
@@ -1196,6 +1196,12 @@ var/global/list/common_tools = list(
return 0
if(istype(W, /obj/item/device/assembly/igniter))
return 1000
if(istype(W, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass))
var/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/G = W
if(G.on_fire)
return 700
else
return 0
else
return 0
+2 -13
View File
@@ -75,24 +75,11 @@ LIGHTERS ARE IN LIGHTERS.DM
if(Z.lit)
light("<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.</span>")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
if(M.lit == 1)
light("<span class='notice'>[user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/melee/energy/sword/saber))
var/obj/item/weapon/melee/energy/sword/saber/S = W
if(S.active)
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
else if(istype(W, /obj/item/device/assembly/igniter))
light("<span class='notice'>[user] fiddles with [W], and manages to light their [name].</span>")
else if(istype(W, /obj/item/weapon/gun/magic/wand/fireball))
var/obj/item/weapon/gun/magic/wand/fireball/F = W
if(F.charges)
@@ -103,6 +90,8 @@ LIGHTERS ARE IN LIGHTERS.DM
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
F.charges--
else if(is_hot(W) > 600)
light("<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>")
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask()
@@ -1,12 +1,25 @@
#define SHOT_FLAME_TEMPERATURE 700
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass
name = "shot glass"
desc = "No glasses were shot in the making of this glass."
icon_state = "shotglass"
amount_per_transfer_from_this = 15
volume = 15
var/on_fire
materials = list(MAT_GLASS=100)
var/light_intensity = 2
light_color = LIGHT_COLOR_LIGHTBLUE
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/Destroy()
processing_objects.Remove(src)
return ..()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change()
handleFlaming()
update_icon()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/update_icon()
overlays.Cut()
if(reagents.total_volume)
@@ -24,5 +37,87 @@
filling.icon += mix_color_from_reagents(reagents.reagent_list)
overlays += filling
name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future.
if(on_fire)
overlays += "shotglass_fire"
name = "flaming [name]"
else
name = "shot glass"
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/attackby(obj/item/W, mob/living/carbon/human/user)
..()
handleFlaming(W, user)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/proc/handleFlaming(obj/item/W, mob/living/carbon/human/user)
if(!reagents && on_fire) //If no reagents exist inside the shot, it will obviously not sustain a burn
extinguishShot()
else if(!canBeFlaming() && on_fire) //If it's on fire, but can't sustain the flame, put it out
extinguishShot()
else if(canBeFlaming() && !on_fire && is_hot(W) > 300) //if it can burn yet not on fire, and is attacked by something hot, set it alight
user.visible_message("<span class = 'warning'>[user] sets [src] alight!</span>", "<span class = 'notice'>You set [src] alight!</span>", "<span class = 'warning'>You hear a gentle crackling.</span>")
lightShot()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/proc/canBeFlaming()
var/datum/reagent/R = reagents.get_master_reagent()
if(istype(R, /datum/reagent/consumable/ethanol))
var/datum/reagent/consumable/ethanol/A = R
if(A.volume >= 5 && A.alcohol_perc >= 0.35) //Only an approximation to if something's flammable but it will do
return TRUE
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/proc/lightShot(var/silent)
on_fire = TRUE
processing_objects.Add(src) //So it can do stuff like set plasma clouds on fire
set_light(light_intensity, null, light_color)
if(!silent)
visible_message("<span class = 'notice'>[src] begins to burn with a blue hue!</span>")
update_icon()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/proc/extinguishShot(var/silent)
on_fire = FALSE
processing_objects.Remove(src)
set_light(0)
if(!silent)
visible_message("<span class = 'notice'>The dancing flame on [src] dies out.</span>")
update_icon()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/proc/clumsilyDrink(mob/living/carbon/human/user) //Clowns beware
if(!on_fire)
return
user.visible_message("<span class = 'warning'>[user] pours [src] all over themself!</span>", "<span class = 'danger'>You pour [src] all over yourself!</span>", "<span class = 'warning'>You hear a 'whoompf' and a sizzle.</span>")
reagents.reaction(user, TOUCH)
reagents.clear_reagents()
user.adjust_fire_stacks(reagents.total_volume/10)
user.IgniteMob()
extinguishShot(TRUE)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/process()
if(on_fire)
reagents.chem_temp = min(reagents.chem_temp + 10, SHOT_FLAME_TEMPERATURE)
reagents.handle_reactions()
var/turf/L = get_turf(src)
if(L)
L.hotspot_expose(SHOT_FLAME_TEMPERATURE, 5)
return
else
processing_objects.Remove(src)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/attack_self(mob/living/carbon/human/user)
..()
if(!on_fire)
return
if((CLUMSY in user.mutations) && prob(50))
clumsilyDrink(user)
else
user.visible_message("<span class = 'notice'>[user] places their hand over [src] to put it out!</span>", "<span class = 'notice'>You use your hand to extinguish [src]!</span>")
extinguishShot()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/attack(mob/living/carbon/human/user)
if((CLUMSY in user.mutations) && prob(75) && on_fire)
clumsilyDrink(user)
else
..()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/MouseDrop(mob/living/carbon/human/user)
if((CLUMSY in user.mutations) && prob(75) && on_fire)
clumsilyDrink(user)
else
..()
@@ -424,6 +424,18 @@
drink_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy."
taste_message = "the number fourty two"
/datum/reagent/consumable/ethanol/flaming_moe
name = "Flaming Moe"
id = "flamingmoe"
description = "This seems like a bunch of various alcohols thrown together, along with what looks like prescription medicine..."
reagent_state = LIQUID
color = "#58447f"
alcohol_perc = 0.5
drink_icon = "flamingmoeglass"
drink_name = "Flaming Moe"
drink_desc = "Happiness is just a Flaming Moe away!"
taste_message = "caramelised booze and medicine"
/datum/reagent/consumable/ethanol/brave_bull
name = "Brave Bull"
id = "bravebull"
@@ -224,6 +224,16 @@
result_amount = 5
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/chemical_reaction/flaming_moe
name = "Flaming Moe"
id = "flamingmoe"
result = "flamingmoe"
required_reagents = list("vodka" = 1, "gin" = 1, "cognac" = 1, "tequila" = 1, "oculine" = 1) //Close enough
min_temp = 374 //Fire makes it good!
result_amount = 5
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
mix_message = "The concoction bursts into flame!"
/datum/chemical_reaction/brave_bull
name = "Brave Bull"
id = "bravebull"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 78 KiB