@@ -452,21 +452,21 @@
|
||||
return 1
|
||||
|
||||
/datum/reagents/proc/check_ignoreslow(mob/M)
|
||||
if(istype(M, /mob))
|
||||
if(ismob(M))
|
||||
if(M.reagents.has_reagent("morphine"))
|
||||
return 1
|
||||
else
|
||||
M.status_flags &= ~IGNORESLOWDOWN
|
||||
|
||||
/datum/reagents/proc/check_gofast(mob/M)
|
||||
if(istype(M, /mob))
|
||||
if(ismob(M))
|
||||
if(M.reagents.has_reagent("unholywater")||M.reagents.has_reagent("nuka_cola")||M.reagents.has_reagent("stimulants")||M.reagents.has_reagent("ephedrine"))
|
||||
return 1
|
||||
else
|
||||
M.status_flags &= ~GOTTAGOFAST
|
||||
|
||||
/datum/reagents/proc/check_goreallyfast(mob/M)
|
||||
if(istype(M, /mob))
|
||||
if(ismob(M))
|
||||
if(M.reagents.has_reagent("methamphetamine"))
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
recharged -= 1
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/recharge()
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
var/usedpower = cell.give( 1 / powerefficiency) //Should always be a gain of one on the UI.
|
||||
if(usedpower)
|
||||
use_power(2500)
|
||||
@@ -212,7 +213,6 @@
|
||||
visible_message("<span class='danger'> The [src] malfunctions, spraying chemicals everywhere!</span>")
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/constructable
|
||||
name = "portable chem dispenser"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
var/operating = FALSE
|
||||
var/obj/item/weapon/reagent_containers/beaker = null
|
||||
var/limit = 10
|
||||
var/list/blend_items = list (
|
||||
|
||||
var/static/list/blend_items = list(
|
||||
//Sheets
|
||||
/obj/item/stack/sheet/mineral/plasma = list("plasma" = 20),
|
||||
/obj/item/stack/sheet/metal = list("iron" = 20),
|
||||
@@ -31,7 +31,6 @@
|
||||
/obj/item/weapon/grown/nettle/basic = list("sacid" = 0),
|
||||
/obj/item/weapon/grown/nettle/death = list("facid" = 0, "sacid" = 0),
|
||||
/obj/item/weapon/grown/novaflower = list("capsaicin" = 0, "condensedcapsaicin" = 0),
|
||||
|
||||
//Blender Stuff
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans = list("soymilk" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list("ketchup" = 0),
|
||||
@@ -42,25 +41,19 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries = list("cherryjelly" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries = list("bluecherryjelly" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg = list("eggyolk" = -5),
|
||||
|
||||
//Grinder stuff, but only if dry
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/coffee/robusta = list("coffeepowder" = 0, "morphine" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/coffee = list("coffeepowder" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tea/astra = list("teapowder" = 0, "salglu_solution" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tea = list("teapowder" = 0),
|
||||
|
||||
|
||||
//All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.!
|
||||
/obj/item/slime_extract = list(),
|
||||
/obj/item/weapon/reagent_containers/pill = list(),
|
||||
/obj/item/weapon/reagent_containers/food = list(),
|
||||
/obj/item/weapon/reagent_containers/honeycomb = list(),
|
||||
/obj/item/toy/crayon = list()
|
||||
|
||||
)
|
||||
|
||||
var/list/juice_items = list (
|
||||
/obj/item/toy/crayon = list())
|
||||
|
||||
var/static/list/juice_items = list(
|
||||
//Juicer Stuff
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/corn = list("corn_starch" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list("tomatojuice" = 0),
|
||||
@@ -78,16 +71,14 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin = list("blumpkinjuice" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/apple = list("applejuice" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes = list("grapejuice" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes/green = list("grapejuice" = 0),
|
||||
)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grapes/green = list("grapejuice" = 0))
|
||||
|
||||
var/list/dried_items = list(
|
||||
var/static/list/dried_items = list(
|
||||
//Grinder stuff, but only if dry,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/coffee/robusta = list("coffeepowder" = 0, "morphine" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/coffee = list("coffeepowder" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tea/astra = list("teapowder" = 0, "salglu_solution" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tea = list("teapowder" = 0)
|
||||
)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tea = list("teapowder" = 0))
|
||||
|
||||
var/list/holdingitems = list()
|
||||
|
||||
@@ -97,9 +88,7 @@
|
||||
beaker.desc += " May contain blended dust. Don't breathe this in!"
|
||||
|
||||
/obj/machinery/reagentgrinder/Destroy()
|
||||
if(beaker)
|
||||
qdel(beaker)
|
||||
beaker = null
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/reagentgrinder/contents_explosion(severity, target)
|
||||
|
||||
@@ -114,9 +114,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-2, 0)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
M.Jitter(5)
|
||||
return ..()
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/ethanol/whiskey
|
||||
name = "Whiskey"
|
||||
@@ -145,7 +146,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
|
||||
/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/M)
|
||||
M.drowsyness = max(0,M.drowsyness-7)
|
||||
M.AdjustSleeping(-2)
|
||||
M.AdjustSleeping(-40)
|
||||
if (M.bodytemperature > 310)
|
||||
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
M.Jitter(5)
|
||||
@@ -529,7 +530,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW."
|
||||
|
||||
/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/M)
|
||||
M.Stun(2, 0)
|
||||
M.Stun(40, 0)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/irish_cream
|
||||
@@ -1111,10 +1112,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.slurring += 3
|
||||
switch(current_cycle)
|
||||
if(51 to 200)
|
||||
M.Sleeping(5, 0)
|
||||
M.Sleeping(100, FALSE)
|
||||
. = 1
|
||||
if(201 to INFINITY)
|
||||
M.AdjustSleeping(2, 0)
|
||||
M.AdjustSleeping(40, FALSE)
|
||||
M.adjustToxLoss(2, 0)
|
||||
. = 1
|
||||
..()
|
||||
@@ -1159,7 +1160,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "A drink that is guaranteed to knock you silly."
|
||||
|
||||
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/M)
|
||||
M.Weaken(3, 1, 0)
|
||||
M.Knockdown(60, 1, 0)
|
||||
M.dizziness +=6
|
||||
switch(current_cycle)
|
||||
if(15 to 45)
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
/datum/reagent/consumable/coffee/on_mob_life(mob/living/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-2, 0)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = min(310, M.bodytemperature + (25 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
if(holder.has_reagent("frostoil"))
|
||||
@@ -297,7 +297,7 @@
|
||||
M.dizziness = max(0,M.dizziness-2)
|
||||
M.drowsyness = max(0,M.drowsyness-1)
|
||||
M.jitteriness = max(0,M.jitteriness-3)
|
||||
M.AdjustSleeping(-1, 0)
|
||||
M.AdjustSleeping(-20, FALSE)
|
||||
if(M.getToxLoss() && prob(20))
|
||||
M.adjustToxLoss(-1, 0)
|
||||
if (M.bodytemperature < 310) //310 is the normal bodytemp. 310.055
|
||||
@@ -336,7 +336,7 @@
|
||||
/datum/reagent/consumable/icecoffee/on_mob_life(mob/living/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-2, 0)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
M.Jitter(5)
|
||||
@@ -357,7 +357,7 @@
|
||||
/datum/reagent/consumable/icetea/on_mob_life(mob/living/M)
|
||||
M.dizziness = max(0,M.dizziness-2)
|
||||
M.drowsyness = max(0,M.drowsyness-1)
|
||||
M.AdjustSleeping(-2, 0)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
if(M.getToxLoss() && prob(20))
|
||||
M.adjustToxLoss(-1, 0)
|
||||
if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
|
||||
@@ -396,7 +396,7 @@
|
||||
M.set_drugginess(30)
|
||||
M.dizziness +=5
|
||||
M.drowsyness = 0
|
||||
M.AdjustSleeping(-2, 0)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
M.status_flags |= GOTTAGOFAST
|
||||
if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
@@ -415,7 +415,7 @@
|
||||
|
||||
/datum/reagent/consumable/spacemountainwind/on_mob_life(mob/living/M)
|
||||
M.drowsyness = max(0,M.drowsyness-7)
|
||||
M.AdjustSleeping(-1, 0)
|
||||
M.AdjustSleeping(-20, FALSE)
|
||||
if (M.bodytemperature > 310)
|
||||
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
M.Jitter(5)
|
||||
@@ -529,7 +529,7 @@
|
||||
/datum/reagent/consumable/tonic/on_mob_life(mob/living/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-2, 0)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
if (M.bodytemperature > 310)
|
||||
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
..()
|
||||
@@ -563,7 +563,7 @@
|
||||
/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.SetSleeping(0, 0)
|
||||
M.SetSleeping(0, FALSE)
|
||||
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
M.Jitter(5)
|
||||
@@ -585,7 +585,7 @@
|
||||
/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.SetSleeping(0, 0)
|
||||
M.SetSleeping(0, FALSE)
|
||||
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
|
||||
M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
|
||||
M.Jitter(5)
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
if(prob(1))
|
||||
var/smoke_message = pick("You feel relaxed.", "You feel calmed.","You feel alert.","You feel rugged.")
|
||||
to_chat(M, "<span class='notice'>[smoke_message]</span>")
|
||||
M.AdjustParalysis(-1, 0)
|
||||
M.AdjustStunned(-1, 0)
|
||||
M.AdjustWeakened(-1, 0)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
M.adjustStaminaLoss(-0.5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
@@ -67,12 +67,12 @@
|
||||
addiction_threshold = 10
|
||||
|
||||
/datum/reagent/drug/crank/on_mob_life(mob/living/M)
|
||||
var/high_message = pick("You feel jittery.", "You feel like you gotta go fast.", "You feel like you need to step it up.")
|
||||
if(prob(5))
|
||||
var/high_message = pick("You feel jittery.", "You feel like you gotta go fast.", "You feel like you need to step it up.")
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
M.AdjustParalysis(-1, 0)
|
||||
M.AdjustStunned(-1, 0)
|
||||
M.AdjustWeakened(-1, 0)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
@@ -169,9 +169,9 @@
|
||||
var/high_message = pick("You feel hyper.", "You feel like you need to go faster.", "You feel like you can run the world.")
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
M.AdjustParalysis(-2, 0)
|
||||
M.AdjustStunned(-2, 0)
|
||||
M.AdjustWeakened(-2, 0)
|
||||
M.AdjustStun(-40, 0)
|
||||
M.AdjustKnockdown(-40, 0)
|
||||
M.AdjustUnconscious(-40, 0)
|
||||
M.adjustStaminaLoss(-2, 0)
|
||||
M.status_flags |= GOTTAGOREALLYFAST
|
||||
M.Jitter(2)
|
||||
@@ -182,7 +182,7 @@
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i in 1 to 4)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
if(prob(20))
|
||||
@@ -211,7 +211,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 4, i++)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
M.Jitter(15)
|
||||
@@ -221,7 +221,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
M.Jitter(20)
|
||||
@@ -247,14 +247,14 @@
|
||||
var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.")
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
M.AdjustParalysis(-3, 0)
|
||||
M.AdjustStunned(-3, 0)
|
||||
M.AdjustWeakened(-3, 0)
|
||||
M.AdjustStun(-60, 0)
|
||||
M.AdjustKnockdown(-60, 0)
|
||||
M.AdjustUnconscious(-60, 0)
|
||||
M.adjustStaminaLoss(-5, 0)
|
||||
M.adjustBrainLoss(0.5)
|
||||
M.adjustToxLoss(0.1, 0)
|
||||
M.hallucination += 10
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
step(M, pick(GLOB.cardinal))
|
||||
step(M, pick(GLOB.cardinal))
|
||||
..()
|
||||
@@ -262,7 +262,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
|
||||
M.hallucination += 10
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i in 1 to 8)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
if(prob(20))
|
||||
@@ -275,7 +275,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
|
||||
M.hallucination += 10
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
M.Jitter(5)
|
||||
@@ -286,7 +286,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M)
|
||||
M.hallucination += 20
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
M.Jitter(10)
|
||||
@@ -298,7 +298,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M)
|
||||
M.hallucination += 30
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 12, i++)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
M.Jitter(15)
|
||||
@@ -310,7 +310,7 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
M.hallucination += 40
|
||||
if(M.canmove && !istype(M.loc, /atom/movable))
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 16, i++)
|
||||
step(M, pick(GLOB.cardinal))
|
||||
M.Jitter(50)
|
||||
|
||||
@@ -97,11 +97,11 @@
|
||||
|
||||
/datum/reagent/consumable/sugar/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='userdanger'>You go into hyperglycaemic shock! Lay off the twinkies!</span>")
|
||||
M.AdjustSleeping(30, 0)
|
||||
M.AdjustSleeping(600, FALSE)
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/sugar/overdose_process(mob/living/M)
|
||||
M.AdjustSleeping(3, 0)
|
||||
M.AdjustSleeping(40, FALSE)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
victim.blind_eyes(2)
|
||||
victim.confused = max(M.confused, 3)
|
||||
victim.damageoverlaytemp = 60
|
||||
victim.Weaken(3)
|
||||
victim.Knockdown(60)
|
||||
victim.drop_item()
|
||||
return
|
||||
else if ( eyes_covered ) // Eye cover is better than mouth cover
|
||||
@@ -269,7 +269,7 @@
|
||||
victim.blind_eyes(3)
|
||||
victim.confused = max(M.confused, 6)
|
||||
victim.damageoverlaytemp = 75
|
||||
victim.Weaken(5)
|
||||
victim.Knockdown(100)
|
||||
victim.drop_item()
|
||||
victim.update_damage_hud()
|
||||
|
||||
@@ -582,7 +582,7 @@
|
||||
|
||||
/datum/reagent/consumable/entpoly/on_mob_life(mob/living/M)
|
||||
if(current_cycle >= 10)
|
||||
M.Paralyse(2, 0)
|
||||
M.Unconscious(40, 0)
|
||||
. = 1
|
||||
if(prob(20))
|
||||
M.losebreath += 4
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
M.disabilities = 0
|
||||
M.set_blurriness(0)
|
||||
M.set_blindness(0)
|
||||
M.SetWeakened(0, 0)
|
||||
M.SetStunned(0, 0)
|
||||
M.SetParalysis(0, 0)
|
||||
M.SetKnockdown(0, 0)
|
||||
M.SetStun(0, 0)
|
||||
M.SetUnconscious(0, 0)
|
||||
M.silent = 0
|
||||
M.dizziness = 0
|
||||
M.drowsyness = 0
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/M)
|
||||
M.drowsyness = max(M.drowsyness-5, 0)
|
||||
M.AdjustParalysis(-1, 0)
|
||||
M.AdjustStunned(-1, 0)
|
||||
M.AdjustWeakened(-1, 0)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
if(holder.has_reagent("mindbreaker"))
|
||||
holder.remove_reagent("mindbreaker", 5)
|
||||
M.hallucination = max(0, M.hallucination - 10)
|
||||
@@ -546,9 +546,9 @@
|
||||
|
||||
/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/M)
|
||||
M.status_flags |= GOTTAGOFAST
|
||||
M.AdjustParalysis(-1, 0)
|
||||
M.AdjustStunned(-1, 0)
|
||||
M.AdjustWeakened(-1, 0)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
M.adjustStaminaLoss(-1*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
@@ -621,7 +621,7 @@
|
||||
if(12 to 24)
|
||||
M.drowsyness += 1
|
||||
if(24 to INFINITY)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
@@ -686,6 +686,9 @@
|
||||
taste_description = "dull toxin"
|
||||
|
||||
/datum/reagent/medicine/oculine/on_mob_life(mob/living/M)
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot("eyes_sight")
|
||||
if (!eyes)
|
||||
return
|
||||
if(M.disabilities & BLIND)
|
||||
if(prob(20))
|
||||
to_chat(M, "<span class='warning'>Your vision slowly returns...</span>")
|
||||
@@ -697,11 +700,10 @@
|
||||
to_chat(M, "<span class='warning'>The blackness in your peripheral vision fades.</span>")
|
||||
M.cure_nearsighted()
|
||||
M.blur_eyes(10)
|
||||
|
||||
else if(M.eye_blind || M.eye_blurry)
|
||||
M.set_blindness(0)
|
||||
M.set_blurriness(0)
|
||||
else if(M.eye_damage > 0)
|
||||
else if(eyes.eye_damage > 0)
|
||||
M.adjust_eye_damage(-1)
|
||||
..()
|
||||
|
||||
@@ -757,9 +759,9 @@
|
||||
M.adjustStaminaLoss(-0.5*REM, 0)
|
||||
. = 1
|
||||
if(prob(20))
|
||||
M.AdjustParalysis(-1, 0)
|
||||
M.AdjustStunned(-1, 0)
|
||||
M.AdjustWeakened(-1, 0)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M)
|
||||
@@ -864,9 +866,9 @@
|
||||
M.adjustToxLoss(-1*REM, 0)
|
||||
M.adjustBruteLoss(-1*REM, 0)
|
||||
M.adjustFireLoss(-1*REM, 0)
|
||||
M.AdjustParalysis(-3, 0)
|
||||
M.AdjustStunned(-3, 0)
|
||||
M.AdjustWeakened(-3, 0)
|
||||
M.AdjustStun(-60, 0)
|
||||
M.AdjustKnockdown(-60, 0)
|
||||
M.AdjustUnconscious(-60, 0)
|
||||
M.adjustStaminaLoss(-5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
@@ -888,8 +890,7 @@
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/medicine/insulin/on_mob_life(mob/living/M)
|
||||
if(M.sleeping)
|
||||
M.AdjustSleeping(-1, 0)
|
||||
if(M.AdjustSleeping(-20, FALSE))
|
||||
. = 1
|
||||
M.reagents.remove_reagent("sugar", 3)
|
||||
..()
|
||||
@@ -1102,9 +1103,9 @@
|
||||
overdose_threshold = 30
|
||||
|
||||
/datum/reagent/medicine/changelingAdrenaline/on_mob_life(mob/living/M as mob)
|
||||
M.AdjustParalysis(-1, 0)
|
||||
M.AdjustStunned(-1, 0)
|
||||
M.AdjustWeakened(-1, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.adjustStaminaLoss(-1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
@@ -247,9 +247,9 @@
|
||||
/datum/reagent/fuel/unholywater/on_mob_life(mob/living/M)
|
||||
if(iscultist(M))
|
||||
M.drowsyness = max(M.drowsyness-5, 0)
|
||||
M.AdjustParalysis(-1, 0)
|
||||
M.AdjustStunned(-2, 0)
|
||||
M.AdjustWeakened(-2, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
M.AdjustStun(-40, 0)
|
||||
M.AdjustKnockdown(-40, 0)
|
||||
M.adjustToxLoss(-2, 0)
|
||||
M.adjustOxyLoss(-2, 0)
|
||||
M.adjustBruteLoss(-2, 0)
|
||||
@@ -363,8 +363,8 @@
|
||||
if(method == INGEST)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='notice'>That tasted horrible.</span>")
|
||||
M.AdjustStunned(2)
|
||||
M.AdjustWeakened(2)
|
||||
M.AdjustStun(40)
|
||||
M.AdjustKnockdown(40)
|
||||
..()
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
return
|
||||
to_chat(H, "<span class='warning'><b>You crumple in agony as your flesh wildly morphs into new forms!</b></span>")
|
||||
H.visible_message("<b>[H]</b> falls to the ground and screams as [H.p_their()] skin bubbles and froths!") //'froths' sounds painful when used with SKIN.
|
||||
H.Weaken(3, 0)
|
||||
H.Knockdown(60, 0)
|
||||
addtimer(CALLBACK(src, .proc/mutate, H), 30)
|
||||
return
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/carbon/M)
|
||||
M.status_flags |= FAKEDEATH
|
||||
M.adjustOxyLoss(0.5*REM, 0)
|
||||
M.Weaken(5, 0)
|
||||
M.Knockdown(100, 0)
|
||||
M.silent = max(M.silent, 5)
|
||||
M.tod = worldtime2text()
|
||||
..()
|
||||
@@ -275,10 +275,10 @@
|
||||
M.confused += 2
|
||||
M.drowsyness += 2
|
||||
if(10 to 50)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
. = 1
|
||||
if(51 to INFINITY)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
M.adjustToxLoss((current_cycle - 50)*REM, 0)
|
||||
. = 1
|
||||
..()
|
||||
@@ -294,7 +294,7 @@
|
||||
M.confused += 1
|
||||
M.drowsyness += 1
|
||||
if(20 to INFINITY)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/beer2 //disguised as normal beer for use by emagged brobots
|
||||
@@ -311,9 +311,9 @@
|
||||
/datum/reagent/toxin/beer2/on_mob_life(mob/living/M)
|
||||
switch(current_cycle)
|
||||
if(1 to 50)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
if(51 to INFINITY)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
M.adjustToxLoss((current_cycle - 50)*REM, 0)
|
||||
return ..()
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
M.adjustToxLoss(1*REM, 0)
|
||||
. = 1
|
||||
if(current_cycle >= 18)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
@@ -474,7 +474,7 @@
|
||||
M.losebreath += 1
|
||||
if(prob(8))
|
||||
to_chat(M, "You feel horrendously weak!")
|
||||
M.Stun(2, 0)
|
||||
M.Stun(40, 0)
|
||||
M.adjustToxLoss(2*REM, 0)
|
||||
return ..()
|
||||
|
||||
@@ -534,8 +534,7 @@
|
||||
var/picked_option = rand(1,3)
|
||||
switch(picked_option)
|
||||
if(1)
|
||||
M.Stun(3, 0)
|
||||
M.Weaken(3, 0)
|
||||
M.Knockdown(60, 0)
|
||||
. = 1
|
||||
if(2)
|
||||
M.losebreath += 10
|
||||
@@ -566,7 +565,7 @@
|
||||
|
||||
/datum/reagent/toxin/pancuronium/on_mob_life(mob/living/M)
|
||||
if(current_cycle >= 10)
|
||||
M.Paralyse(2, 0)
|
||||
M.Stun(40, 0)
|
||||
. = 1
|
||||
if(prob(20))
|
||||
M.losebreath += 4
|
||||
@@ -583,7 +582,7 @@
|
||||
|
||||
/datum/reagent/toxin/sodium_thiopental/on_mob_life(mob/living/M)
|
||||
if(current_cycle >= 10)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
M.adjustStaminaLoss(10*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
@@ -599,7 +598,7 @@
|
||||
|
||||
/datum/reagent/toxin/sulfonal/on_mob_life(mob/living/M)
|
||||
if(current_cycle >= 22)
|
||||
M.Sleeping(2, 0)
|
||||
M.Sleeping(40, 0)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/amanitin
|
||||
@@ -686,7 +685,7 @@
|
||||
|
||||
/datum/reagent/toxin/curare/on_mob_life(mob/living/M)
|
||||
if(current_cycle >= 11)
|
||||
M.Weaken(3, 0)
|
||||
M.Knockdown(60, 0)
|
||||
M.adjustOxyLoss(1*REM, 0)
|
||||
. = 1
|
||||
..()
|
||||
@@ -814,7 +813,7 @@
|
||||
C.acid_act(acidpwr, reac_volume)
|
||||
|
||||
/datum/reagent/toxin/acid/reaction_obj(obj/O, reac_volume)
|
||||
if(istype(O.loc, /mob)) //handled in human acid_act()
|
||||
if(ismob(O.loc)) //handled in human acid_act()
|
||||
return
|
||||
reac_volume = round(reac_volume,0.1)
|
||||
O.acid_act(acidpwr, reac_volume)
|
||||
@@ -887,7 +886,7 @@
|
||||
holder.remove_reagent(id, actual_metaboliztion_rate * M.metabolism_efficiency)
|
||||
M.adjustToxLoss(actual_toxpwr*REM, 0)
|
||||
if(prob(10))
|
||||
M.Weaken(1, 0)
|
||||
M.Knockdown(20, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(round(created_volume/48,1),get_turf(holder.my_atom)))
|
||||
if(iscultist(C))
|
||||
to_chat(C, "<span class='userdanger'>The divine explosion sears you!</span>")
|
||||
C.Weaken(2)
|
||||
C.Knockdown(40)
|
||||
C.adjust_fire_stacks(5)
|
||||
C.IgniteMob()
|
||||
..()
|
||||
@@ -221,9 +221,9 @@
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
|
||||
if(C.flash_act())
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Weaken(5)
|
||||
C.Knockdown(60)
|
||||
else
|
||||
C.Stun(5)
|
||||
C.Stun(100)
|
||||
holder.remove_reagent("flash_powder", created_volume*3)
|
||||
|
||||
/datum/chemical_reaction/flash_powder_flash
|
||||
@@ -238,9 +238,9 @@
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
|
||||
if(C.flash_act())
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Weaken(5)
|
||||
C.Knockdown(60)
|
||||
else
|
||||
C.Stun(5)
|
||||
C.Stun(100)
|
||||
|
||||
/datum/chemical_reaction/smoke_powder
|
||||
name = "smoke_powder"
|
||||
@@ -296,7 +296,7 @@
|
||||
var/location = get_turf(holder.my_atom)
|
||||
playsound(location, 'sound/effects/bang.ogg', 25, 1)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
|
||||
C.soundbang_act(1, 5, rand(0, 5))
|
||||
C.soundbang_act(1, 100, rand(0, 5))
|
||||
|
||||
/datum/chemical_reaction/sonic_powder_deafen
|
||||
name = "sonic_powder_deafen"
|
||||
@@ -308,7 +308,7 @@
|
||||
var/location = get_turf(holder.my_atom)
|
||||
playsound(location, 'sound/effects/bang.ogg', 25, 1)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
|
||||
C.soundbang_act(1, 5, rand(0, 5))
|
||||
C.soundbang_act(1, 100, rand(0, 5))
|
||||
|
||||
/datum/chemical_reaction/phlogiston
|
||||
name = "phlogiston"
|
||||
|
||||
@@ -1,129 +1,129 @@
|
||||
/obj/item/weapon/reagent_containers
|
||||
name = "Container"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/amount_per_transfer_from_this = 5
|
||||
var/list/possible_transfer_amounts = list(5,10,15,20,25,30)
|
||||
var/volume = 30
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/spillable = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers
|
||||
name = "Container"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/amount_per_transfer_from_this = 5
|
||||
var/list/possible_transfer_amounts = list(5,10,15,20,25,30)
|
||||
var/volume = 30
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/spillable = 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/Initialize(mapload, vol)
|
||||
. = ..()
|
||||
if(isnum(vol) && vol > 0)
|
||||
volume = vol
|
||||
create_reagents(volume)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", disease_amount, data)
|
||||
|
||||
add_initial_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/add_initial_reagents()
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
/obj/item/weapon/reagent_containers/attack_self(mob/user)
|
||||
if(possible_transfer_amounts.len)
|
||||
var/i=0
|
||||
for(var/A in possible_transfer_amounts)
|
||||
i++
|
||||
if(A == amount_per_transfer_from_this)
|
||||
if(i<possible_transfer_amounts.len)
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[i+1]
|
||||
else
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[1]
|
||||
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/reagentlist(obj/item/weapon/reagent_containers/snack) //Attack logs for regents in pills
|
||||
var/data
|
||||
if(snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries
|
||||
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
|
||||
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return data
|
||||
else return "No reagents"
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/canconsume(mob/eater, mob/user)
|
||||
if(!iscarbon(eater))
|
||||
return 0
|
||||
var/mob/living/carbon/C = eater
|
||||
var/covered = ""
|
||||
if(C.is_mouth_covered(head_only = 1))
|
||||
covered = "headgear"
|
||||
else if(C.is_mouth_covered(mask_only = 1))
|
||||
covered = "mask"
|
||||
if(covered)
|
||||
var/who = (isnull(user) || eater == user) ? "your" : "[eater.p_their()]"
|
||||
to_chat(user, "<span class='warning'>You have to remove [who] [covered] first!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
if(!QDELETED(src))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/fire_act(exposed_temperature, exposed_volume)
|
||||
reagents.chem_temp += 30
|
||||
reagents.handle_reactions()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/throw_impact(atom/target)
|
||||
. = ..()
|
||||
SplashReagents(target, TRUE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE)
|
||||
if(!reagents || !reagents.total_volume || !spillable)
|
||||
return
|
||||
|
||||
if(ismob(target) && target.reagents)
|
||||
if(thrown)
|
||||
reagents.total_volume *= rand(5,10) * 0.1 //Not all of it makes contact with the target
|
||||
var/mob/M = target
|
||||
var/R
|
||||
target.visible_message("<span class='danger'>[M] has been splashed with something!</span>", \
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
|
||||
if(thrownby)
|
||||
add_logs(thrownby, M, "splashed", R)
|
||||
reagents.reaction(target, TOUCH)
|
||||
|
||||
else if((target.CanPass(src, get_turf(src))) && thrown && thrownby && thrownby.mind && thrownby.mind.assigned_role == "Bartender")
|
||||
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
|
||||
return
|
||||
|
||||
else
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
add_logs(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]", "at [target][COORD(target)]")
|
||||
log_game("[key_name(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] at [COORD(target)].")
|
||||
message_admins("[key_name_admin(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] at [ADMIN_COORDJMP(target)].")
|
||||
visible_message("<span class='notice'>[src] spills its contents all over [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/microwave_act(obj/machinery/microwave/M)
|
||||
if(is_open_container())
|
||||
reagents.chem_temp = max(reagents.chem_temp, 1000)
|
||||
reagents.handle_reactions()
|
||||
..()
|
||||
volume = vol
|
||||
create_reagents(volume)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", disease_amount, data)
|
||||
|
||||
add_initial_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/add_initial_reagents()
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
/obj/item/weapon/reagent_containers/attack_self(mob/user)
|
||||
if(possible_transfer_amounts.len)
|
||||
var/i=0
|
||||
for(var/A in possible_transfer_amounts)
|
||||
i++
|
||||
if(A == amount_per_transfer_from_this)
|
||||
if(i<possible_transfer_amounts.len)
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[i+1]
|
||||
else
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[1]
|
||||
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/reagentlist(obj/item/weapon/reagent_containers/snack) //Attack logs for regents in pills
|
||||
var/data
|
||||
if(snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries
|
||||
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
|
||||
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return data
|
||||
else return "No reagents"
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/canconsume(mob/eater, mob/user)
|
||||
if(!iscarbon(eater))
|
||||
return 0
|
||||
var/mob/living/carbon/C = eater
|
||||
var/covered = ""
|
||||
if(C.is_mouth_covered(head_only = 1))
|
||||
covered = "headgear"
|
||||
else if(C.is_mouth_covered(mask_only = 1))
|
||||
covered = "mask"
|
||||
if(covered)
|
||||
var/who = (isnull(user) || eater == user) ? "your" : "[eater.p_their()]"
|
||||
to_chat(user, "<span class='warning'>You have to remove [who] [covered] first!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
if(!QDELETED(src))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/fire_act(exposed_temperature, exposed_volume)
|
||||
reagents.chem_temp += 30
|
||||
reagents.handle_reactions()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/throw_impact(atom/target)
|
||||
. = ..()
|
||||
SplashReagents(target, TRUE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE)
|
||||
if(!reagents || !reagents.total_volume || !spillable)
|
||||
return
|
||||
|
||||
if(ismob(target) && target.reagents)
|
||||
if(thrown)
|
||||
reagents.total_volume *= rand(5,10) * 0.1 //Not all of it makes contact with the target
|
||||
var/mob/M = target
|
||||
var/R
|
||||
target.visible_message("<span class='danger'>[M] has been splashed with something!</span>", \
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
|
||||
if(thrownby)
|
||||
add_logs(thrownby, M, "splashed", R)
|
||||
reagents.reaction(target, TOUCH)
|
||||
|
||||
else if((target.CanPass(src, get_turf(src))) && thrown && thrownby && thrownby.mind && thrownby.mind.assigned_role == "Bartender")
|
||||
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
|
||||
return
|
||||
|
||||
else
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
add_logs(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]", "at [target][COORD(target)]")
|
||||
log_game("[key_name(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] at [COORD(target)].")
|
||||
message_admins("[key_name_admin(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] at [ADMIN_COORDJMP(target)].")
|
||||
visible_message("<span class='notice'>[src] spills its contents all over [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/microwave_act(obj/machinery/microwave/M)
|
||||
if(is_open_container())
|
||||
reagents.chem_temp = max(reagents.chem_temp, 1000)
|
||||
reagents.handle_reactions()
|
||||
..()
|
||||
|
||||
@@ -1,235 +1,235 @@
|
||||
/*
|
||||
Contains:
|
||||
Borg Hypospray
|
||||
Borg Shaker
|
||||
Nothing to do with hydroponics in here. Sorry to dissapoint you.
|
||||
*/
|
||||
|
||||
/*
|
||||
Borg Hypospray
|
||||
*/
|
||||
/obj/item/weapon/reagent_containers/borghypo
|
||||
name = "cyborg hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
var/mode = 1
|
||||
var/charge_cost = 50
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
|
||||
var/bypass_protection = 0 //If the hypospray can go through armor or thick material
|
||||
|
||||
var/list/datum/reagents/reagent_list = list()
|
||||
var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "antitoxin", "epinephrine", "spaceacillin", "salglu_solution")
|
||||
var/accepts_reagent_upgrades = TRUE //If upgrades can increase number of reagents dispensed.
|
||||
var/list/modes = list() //Basically the inverse of reagent_ids. Instead of having numbers as "keys" and strings as values it has strings as keys and numbers as values.
|
||||
//Used as list for input() in shakers.
|
||||
|
||||
|
||||
/*
|
||||
Contains:
|
||||
Borg Hypospray
|
||||
Borg Shaker
|
||||
Nothing to do with hydroponics in here. Sorry to dissapoint you.
|
||||
*/
|
||||
|
||||
/*
|
||||
Borg Hypospray
|
||||
*/
|
||||
/obj/item/weapon/reagent_containers/borghypo
|
||||
name = "cyborg hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
var/mode = 1
|
||||
var/charge_cost = 50
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
|
||||
var/bypass_protection = 0 //If the hypospray can go through armor or thick material
|
||||
|
||||
var/list/datum/reagents/reagent_list = list()
|
||||
var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "antitoxin", "epinephrine", "spaceacillin", "salglu_solution")
|
||||
var/accepts_reagent_upgrades = TRUE //If upgrades can increase number of reagents dispensed.
|
||||
var/list/modes = list() //Basically the inverse of reagent_ids. Instead of having numbers as "keys" and strings as values it has strings as keys and numbers as values.
|
||||
//Used as list for input() in shakers.
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/Initialize()
|
||||
. = ..()
|
||||
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick >= recharge_time)
|
||||
regenerate_reagents()
|
||||
charge_tick = 0
|
||||
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Purely for testing purposes I swear~ //don't lie to me
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/borghypo/verb/add_cyanide()
|
||||
set src in world
|
||||
add_reagent("cyanide")
|
||||
*/
|
||||
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/add_reagent(reagent)
|
||||
reagent_ids |= reagent
|
||||
var/datum/reagents/RG = new(30)
|
||||
RG.my_atom = src
|
||||
reagent_list += RG
|
||||
|
||||
var/datum/reagents/R = reagent_list[reagent_list.len]
|
||||
R.add_reagent(reagent, 30)
|
||||
|
||||
modes[reagent] = modes.len + 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/regenerate_reagents()
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in 1 to reagent_ids.len)
|
||||
var/datum/reagents/RG = reagent_list[i]
|
||||
if(RG.total_volume < RG.maximum_volume) //Don't recharge reagents and drain power if the storage is full.
|
||||
R.cell.use(charge_cost) //Take power from borg...
|
||||
RG.add_reagent(reagent_ids[i], 5) //And fill hypo with reagent.
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/carbon/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='notice'>The injector is empty.</span>")
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, 1, user.zone_selected,bypass_protection))
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
var/fraction = min(amount_per_transfer_from_this/R.total_volume, 1)
|
||||
R.reaction(M, INJECT, fraction)
|
||||
if(M.reagents)
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [R.total_volume] unit\s remaining.</span>")
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/RG in R.reagent_list)
|
||||
injected += RG.name
|
||||
add_logs(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user)
|
||||
var/chosen_reagent = modes[input(user, "What reagent do you want to dispense?") as null|anything in reagent_ids]
|
||||
if(!chosen_reagent)
|
||||
return
|
||||
mode = chosen_reagent
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
to_chat(user, "<span class='notice'>[src] is now dispensing '[R.name]'.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/examine(mob/user)
|
||||
usr = user
|
||||
..()
|
||||
DescribeContents() //Because using the standardized reagents datum was just too cool for whatever fuckwit wrote this
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
to_chat(usr, "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>")
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
to_chat(usr, "<span class='warning'>It is currently empty! Allow some time for the internal syntheszier to produce more.</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/hacked
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list ("facid", "mutetoxin", "cyanide", "sodium_thiopental", "heparin", "lexorin")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/syndicate
|
||||
name = "syndicate cyborg hypospray"
|
||||
desc = "An experimental piece of Syndicate technology used to produce powerful restorative nanites used to very quickly restore injuries of all types. Also metabolizes potassium iodide, for radiation poisoning, and morphine, for offense."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "morphine")
|
||||
bypass_protection = 1
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/*
|
||||
Borg Shaker
|
||||
*/
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker
|
||||
name = "cyborg shaker"
|
||||
desc = "An advanced drink synthesizer and mixer."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "shaker"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
reagent_ids = list("beer", "orangejuice", "limejuice", "tomatojuice", "cola", "tonic", "sodawater", "ice", "cream", "whiskey", "vodka", "rum", "gin", "tequila", "vermouth", "wine", "kahlua", "cognac", "ale")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/attack(mob/M, mob/user)
|
||||
return //Can't inject stuff with a shaker, can we? //not with that attitude
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/regenerate_reagents()
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in modes) //Lots of reagents in this one, so it's best to regenrate them all at once to keep it from being tedious.
|
||||
var/valueofi = modes[i]
|
||||
var/datum/reagents/RG = reagent_list[valueofi]
|
||||
if(RG.total_volume < RG.maximum_volume)
|
||||
R.cell.use(charge_cost)
|
||||
RG.add_reagent(reagent_ids[valueofi], 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
else if(target.is_open_container() && target.reagents)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is currently out of this ingredient! Please allow some time for the synthesizer to produce more.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = R.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
var/datum/reagents/RS = reagent_list[mode]
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
to_chat(usr, "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>")
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
to_chat(usr, "<span class='warning'>It is currently empty! Please allow some time for the synthesizer to produce more.</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/hacked
|
||||
..()
|
||||
name = "cyborg shaker"
|
||||
desc = "Will mix drinks that knock them dead."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "threemileislandglass"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
reagent_ids = list("beer2")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/peace
|
||||
name = "Peace Hypospray"
|
||||
|
||||
reagent_ids = list("dizzysolution","tiresolution")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/peace/hacked
|
||||
desc = "Everything's peaceful in death!"
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list("dizzysolution","tiresolution","tirizene","sulfonal","sodium_thiopental","cyanide","neurotoxin2")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/epi
|
||||
name = "epinephrine injector"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed to stabilize patients.."
|
||||
reagent_ids = list("epinephrine")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick >= recharge_time)
|
||||
regenerate_reagents()
|
||||
charge_tick = 0
|
||||
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Purely for testing purposes I swear~ //don't lie to me
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/borghypo/verb/add_cyanide()
|
||||
set src in world
|
||||
add_reagent("cyanide")
|
||||
*/
|
||||
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/add_reagent(reagent)
|
||||
reagent_ids |= reagent
|
||||
var/datum/reagents/RG = new(30)
|
||||
RG.my_atom = src
|
||||
reagent_list += RG
|
||||
|
||||
var/datum/reagents/R = reagent_list[reagent_list.len]
|
||||
R.add_reagent(reagent, 30)
|
||||
|
||||
modes[reagent] = modes.len + 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/regenerate_reagents()
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in 1 to reagent_ids.len)
|
||||
var/datum/reagents/RG = reagent_list[i]
|
||||
if(RG.total_volume < RG.maximum_volume) //Don't recharge reagents and drain power if the storage is full.
|
||||
R.cell.use(charge_cost) //Take power from borg...
|
||||
RG.add_reagent(reagent_ids[i], 5) //And fill hypo with reagent.
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/carbon/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='notice'>The injector is empty.</span>")
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, 1, user.zone_selected,bypass_protection))
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
var/fraction = min(amount_per_transfer_from_this/R.total_volume, 1)
|
||||
R.reaction(M, INJECT, fraction)
|
||||
if(M.reagents)
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [R.total_volume] unit\s remaining.</span>")
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/RG in R.reagent_list)
|
||||
injected += RG.name
|
||||
add_logs(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user)
|
||||
var/chosen_reagent = modes[input(user, "What reagent do you want to dispense?") as null|anything in reagent_ids]
|
||||
if(!chosen_reagent)
|
||||
return
|
||||
mode = chosen_reagent
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
to_chat(user, "<span class='notice'>[src] is now dispensing '[R.name]'.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/examine(mob/user)
|
||||
usr = user
|
||||
..()
|
||||
DescribeContents() //Because using the standardized reagents datum was just too cool for whatever fuckwit wrote this
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
to_chat(usr, "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>")
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
to_chat(usr, "<span class='warning'>It is currently empty! Allow some time for the internal syntheszier to produce more.</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/hacked
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list ("facid", "mutetoxin", "cyanide", "sodium_thiopental", "heparin", "lexorin")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/syndicate
|
||||
name = "syndicate cyborg hypospray"
|
||||
desc = "An experimental piece of Syndicate technology used to produce powerful restorative nanites used to very quickly restore injuries of all types. Also metabolizes potassium iodide, for radiation poisoning, and morphine, for offense."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "morphine")
|
||||
bypass_protection = 1
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/*
|
||||
Borg Shaker
|
||||
*/
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker
|
||||
name = "cyborg shaker"
|
||||
desc = "An advanced drink synthesizer and mixer."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "shaker"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
reagent_ids = list("beer", "orangejuice", "limejuice", "tomatojuice", "cola", "tonic", "sodawater", "ice", "cream", "whiskey", "vodka", "rum", "gin", "tequila", "vermouth", "wine", "kahlua", "cognac", "ale")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/attack(mob/M, mob/user)
|
||||
return //Can't inject stuff with a shaker, can we? //not with that attitude
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/regenerate_reagents()
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in modes) //Lots of reagents in this one, so it's best to regenrate them all at once to keep it from being tedious.
|
||||
var/valueofi = modes[i]
|
||||
var/datum/reagents/RG = reagent_list[valueofi]
|
||||
if(RG.total_volume < RG.maximum_volume)
|
||||
R.cell.use(charge_cost)
|
||||
RG.add_reagent(reagent_ids[valueofi], 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
else if(target.is_open_container() && target.reagents)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is currently out of this ingredient! Please allow some time for the synthesizer to produce more.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = R.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
var/datum/reagents/RS = reagent_list[mode]
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
to_chat(usr, "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>")
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
to_chat(usr, "<span class='warning'>It is currently empty! Please allow some time for the synthesizer to produce more.</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/hacked
|
||||
..()
|
||||
name = "cyborg shaker"
|
||||
desc = "Will mix drinks that knock them dead."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "threemileislandglass"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
reagent_ids = list("beer2")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/peace
|
||||
name = "Peace Hypospray"
|
||||
|
||||
reagent_ids = list("dizzysolution","tiresolution")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/peace/hacked
|
||||
desc = "Everything's peaceful in death!"
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list("dizzysolution","tiresolution","tirizene","sulfonal","sodium_thiopental","cyanide","neurotoxin2")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/epi
|
||||
name = "epinephrine injector"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed to stabilize patients.."
|
||||
reagent_ids = list("epinephrine")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
/obj/item/weapon/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Holds up to 5 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dropper0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
container_type = TRANSPARENT
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
|
||||
if(!proximity) return
|
||||
if(!target.reagents) return
|
||||
|
||||
if(reagents.total_volume > 0)
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Holds up to 5 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dropper0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
container_type = TRANSPARENT
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
|
||||
if(!proximity) return
|
||||
if(!target.reagents) return
|
||||
|
||||
if(reagents.total_volume > 0)
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
if(!target.is_injectable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = 0
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
|
||||
if(ismob(target))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/victim = target
|
||||
|
||||
var/obj/item/safe_thing = null
|
||||
if(victim.wear_mask)
|
||||
if(victim.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.wear_mask
|
||||
if(victim.head)
|
||||
if(victim.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.head
|
||||
if(victim.glasses)
|
||||
if(!safe_thing)
|
||||
safe_thing = victim.glasses
|
||||
|
||||
if(safe_thing)
|
||||
if(!safe_thing.reagents)
|
||||
safe_thing.create_reagents(100)
|
||||
|
||||
reagents.reaction(safe_thing, TOUCH, fraction)
|
||||
trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this)
|
||||
|
||||
target.visible_message("<span class='danger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>", \
|
||||
"<span class='userdanger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>")
|
||||
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution.</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(isalien(target)) //hiss-hiss has no eyes!
|
||||
to_chat(target, "<span class='danger'>[target] does not seem to have any eyes!</span>")
|
||||
return
|
||||
|
||||
target.visible_message("<span class='danger'>[user] squirts something into [target]'s eyes!</span>", \
|
||||
"<span class='userdanger'>[user] squirts something into [target]'s eyes!</span>")
|
||||
|
||||
reagents.reaction(target, TOUCH, fraction)
|
||||
var/mob/M = target
|
||||
var/R
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in src.reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
add_logs(user, M, "squirted", R)
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution.</span>")
|
||||
update_icon()
|
||||
|
||||
else
|
||||
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = 0
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
|
||||
if(ismob(target))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/victim = target
|
||||
|
||||
var/obj/item/safe_thing = null
|
||||
if(victim.wear_mask)
|
||||
if(victim.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.wear_mask
|
||||
if(victim.head)
|
||||
if(victim.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.head
|
||||
if(victim.glasses)
|
||||
if(!safe_thing)
|
||||
safe_thing = victim.glasses
|
||||
|
||||
if(safe_thing)
|
||||
if(!safe_thing.reagents)
|
||||
safe_thing.create_reagents(100)
|
||||
|
||||
reagents.reaction(safe_thing, TOUCH, fraction)
|
||||
trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this)
|
||||
|
||||
target.visible_message("<span class='danger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>", \
|
||||
"<span class='userdanger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>")
|
||||
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution.</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(isalien(target)) //hiss-hiss has no eyes!
|
||||
to_chat(target, "<span class='danger'>[target] does not seem to have any eyes!</span>")
|
||||
return
|
||||
|
||||
target.visible_message("<span class='danger'>[user] squirts something into [target]'s eyes!</span>", \
|
||||
"<span class='userdanger'>[user] squirts something into [target]'s eyes!</span>")
|
||||
|
||||
reagents.reaction(target, TOUCH, fraction)
|
||||
var/mob/M = target
|
||||
var/R
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in src.reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
add_logs(user, M, "squirted", R)
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution.</span>")
|
||||
update_icon()
|
||||
|
||||
else
|
||||
|
||||
if(!target.is_drawable(FALSE)) //No drawing from mobs here
|
||||
to_chat(user, "<span class='notice'>You cannot directly remove reagents from [target].</span>")
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the solution.</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You cannot directly remove reagents from [target].</span>")
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the solution.</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "dropper")
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
@@ -1,290 +1,290 @@
|
||||
/obj/item/weapon/reagent_containers/glass
|
||||
name = "glass"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
|
||||
volume = 50
|
||||
container_type = OPENCONTAINER
|
||||
spillable = 1
|
||||
resistance_flags = ACID_PROOF
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
|
||||
if(!canconsume(M, user))
|
||||
return
|
||||
|
||||
if(!spillable)
|
||||
return
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(istype(M))
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
var/R
|
||||
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
|
||||
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
add_logs(thrownby, target, "splashed [english_list(reagents.reagent_list)]", "at [target][COORD(target)]")
|
||||
log_game("[key_name(thrownby)] splashed [english_list(reagents.reagent_list)] at [COORD(target)].")
|
||||
message_admins("[key_name_admin(thrownby)] splashed [english_list(reagents.reagent_list)] at [ADMIN_COORDJMP(target)].")
|
||||
reagents.reaction(M, TOUCH)
|
||||
add_logs(user, M, "splashed", R)
|
||||
reagents.clear_reagents()
|
||||
else
|
||||
if(M != user)
|
||||
M.visible_message("<span class='danger'>[user] attempts to feed something to [M].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to feed something to you.</span>")
|
||||
if(!do_mob(user, M))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return // The drink might be empty after the delay, such as by spam-feeding
|
||||
M.visible_message("<span class='danger'>[user] feeds something to [M].</span>", "<span class='userdanger'>[user] feeds something to you.</span>")
|
||||
add_logs(user, M, "fed", reagentlist(src))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
|
||||
var/fraction = min(5/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
spawn(5)
|
||||
reagents.trans_to(M, 5)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
if((!proximity) || !check_allowed_items(target,target_self=1)) return
|
||||
|
||||
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if(target.reagents && !target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty and can't be refilled!</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
|
||||
|
||||
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
|
||||
|
||||
else if(reagents.total_volume)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
|
||||
var/hotness = I.is_hot()
|
||||
if(hotness)
|
||||
var/added_heat = (hotness / 100) //ishot returns a temperature
|
||||
if(reagents)
|
||||
if(reagents.chem_temp < hotness) //can't be heated to be hotter than the source
|
||||
reagents.chem_temp += added_heat
|
||||
to_chat(user, "<span class='notice'>You heat [src] with [I].</span>")
|
||||
reagents.handle_reactions()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already hotter than [I]!</span>")
|
||||
|
||||
if(istype(I,/obj/item/weapon/reagent_containers/food/snacks/egg)) //breaking eggs
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/E = I
|
||||
if(reagents)
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You break [E] in [src].</span>")
|
||||
reagents.add_reagent("eggyolk", 5)
|
||||
qdel(E)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
desc = "A beaker. It can hold up to 50 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "beaker"
|
||||
item_state = "beaker"
|
||||
materials = list(MAT_GLASS=500)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass
|
||||
name = "glass"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
|
||||
volume = 50
|
||||
container_type = OPENCONTAINER
|
||||
spillable = 1
|
||||
resistance_flags = ACID_PROOF
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
|
||||
if(!canconsume(M, user))
|
||||
return
|
||||
|
||||
if(!spillable)
|
||||
return
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(istype(M))
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
var/R
|
||||
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
|
||||
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
add_logs(thrownby, target, "splashed [english_list(reagents.reagent_list)]", "at [target][COORD(target)]")
|
||||
log_game("[key_name(thrownby)] splashed [english_list(reagents.reagent_list)] at [COORD(target)].")
|
||||
message_admins("[key_name_admin(thrownby)] splashed [english_list(reagents.reagent_list)] at [ADMIN_COORDJMP(target)].")
|
||||
reagents.reaction(M, TOUCH)
|
||||
add_logs(user, M, "splashed", R)
|
||||
reagents.clear_reagents()
|
||||
else
|
||||
if(M != user)
|
||||
M.visible_message("<span class='danger'>[user] attempts to feed something to [M].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to feed something to you.</span>")
|
||||
if(!do_mob(user, M))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return // The drink might be empty after the delay, such as by spam-feeding
|
||||
M.visible_message("<span class='danger'>[user] feeds something to [M].</span>", "<span class='userdanger'>[user] feeds something to you.</span>")
|
||||
add_logs(user, M, "fed", reagentlist(src))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
|
||||
var/fraction = min(5/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
spawn(5)
|
||||
reagents.trans_to(M, 5)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
if((!proximity) || !check_allowed_items(target,target_self=1)) return
|
||||
|
||||
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if(target.reagents && !target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty and can't be refilled!</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
|
||||
|
||||
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
|
||||
|
||||
else if(reagents.total_volume)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
|
||||
var/hotness = I.is_hot()
|
||||
if(hotness)
|
||||
var/added_heat = (hotness / 100) //ishot returns a temperature
|
||||
if(reagents)
|
||||
if(reagents.chem_temp < hotness) //can't be heated to be hotter than the source
|
||||
reagents.chem_temp += added_heat
|
||||
to_chat(user, "<span class='notice'>You heat [src] with [I].</span>")
|
||||
reagents.handle_reactions()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already hotter than [I]!</span>")
|
||||
|
||||
if(istype(I,/obj/item/weapon/reagent_containers/food/snacks/egg)) //breaking eggs
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/E = I
|
||||
if(reagents)
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You break [E] in [src].</span>")
|
||||
reagents.add_reagent("eggyolk", 5)
|
||||
qdel(E)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
desc = "A beaker. It can hold up to 50 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "beaker"
|
||||
item_state = "beaker"
|
||||
materials = list(MAT_GLASS=500)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 24)
|
||||
filling.icon_state = "[icon_state]10"
|
||||
if(25 to 49)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
if(50 to 74)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
if(75 to 79)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
if(80 to 90)
|
||||
filling.icon_state = "[icon_state]80"
|
||||
if(91 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 24)
|
||||
filling.icon_state = "[icon_state]10"
|
||||
if(25 to 49)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
if(50 to 74)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
if(75 to 79)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
if(80 to 90)
|
||||
filling.icon_state = "[icon_state]80"
|
||||
if(91 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/jar
|
||||
name = "honey jar"
|
||||
desc = "A jar for honey. It can hold up to 50 units of sweet delight."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "vapour"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
desc = "A large beaker. Can hold up to 100 units."
|
||||
icon_state = "beakerlarge"
|
||||
materials = list(MAT_GLASS=2500)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact
|
||||
name = "cryostasis beaker"
|
||||
desc = "A cryostasis beaker that allows for chemical storage without \
|
||||
reactions. Can hold up to 50 units."
|
||||
icon_state = "beakernoreact"
|
||||
materials = list(MAT_METAL=3000)
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
origin_tech = "materials=2;engineering=3;plasmatech=3"
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
desc = "A large beaker. Can hold up to 100 units."
|
||||
icon_state = "beakerlarge"
|
||||
materials = list(MAT_GLASS=2500)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact
|
||||
name = "cryostasis beaker"
|
||||
desc = "A cryostasis beaker that allows for chemical storage without \
|
||||
reactions. Can hold up to 50 units."
|
||||
icon_state = "beakernoreact"
|
||||
materials = list(MAT_METAL=3000)
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
origin_tech = "materials=2;engineering=3;plasmatech=3"
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/noreact/Initialize()
|
||||
. = ..()
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology \
|
||||
and Element Cuban combined with the Compound Pete. Can hold up to \
|
||||
300 units."
|
||||
icon_state = "beakerbluespace"
|
||||
materials = list(MAT_GLASS=3000)
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
|
||||
flags = OPENCONTAINER
|
||||
origin_tech = "bluespace=5;materials=4;plasmatech=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone
|
||||
list_reagents = list("cryoxadone" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/sulphuric
|
||||
list_reagents = list("sacid" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/slime
|
||||
list_reagents = list("slimejelly" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/styptic
|
||||
name = "styptic reserve tank"
|
||||
list_reagents = list("styptic_powder" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/silver_sulfadiazine
|
||||
name = "silver sulfadiazine reserve tank"
|
||||
list_reagents = list("silver_sulfadiazine" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/charcoal
|
||||
name = "antitoxin reserve tank"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/epinephrine
|
||||
name = "epinephrine reserve tank"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/synthflesh
|
||||
list_reagents = list("synthflesh" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket
|
||||
name = "bucket"
|
||||
desc = "It's a bucket."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "bucket"
|
||||
item_state = "bucket"
|
||||
materials = list(MAT_METAL=200)
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
amount_per_transfer_from_this = 20
|
||||
possible_transfer_amounts = list(10,15,20,25,30,50,70)
|
||||
volume = 70
|
||||
flags = OPENCONTAINER
|
||||
flags_inv = HIDEHAIR
|
||||
slot_flags = SLOT_HEAD
|
||||
resistance_flags = 0
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 75, acid = 50) //Weak melee protection, because you can wear it on your head
|
||||
slot_equipment_priority = list( \
|
||||
slot_back, slot_wear_id,\
|
||||
slot_w_uniform, slot_wear_suit,\
|
||||
slot_wear_mask, slot_head, slot_neck,\
|
||||
slot_shoes, slot_gloves,\
|
||||
slot_ears, slot_glasses,\
|
||||
slot_belt, slot_s_store,\
|
||||
slot_l_store, slot_r_store,\
|
||||
slot_generic_dextrous_storage
|
||||
)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='warning'>[src] is out of water!</span>")
|
||||
else
|
||||
reagents.trans_to(O, 5)
|
||||
to_chat(user, "<span class='notice'>You wet [O] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else if(isprox(O))
|
||||
to_chat(user, "<span class='notice'>You add [O] to [src].</span>")
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/equipped(mob/user, slot)
|
||||
..()
|
||||
if(slot == slot_head && reagents.total_volume)
|
||||
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
|
||||
reagents.reaction(user, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M)
|
||||
if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head
|
||||
var/index = slot_equipment_priority.Find(slot_head)
|
||||
slot_equipment_priority.Remove(slot_head)
|
||||
. = ..()
|
||||
slot_equipment_priority.Insert(index, slot_head)
|
||||
return
|
||||
return ..()
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology \
|
||||
and Element Cuban combined with the Compound Pete. Can hold up to \
|
||||
300 units."
|
||||
icon_state = "beakerbluespace"
|
||||
materials = list(MAT_GLASS=3000)
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
|
||||
flags = OPENCONTAINER
|
||||
origin_tech = "bluespace=5;materials=4;plasmatech=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone
|
||||
list_reagents = list("cryoxadone" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/sulphuric
|
||||
list_reagents = list("sacid" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/slime
|
||||
list_reagents = list("slimejelly" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/styptic
|
||||
name = "styptic reserve tank"
|
||||
list_reagents = list("styptic_powder" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/silver_sulfadiazine
|
||||
name = "silver sulfadiazine reserve tank"
|
||||
list_reagents = list("silver_sulfadiazine" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/charcoal
|
||||
name = "antitoxin reserve tank"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/epinephrine
|
||||
name = "epinephrine reserve tank"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/synthflesh
|
||||
list_reagents = list("synthflesh" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket
|
||||
name = "bucket"
|
||||
desc = "It's a bucket."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "bucket"
|
||||
item_state = "bucket"
|
||||
materials = list(MAT_METAL=200)
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
amount_per_transfer_from_this = 20
|
||||
possible_transfer_amounts = list(10,15,20,25,30,50,70)
|
||||
volume = 70
|
||||
flags = OPENCONTAINER
|
||||
flags_inv = HIDEHAIR
|
||||
slot_flags = SLOT_HEAD
|
||||
resistance_flags = 0
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 75, acid = 50) //Weak melee protection, because you can wear it on your head
|
||||
slot_equipment_priority = list( \
|
||||
slot_back, slot_wear_id,\
|
||||
slot_w_uniform, slot_wear_suit,\
|
||||
slot_wear_mask, slot_head, slot_neck,\
|
||||
slot_shoes, slot_gloves,\
|
||||
slot_ears, slot_glasses,\
|
||||
slot_belt, slot_s_store,\
|
||||
slot_l_store, slot_r_store,\
|
||||
slot_generic_dextrous_storage
|
||||
)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='warning'>[src] is out of water!</span>")
|
||||
else
|
||||
reagents.trans_to(O, 5)
|
||||
to_chat(user, "<span class='notice'>You wet [O] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else if(isprox(O))
|
||||
to_chat(user, "<span class='notice'>You add [O] to [src].</span>")
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/equipped(mob/user, slot)
|
||||
..()
|
||||
if(slot == slot_head && reagents.total_volume)
|
||||
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
|
||||
reagents.reaction(user, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M)
|
||||
if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head
|
||||
var/index = slot_equipment_priority.Find(slot_head)
|
||||
slot_equipment_priority.Remove(slot_head)
|
||||
. = ..()
|
||||
slot_equipment_priority.Insert(index, slot_head)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/waterbottle
|
||||
name = "bottle of water"
|
||||
|
||||
@@ -148,4 +148,4 @@
|
||||
desc = "I wouldn't eat this if I were you."
|
||||
icon_state = "pill9"
|
||||
color = "#454545"
|
||||
list_reagents = list("shadowmutationtoxin" = 1)
|
||||
list_reagents = list("shadowmutationtoxin" = 1)
|
||||
@@ -1,254 +1,254 @@
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe
|
||||
name = "syringe"
|
||||
desc = "A syringe that can hold up to 15 units."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/busy = 0 // needed for delayed drawing of blood
|
||||
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
container_type = TRANSPARENT
|
||||
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe
|
||||
name = "syringe"
|
||||
desc = "A syringe that can hold up to 15 units."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/busy = 0 // needed for delayed drawing of blood
|
||||
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
container_type = TRANSPARENT
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/Initialize()
|
||||
. = ..()
|
||||
if(list_reagents) //syringe starts in inject mode if its already got something inside
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/pickup(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(busy)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, 1))
|
||||
return
|
||||
|
||||
// chance of monkey retaliation
|
||||
if(istype(target, /mob/living/carbon/monkey) && prob(MONKEY_SYRINGE_RETALIATION_PROB))
|
||||
var/mob/living/carbon/monkey/M
|
||||
M = target
|
||||
M.retaliate(user)
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>The syringe is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
var/drawn_amount = reagents.maximum_volume - reagents.total_volume
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to take a blood sample from [target]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to take a blood sample from [target]!</span>")
|
||||
busy = 1
|
||||
if(!do_mob(user, target, extra_checks=CALLBACK(L, /mob/living/proc/can_inject,user,1)))
|
||||
busy = 0
|
||||
return
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
return
|
||||
busy = 0
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("[user] takes a blood sample from [L].")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to draw any blood from [L]!</span>")
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(list_reagents) //syringe starts in inject mode if its already got something inside
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/pickup(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(busy)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, 1))
|
||||
return
|
||||
|
||||
// chance of monkey retaliation
|
||||
if(ismonkey(target) && prob(MONKEY_SYRINGE_RETALIATION_PROB))
|
||||
var/mob/living/carbon/monkey/M
|
||||
M = target
|
||||
M.retaliate(user)
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>The syringe is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
var/drawn_amount = reagents.maximum_volume - reagents.total_volume
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to take a blood sample from [target]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to take a blood sample from [target]!</span>")
|
||||
busy = 1
|
||||
if(!do_mob(user, target, extra_checks=CALLBACK(L, /mob/living/proc/can_inject,user,1)))
|
||||
busy = 0
|
||||
return
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
return
|
||||
busy = 0
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("[user] takes a blood sample from [L].")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to draw any blood from [L]!</span>")
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_drawable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution.</span>")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution.</span>")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!target.is_injectable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject [L]!</span>")
|
||||
if(!do_mob(user, L, extra_checks=CALLBACK(L, /mob/living/proc/can_inject,user,1)))
|
||||
return
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(L.reagents.total_volume >= L.reagents.maximum_volume)
|
||||
return
|
||||
L.visible_message("<span class='danger'>[user] injects [L] with the syringe!", \
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!")
|
||||
|
||||
var/list/rinject = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
rinject += R.name
|
||||
var/contained = english_list(rinject)
|
||||
|
||||
if(L != user)
|
||||
add_logs(user, L, "injected", src, addition="which had [contained]")
|
||||
else
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [L.name] ([L.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
L.log_message("<font color='orange'>Injected themselves ([contained]) with [src.name].</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(L, INJECT, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/update_icon()
|
||||
var/rounded_vol = Clamp(round((reagents.total_volume / volume * 15),5), 0, 15)
|
||||
cut_overlays()
|
||||
if(ismob(loc))
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject [L]!</span>")
|
||||
if(!do_mob(user, L, extra_checks=CALLBACK(L, /mob/living/proc/can_inject,user,1)))
|
||||
return
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(L.reagents.total_volume >= L.reagents.maximum_volume)
|
||||
return
|
||||
L.visible_message("<span class='danger'>[user] injects [L] with the syringe!", \
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!")
|
||||
|
||||
var/list/rinject = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
rinject += R.name
|
||||
var/contained = english_list(rinject)
|
||||
|
||||
if(L != user)
|
||||
add_logs(user, L, "injected", src, addition="which had [contained]")
|
||||
else
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [L.name] ([L.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
L.log_message("<font color='orange'>Injected themselves ([contained]) with [src.name].</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(L, INJECT, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/update_icon()
|
||||
var/rounded_vol = Clamp(round((reagents.total_volume / volume * 15),5), 0, 15)
|
||||
cut_overlays()
|
||||
if(ismob(loc))
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/epinephrine
|
||||
name = "syringe (epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/charcoal
|
||||
name = "syringe (charcoal)"
|
||||
desc = "Contains charcoal."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/antiviral
|
||||
name = "syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "mutetoxin" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/stimulants
|
||||
name = "Stimpack"
|
||||
desc = "Contains stimulants."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/calomel
|
||||
name = "syringe (calomel)"
|
||||
desc = "Contains calomel."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal
|
||||
name = "lethal injection syringe"
|
||||
desc = "A syringe used for lethal injections. It can hold up to 50 units."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal/choral
|
||||
list_reagents = list("chloralhydrate" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal/execution
|
||||
list_reagents = list("plasma" = 15, "formaldehyde" = 15, "cyanide" = 10, "facid" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/mulligan
|
||||
name = "Mulligan"
|
||||
desc = "A syringe used to completely change the users identity."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("mulligan" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/gluttony
|
||||
name = "Gluttony's Blessing"
|
||||
desc = "A syringe recovered from a dread place. It probably isn't wise to use."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("gluttonytoxin" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/bluespace
|
||||
name = "bluespace syringe"
|
||||
desc = "An advanced syringe that can hold 60 units of chemicals"
|
||||
amount_per_transfer_from_this = 20
|
||||
volume = 60
|
||||
origin_tech = "bluespace=4;materials=4;biotech=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/noreact
|
||||
name = "cryo syringe"
|
||||
desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units."
|
||||
volume = 20
|
||||
origin_tech = "materials=3;engineering=3"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/epinephrine
|
||||
name = "syringe (epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/charcoal
|
||||
name = "syringe (charcoal)"
|
||||
desc = "Contains charcoal."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/antiviral
|
||||
name = "syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "mutetoxin" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/stimulants
|
||||
name = "Stimpack"
|
||||
desc = "Contains stimulants."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/calomel
|
||||
name = "syringe (calomel)"
|
||||
desc = "Contains calomel."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal
|
||||
name = "lethal injection syringe"
|
||||
desc = "A syringe used for lethal injections. It can hold up to 50 units."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal/choral
|
||||
list_reagents = list("chloralhydrate" = 50)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/lethal/execution
|
||||
list_reagents = list("plasma" = 15, "formaldehyde" = 15, "cyanide" = 10, "facid" = 10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/mulligan
|
||||
name = "Mulligan"
|
||||
desc = "A syringe used to completely change the users identity."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("mulligan" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/gluttony
|
||||
name = "Gluttony's Blessing"
|
||||
desc = "A syringe recovered from a dread place. It probably isn't wise to use."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("gluttonytoxin" = 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/bluespace
|
||||
name = "bluespace syringe"
|
||||
desc = "An advanced syringe that can hold 60 units of chemicals"
|
||||
amount_per_transfer_from_this = 20
|
||||
volume = 60
|
||||
origin_tech = "bluespace=4;materials=4;biotech=4"
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/noreact
|
||||
name = "cryo syringe"
|
||||
desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units."
|
||||
volume = 20
|
||||
origin_tech = "materials=3;engineering=3"
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/noreact/Initialize()
|
||||
. = ..()
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/piercing
|
||||
name = "piercing syringe"
|
||||
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
|
||||
volume = 10
|
||||
proj_piercing = 1
|
||||
origin_tech = "combat=3;materials=4;engineering=5"
|
||||
. = ..()
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/piercing
|
||||
name = "piercing syringe"
|
||||
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
|
||||
volume = 10
|
||||
proj_piercing = 1
|
||||
origin_tech = "combat=3;materials=4;engineering=5"
|
||||
|
||||
@@ -1,179 +1,179 @@
|
||||
/obj/structure/reagent_dispensers
|
||||
name = "Dispenser"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "water"
|
||||
density = 1
|
||||
anchored = 0
|
||||
/obj/structure/reagent_dispensers
|
||||
name = "Dispenser"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "water"
|
||||
density = 1
|
||||
anchored = 0
|
||||
container_type = DRAWABLE
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
obj_integrity = 300
|
||||
max_integrity = 300
|
||||
var/tank_volume = 1000 //In units, how much the dispenser can hold
|
||||
var/reagent_id = "water" //The ID of the reagent that the dispenser uses
|
||||
|
||||
/obj/structure/reagent_dispensers/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
if(tank_volume && (damage_flag == "bullet" || damage_flag == "laser"))
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers))
|
||||
return 0 //so we can refill them via their afterattack.
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/Initialize()
|
||||
create_reagents(tank_volume)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
obj_integrity = 300
|
||||
max_integrity = 300
|
||||
var/tank_volume = 1000 //In units, how much the dispenser can hold
|
||||
var/reagent_id = "water" //The ID of the reagent that the dispenser uses
|
||||
|
||||
/obj/structure/reagent_dispensers/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/examine(mob/user)
|
||||
..()
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>It has [reagents.total_volume] units left.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It's empty.</span>")
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>\The [src] ruptures!</span>")
|
||||
chem_splash(loc, 5, list(reagents))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!disassembled)
|
||||
boom()
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank
|
||||
name = "water tank"
|
||||
desc = "A water tank."
|
||||
icon_state = "water"
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank/high
|
||||
name = "high-capacity water tank"
|
||||
if(. && obj_integrity > 0)
|
||||
if(tank_volume && (damage_flag == "bullet" || damage_flag == "laser"))
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers))
|
||||
return 0 //so we can refill them via their afterattack.
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/Initialize()
|
||||
create_reagents(tank_volume)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/examine(mob/user)
|
||||
..()
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>It has [reagents.total_volume] units left.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It's empty.</span>")
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>\The [src] ruptures!</span>")
|
||||
chem_splash(loc, 5, list(reagents))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!disassembled)
|
||||
boom()
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank
|
||||
name = "water tank"
|
||||
desc = "A water tank."
|
||||
icon_state = "water"
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank/high
|
||||
name = "high-capacity water tank"
|
||||
desc = "A highly pressurized water tank made to hold gargantuan amounts of water."
|
||||
icon_state = "water_high" //I was gonna clean my room...
|
||||
tank_volume = 100000
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank
|
||||
name = "fuel tank"
|
||||
desc = "A tank full of industrial welding fuel. Do not consume."
|
||||
icon_state = "fuel"
|
||||
reagent_id = "welding_fuel"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/boom()
|
||||
icon_state = "water_high" //I was gonna clean my room...
|
||||
tank_volume = 100000
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank
|
||||
name = "fuel tank"
|
||||
desc = "A tank full of industrial welding fuel. Do not consume."
|
||||
icon_state = "fuel"
|
||||
reagent_id = "welding_fuel"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/boom()
|
||||
explosion(get_turf(src), 0, 1, 5, flame_range = 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/blob_act(obj/structure/blob/B)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/ex_act()
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/fire_act(exposed_temperature, exposed_volume)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/tesla_act()
|
||||
..() //extend the zap
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/P)
|
||||
..()
|
||||
if(!QDELETED(src)) //wasn't deleted by the projectile's effects.
|
||||
if(!P.nodamage && ((P.damage_type == BURN) || (P.damage_type == BRUTE)))
|
||||
var/boom_message = "[key_name_admin(P.firer)] triggered a fueltank explosion via projectile."
|
||||
GLOB.bombers += boom_message
|
||||
message_admins(boom_message)
|
||||
var/log_message = "triggered a fueltank explosion via projectile."
|
||||
P.firer.log_message(log_message, INDIVIDUAL_ATTACK_LOG)
|
||||
log_attack("[key_name(P.firer)] [log_message]")
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
if(!reagents.has_reagent("welding_fuel"))
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(!W.welding)
|
||||
if(W.reagents.has_reagent("welding_fuel", W.max_fuel))
|
||||
to_chat(user, "<span class='warning'>Your [W.name] is already full!</span>")
|
||||
return
|
||||
reagents.trans_to(W, W.max_fuel)
|
||||
user.visible_message("<span class='notice'>[user] refills [user.p_their()] [W.name].</span>", "<span class='notice'>You refill [W].</span>")
|
||||
playsound(src, 'sound/effects/refill.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/blob_act(obj/structure/blob/B)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/ex_act()
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/fire_act(exposed_temperature, exposed_volume)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/tesla_act()
|
||||
..() //extend the zap
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/P)
|
||||
..()
|
||||
if(!QDELETED(src)) //wasn't deleted by the projectile's effects.
|
||||
if(!P.nodamage && ((P.damage_type == BURN) || (P.damage_type == BRUTE)))
|
||||
var/boom_message = "[key_name_admin(P.firer)] triggered a fueltank explosion via projectile."
|
||||
GLOB.bombers += boom_message
|
||||
message_admins(boom_message)
|
||||
var/log_message = "triggered a fueltank explosion via projectile."
|
||||
P.firer.log_message(log_message, INDIVIDUAL_ATTACK_LOG)
|
||||
log_attack("[key_name(P.firer)] [log_message]")
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
if(!reagents.has_reagent("welding_fuel"))
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(!W.welding)
|
||||
if(W.reagents.has_reagent("welding_fuel", W.max_fuel))
|
||||
to_chat(user, "<span class='warning'>Your [W.name] is already full!</span>")
|
||||
return
|
||||
reagents.trans_to(W, W.max_fuel)
|
||||
user.visible_message("<span class='notice'>[user] refills [user.p_their()] [W.name].</span>", "<span class='notice'>You refill [W].</span>")
|
||||
playsound(src, 'sound/effects/refill.ogg', 50, 1)
|
||||
W.update_icon()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] catastrophically fails at refilling [user.p_their()] [W.name]!</span>", "<span class='userdanger'>That was stupid of you.</span>")
|
||||
var/message_admins = "[key_name_admin(user)] triggered a fueltank explosion via welding tool."
|
||||
GLOB.bombers += message_admins
|
||||
message_admins(message_admins)
|
||||
var/message_log = "triggered a fueltank explosion via welding tool."
|
||||
user.log_message(message_log, INDIVIDUAL_ATTACK_LOG)
|
||||
log_attack("[key_name(user)] [message_log]")
|
||||
boom()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank
|
||||
name = "pepper spray refiller"
|
||||
desc = "Contains condensed capsaicin for use in law \"enforcement.\""
|
||||
icon_state = "pepper"
|
||||
anchored = 1
|
||||
density = 0
|
||||
reagent_id = "condensedcapsaicin"
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] catastrophically fails at refilling [user.p_their()] [W.name]!</span>", "<span class='userdanger'>That was stupid of you.</span>")
|
||||
var/message_admins = "[key_name_admin(user)] triggered a fueltank explosion via welding tool."
|
||||
GLOB.bombers += message_admins
|
||||
message_admins(message_admins)
|
||||
var/message_log = "triggered a fueltank explosion via welding tool."
|
||||
user.log_message(message_log, INDIVIDUAL_ATTACK_LOG)
|
||||
log_attack("[key_name(user)] [message_log]")
|
||||
boom()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank
|
||||
name = "pepper spray refiller"
|
||||
desc = "Contains condensed capsaicin for use in law \"enforcement.\""
|
||||
icon_state = "pepper"
|
||||
anchored = 1
|
||||
density = 0
|
||||
reagent_id = "condensedcapsaicin"
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank/Initialize()
|
||||
. = ..()
|
||||
if(prob(1))
|
||||
desc = "IT'S PEPPER TIME, BITCH!"
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler
|
||||
name = "liquid cooler"
|
||||
desc = "A machine that dispenses liquid to drink."
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
icon_state = "water_cooler"
|
||||
anchored = 1
|
||||
tank_volume = 500
|
||||
var/paper_cups = 25 //Paper cups left from the cooler
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "There are [paper_cups ? paper_cups : "no"] paper cups left.")
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user)
|
||||
if(!paper_cups)
|
||||
to_chat(user, "<span class='warning'>There aren't any cups left!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] takes a cup from [src].</span>", "<span class='notice'>You take a paper cup from [src].</span>")
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/sillycup/S = new(get_turf(src))
|
||||
user.put_in_hands(S)
|
||||
paper_cups--
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg
|
||||
name = "beer keg"
|
||||
desc = "Beer is liquid bread, it's good for you..."
|
||||
icon_state = "beer"
|
||||
reagent_id = "beer"
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/blob_act(obj/structure/blob/B)
|
||||
if(prob(1))
|
||||
desc = "IT'S PEPPER TIME, BITCH!"
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler
|
||||
name = "liquid cooler"
|
||||
desc = "A machine that dispenses liquid to drink."
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
icon_state = "water_cooler"
|
||||
anchored = 1
|
||||
tank_volume = 500
|
||||
var/paper_cups = 25 //Paper cups left from the cooler
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "There are [paper_cups ? paper_cups : "no"] paper cups left.")
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user)
|
||||
if(!paper_cups)
|
||||
to_chat(user, "<span class='warning'>There aren't any cups left!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] takes a cup from [src].</span>", "<span class='notice'>You take a paper cup from [src].</span>")
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/sillycup/S = new(get_turf(src))
|
||||
user.put_in_hands(S)
|
||||
paper_cups--
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg
|
||||
name = "beer keg"
|
||||
desc = "Beer is liquid bread, it's good for you..."
|
||||
icon_state = "beer"
|
||||
reagent_id = "beer"
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/blob_act(obj/structure/blob/B)
|
||||
explosion(src.loc,0,3,5,7,10)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/virusfood
|
||||
name = "virus food dispenser"
|
||||
desc = "A dispenser of low-potency virus mutagenic."
|
||||
icon_state = "virus_food"
|
||||
anchored = 1
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/virusfood
|
||||
name = "virus food dispenser"
|
||||
desc = "A dispenser of low-potency virus mutagenic."
|
||||
icon_state = "virus_food"
|
||||
anchored = 1
|
||||
reagent_id = "virusfood"
|
||||
Reference in New Issue
Block a user