mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
File standardisation (#13131)
* Adds the check components * Adds in trailing newlines * Converts all CRLF to LF * Post merge EOF * Post merge line endings * Final commit
This commit is contained in:
@@ -28,4 +28,4 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111
|
||||
color = BlendRGB(color, reagent_color, vol_temp/vol_counter)
|
||||
else
|
||||
color = BlendRGB(reagent_color, color, vol_temp/vol_counter)
|
||||
return color
|
||||
return color
|
||||
|
||||
@@ -397,4 +397,4 @@
|
||||
component_parts += new /obj/item/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/stack/sheet/glass(null)
|
||||
component_parts += new cell_type(null)
|
||||
RefreshParts()
|
||||
RefreshParts()
|
||||
|
||||
@@ -502,4 +502,4 @@
|
||||
component_parts += new /obj/item/stack/sheet/glass(null)
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker(null)
|
||||
component_parts += new /obj/item/reagent_containers/glass/beaker(null)
|
||||
RefreshParts()
|
||||
RefreshParts()
|
||||
|
||||
@@ -238,4 +238,4 @@ About the Tools:
|
||||
It simply tells us how much to transfer when
|
||||
'pouring' our reagents into something else.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -218,4 +218,4 @@
|
||||
if(M.healthdoll)
|
||||
M.healthdoll.cached_healthdoll_overlays.Cut()
|
||||
if(M.dna.species)
|
||||
M.dna.species.handle_hud_icons(M)
|
||||
M.dna.species.handle_hud_icons(M)
|
||||
|
||||
@@ -157,4 +157,4 @@
|
||||
if(message_living && !issilicon(M))
|
||||
totalmessage += message_living
|
||||
totalmessage += "!"
|
||||
to_chat(M, "<span class='userdanger'>[totalmessage]</span>")
|
||||
to_chat(M, "<span class='userdanger'>[totalmessage]</span>")
|
||||
|
||||
@@ -211,4 +211,4 @@
|
||||
/datum/reagent/plasma_dust/plasmavirusfood/weak
|
||||
name = "weakened virus plasma"
|
||||
id = "weakplasmavirusfood"
|
||||
color = "#CEC3C6" // rgb: 206,195,198
|
||||
color = "#CEC3C6" // rgb: 206,195,198
|
||||
|
||||
@@ -1029,4 +1029,4 @@
|
||||
if(prob(80))
|
||||
update_flags |= M.adjustBruteLoss(-1 * REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
update_flags |= M.adjustFireLoss(-1 * REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
return ..() | update_flags
|
||||
return ..() | update_flags
|
||||
|
||||
@@ -66,4 +66,4 @@
|
||||
if(setting_type)
|
||||
X.throw_at(T, 20 + round(volume * 2), 1 + round(volume / 10))
|
||||
else
|
||||
X.throw_at(get_edge_target_turf(T, get_dir(T, X)), 20 + round(volume * 2), 1 + round(volume / 10))
|
||||
X.throw_at(get_edge_target_turf(T, get_dir(T, X)), 20 + round(volume * 2), 1 + round(volume / 10))
|
||||
|
||||
@@ -867,4 +867,4 @@
|
||||
result = "bacchus_blessing"
|
||||
required_reagents = list("hooch" = 1, "absinthe" = 1, "manlydorf" = 1, "syndicatebomb" = 1)
|
||||
result_amount = 4
|
||||
mix_message = "<span class='warning'>The mixture turns to a sickening froth.</span>"
|
||||
mix_message = "<span class='warning'>The mixture turns to a sickening froth.</span>"
|
||||
|
||||
@@ -113,4 +113,4 @@
|
||||
result = "surge"
|
||||
required_reagents = list("thermite" = 3, "uranium" = 1, "fluorosurfactant" = 1, "sacid" = 1)
|
||||
result_amount = 6
|
||||
mix_message = "The mixture congeals into a metallic green gel that crackles with electrical activity."
|
||||
mix_message = "The mixture congeals into a metallic green gel that crackles with electrical activity."
|
||||
|
||||
@@ -279,4 +279,4 @@
|
||||
required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1)
|
||||
result_amount = 3
|
||||
min_temp = T0C + 100
|
||||
mix_message = "The solution gently swirls with a metallic sheen."
|
||||
mix_message = "The solution gently swirls with a metallic sheen."
|
||||
|
||||
@@ -173,4 +173,4 @@
|
||||
result = "rotatium"
|
||||
required_reagents = list("lsd" = 1, "teslium" = 1, "methamphetamine" = 1)
|
||||
result_amount = 3
|
||||
mix_message = "<span class='danger'>After sparks, fire, and the smell of LSD, the mix is constantly spinning with no stop in sight.</span>"
|
||||
mix_message = "<span class='danger'>After sparks, fire, and the smell of LSD, the mix is constantly spinning with no stop in sight.</span>"
|
||||
|
||||
@@ -1,74 +1,74 @@
|
||||
/obj/item/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/possible_transfer_amounts = list(5,10,15,25,30)
|
||||
var/volume = 30
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/has_lid = FALSE // Used for containers where we want to put lids on and off
|
||||
|
||||
/obj/item/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this
|
||||
set name = "Set transfer amount"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
var/default = null
|
||||
if(amount_per_transfer_from_this in possible_transfer_amounts)
|
||||
default = amount_per_transfer_from_this
|
||||
var/N = input("Amount per transfer from this:", "[src]", default) as null|anything in possible_transfer_amounts
|
||||
if(N)
|
||||
amount_per_transfer_from_this = N
|
||||
|
||||
/obj/item/reagent_containers/New()
|
||||
..()
|
||||
if(!possible_transfer_amounts)
|
||||
verbs -= /obj/item/reagent_containers/verb/set_APTFT
|
||||
create_reagents(volume)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease(0)
|
||||
var/list/data = list("viruses" = list(F), "blood_color" = "#A10808")
|
||||
reagents.add_reagent("blood", disease_amount, data)
|
||||
add_initial_reagents()
|
||||
|
||||
obj/item/reagent_containers/proc/add_initial_reagents()
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
/obj/item/reagent_containers/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
if(!QDELETED(src))
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/attack_self(mob/user)
|
||||
if(has_lid)
|
||||
if(is_open_container())
|
||||
to_chat(usr, "<span class='notice'>You put the lid on [src].</span>")
|
||||
container_type ^= REFILLABLE | DRAINABLE
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You take the lid off [src].</span>")
|
||||
container_type |= REFILLABLE | DRAINABLE
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/wash(mob/user, atom/source)
|
||||
if(is_open_container())
|
||||
if(reagents.total_volume >= volume)
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
else
|
||||
reagents.add_reagent("water", min(volume - reagents.total_volume, amount_per_transfer_from_this))
|
||||
to_chat(user, "<span class='notice'>You fill [src] from [source].</span>")
|
||||
return
|
||||
..()
|
||||
/obj/item/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/possible_transfer_amounts = list(5,10,15,25,30)
|
||||
var/volume = 30
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/has_lid = FALSE // Used for containers where we want to put lids on and off
|
||||
|
||||
/obj/item/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this
|
||||
set name = "Set transfer amount"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
var/default = null
|
||||
if(amount_per_transfer_from_this in possible_transfer_amounts)
|
||||
default = amount_per_transfer_from_this
|
||||
var/N = input("Amount per transfer from this:", "[src]", default) as null|anything in possible_transfer_amounts
|
||||
if(N)
|
||||
amount_per_transfer_from_this = N
|
||||
|
||||
/obj/item/reagent_containers/New()
|
||||
..()
|
||||
if(!possible_transfer_amounts)
|
||||
verbs -= /obj/item/reagent_containers/verb/set_APTFT
|
||||
create_reagents(volume)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease(0)
|
||||
var/list/data = list("viruses" = list(F), "blood_color" = "#A10808")
|
||||
reagents.add_reagent("blood", disease_amount, data)
|
||||
add_initial_reagents()
|
||||
|
||||
obj/item/reagent_containers/proc/add_initial_reagents()
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
/obj/item/reagent_containers/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
if(!QDELETED(src))
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/attack_self(mob/user)
|
||||
if(has_lid)
|
||||
if(is_open_container())
|
||||
to_chat(usr, "<span class='notice'>You put the lid on [src].</span>")
|
||||
container_type ^= REFILLABLE | DRAINABLE
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You take the lid off [src].</span>")
|
||||
container_type |= REFILLABLE | DRAINABLE
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/wash(mob/user, atom/source)
|
||||
if(is_open_container())
|
||||
if(reagents.total_volume >= volume)
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
else
|
||||
reagents.add_reagent("water", min(volume - reagents.total_volume, amount_per_transfer_from_this))
|
||||
to_chat(user, "<span class='notice'>You fill [src] from [source].</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -1,116 +1,116 @@
|
||||
|
||||
/obj/item/reagent_containers/borghypo
|
||||
name = "Cyborg Hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = null
|
||||
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("salglu_solution", "epinephrine", "spaceacillin", "charcoal", "hydrocodone")
|
||||
//var/list/reagent_ids = list("salbutamol", "silver_sulfadiazine", "styptic_powder", "charcoal", "epinephrine", "spaceacillin", "hydrocodone")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/surgeon
|
||||
reagent_ids = list("styptic_powder", "epinephrine", "salbutamol")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/crisis
|
||||
reagent_ids = list("salglu_solution", "epinephrine", "sal_acid")
|
||||
|
||||
/obj/item/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 hydrocodone, for field surgery and pain relief."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "hydrocodone")
|
||||
bypass_protection = 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/New()
|
||||
..()
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
var/datum/reagents/RG = reagent_list[mode]
|
||||
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[mode], 5) //And fill hypo with reagent.
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/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)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack(mob/living/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>The injector is empty.</span>")
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, TRUE, user.zone_selected, penetrate_thick = bypass_protection))
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
|
||||
R.add_reagent(M)
|
||||
if(M.reagents)
|
||||
var/datum/reagent/injected = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
var/contained = injected.name
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units", injected.harmless ? ATKLOG_ALMOSTALL : null)
|
||||
M.LAssailant = user
|
||||
to_chat(user, "<span class='notice'>[trans] units injected. [R.total_volume] units remaining.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
|
||||
mode++
|
||||
if(mode > reagent_list.len)
|
||||
mode = 1
|
||||
|
||||
charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes.
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
to_chat(user, "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
var/empty = TRUE
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
. += "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>"
|
||||
empty = FALSE
|
||||
|
||||
if(empty)
|
||||
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
/obj/item/reagent_containers/borghypo
|
||||
name = "Cyborg Hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = null
|
||||
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("salglu_solution", "epinephrine", "spaceacillin", "charcoal", "hydrocodone")
|
||||
//var/list/reagent_ids = list("salbutamol", "silver_sulfadiazine", "styptic_powder", "charcoal", "epinephrine", "spaceacillin", "hydrocodone")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/surgeon
|
||||
reagent_ids = list("styptic_powder", "epinephrine", "salbutamol")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/crisis
|
||||
reagent_ids = list("salglu_solution", "epinephrine", "sal_acid")
|
||||
|
||||
/obj/item/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 hydrocodone, for field surgery and pain relief."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "hydrocodone")
|
||||
bypass_protection = 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/New()
|
||||
..()
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
var/datum/reagents/RG = reagent_list[mode]
|
||||
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[mode], 5) //And fill hypo with reagent.
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/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)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack(mob/living/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>The injector is empty.</span>")
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, TRUE, user.zone_selected, penetrate_thick = bypass_protection))
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
|
||||
R.add_reagent(M)
|
||||
if(M.reagents)
|
||||
var/datum/reagent/injected = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
var/contained = injected.name
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units", injected.harmless ? ATKLOG_ALMOSTALL : null)
|
||||
M.LAssailant = user
|
||||
to_chat(user, "<span class='notice'>[trans] units injected. [R.total_volume] units remaining.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
|
||||
mode++
|
||||
if(mode > reagent_list.len)
|
||||
mode = 1
|
||||
|
||||
charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes.
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
to_chat(user, "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
var/empty = TRUE
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
. += "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>"
|
||||
empty = FALSE
|
||||
|
||||
if(empty)
|
||||
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
@@ -392,4 +392,4 @@
|
||||
name = "BVAK bottle"
|
||||
desc = "A small bottle containing Bio Virus Antidote Kit."
|
||||
icon_state = "wide_bottle"
|
||||
list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10)
|
||||
list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10)
|
||||
|
||||
@@ -1,144 +1,144 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Droppers. ///
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Transfers 5 units."
|
||||
icon_state = "dropper"
|
||||
item_state = "dropper"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
|
||||
/obj/item/reagent_containers/dropper/on_reagent_change()
|
||||
if(!reagents.total_volume)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
|
||||
/obj/item/reagent_containers/dropper/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/dropper/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
var/to_transfer = 0
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(user != C)
|
||||
visible_message("<span class='danger'>[user] begins to drip something into [C]'s eyes!</span>")
|
||||
if(!do_mob(user, C, 30))
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/safe_thing = null
|
||||
|
||||
if(H.glasses)
|
||||
safe_thing = H.glasses
|
||||
if(H.wear_mask )
|
||||
if(H.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.wear_mask
|
||||
if(H.head)
|
||||
if(H.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.head
|
||||
|
||||
if(safe_thing)
|
||||
visible_message("<span class='danger'>[user] tries to drip something into [H]'s eyes, but fails!</span>")
|
||||
|
||||
reagents.reaction(safe_thing, REAGENT_TOUCH)
|
||||
to_transfer = reagents.remove_any(amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>[user] drips something into [C]'s eyes!</span>")
|
||||
reagents.reaction(C, REAGENT_TOUCH)
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, C, "Dripped with [src] containing ([contained]), transfering [to_transfer]")
|
||||
|
||||
to_transfer = reagents.trans_to(C, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
if(isobj(target))
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
if(reagents.total_volume)
|
||||
if(!target.is_open_container() && !(istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/reagent_containers/food/pill)) && !istype(target, /obj/item/clothing/mask/cigarette))
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill this object.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_transfer = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
else
|
||||
if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers))
|
||||
to_chat(user, "<span class='warning'>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
|
||||
|
||||
to_transfer = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [to_transfer] units of the solution.</span>")
|
||||
|
||||
/obj/item/reagent_containers/dropper/cyborg
|
||||
name = "Industrial Dropper"
|
||||
desc = "A larger dropper. Transfers 10 units."
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
||||
volume = 10
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision
|
||||
name = "pipette"
|
||||
desc = "A high precision pippette. Holds 1 unit."
|
||||
icon_state = "pipette"
|
||||
amount_per_transfer_from_this = 1
|
||||
possible_transfer_amounts = list(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)
|
||||
volume = 1
|
||||
|
||||
//Syndicate item. Virus transmitting mini hypospray
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector/attack(mob/living/M, mob/living/user, def_zone)
|
||||
if(M.can_inject(user, TRUE))
|
||||
to_chat(user, "<span class='warning'>You stab [M] with the [src].</span>")
|
||||
if(reagents.total_volume && M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/datum/reagent/blood/B = R
|
||||
|
||||
if(istype(B) && B.data["viruses"])
|
||||
var/virList = list()
|
||||
for(var/dis in B.data["viruses"])
|
||||
var/datum/disease/D = dis
|
||||
var/virusData = D.name
|
||||
var/english_symptoms = list()
|
||||
var/datum/disease/advance/A = D
|
||||
if(A)
|
||||
for(var/datum/symptom/S in A.symptoms)
|
||||
english_symptoms += S.name
|
||||
virusData += " ([english_list(english_symptoms)])"
|
||||
virList += virusData
|
||||
var/str = english_list(virList)
|
||||
add_attack_logs(user, M, "Infected with [str].")
|
||||
|
||||
reagents.reaction(M, REAGENT_INGEST, reagents.total_volume)
|
||||
reagents.trans_to(M, 1)
|
||||
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])")
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Droppers. ///
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Transfers 5 units."
|
||||
icon_state = "dropper"
|
||||
item_state = "dropper"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
|
||||
/obj/item/reagent_containers/dropper/on_reagent_change()
|
||||
if(!reagents.total_volume)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
|
||||
/obj/item/reagent_containers/dropper/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/dropper/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
var/to_transfer = 0
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(user != C)
|
||||
visible_message("<span class='danger'>[user] begins to drip something into [C]'s eyes!</span>")
|
||||
if(!do_mob(user, C, 30))
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/safe_thing = null
|
||||
|
||||
if(H.glasses)
|
||||
safe_thing = H.glasses
|
||||
if(H.wear_mask )
|
||||
if(H.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.wear_mask
|
||||
if(H.head)
|
||||
if(H.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = H.head
|
||||
|
||||
if(safe_thing)
|
||||
visible_message("<span class='danger'>[user] tries to drip something into [H]'s eyes, but fails!</span>")
|
||||
|
||||
reagents.reaction(safe_thing, REAGENT_TOUCH)
|
||||
to_transfer = reagents.remove_any(amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>[user] drips something into [C]'s eyes!</span>")
|
||||
reagents.reaction(C, REAGENT_TOUCH)
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, C, "Dripped with [src] containing ([contained]), transfering [to_transfer]")
|
||||
|
||||
to_transfer = reagents.trans_to(C, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
if(isobj(target))
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
if(reagents.total_volume)
|
||||
if(!target.is_open_container() && !(istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/reagent_containers/food/pill)) && !istype(target, /obj/item/clothing/mask/cigarette))
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill this object.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_transfer = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
|
||||
|
||||
else
|
||||
if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers))
|
||||
to_chat(user, "<span class='warning'>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
|
||||
|
||||
to_transfer = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [to_transfer] units of the solution.</span>")
|
||||
|
||||
/obj/item/reagent_containers/dropper/cyborg
|
||||
name = "Industrial Dropper"
|
||||
desc = "A larger dropper. Transfers 10 units."
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
|
||||
volume = 10
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision
|
||||
name = "pipette"
|
||||
desc = "A high precision pippette. Holds 1 unit."
|
||||
icon_state = "pipette"
|
||||
amount_per_transfer_from_this = 1
|
||||
possible_transfer_amounts = list(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)
|
||||
volume = 1
|
||||
|
||||
//Syndicate item. Virus transmitting mini hypospray
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector
|
||||
|
||||
/obj/item/reagent_containers/dropper/precision/viral_injector/attack(mob/living/M, mob/living/user, def_zone)
|
||||
if(M.can_inject(user, TRUE))
|
||||
to_chat(user, "<span class='warning'>You stab [M] with the [src].</span>")
|
||||
if(reagents.total_volume && M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/datum/reagent/blood/B = R
|
||||
|
||||
if(istype(B) && B.data["viruses"])
|
||||
var/virList = list()
|
||||
for(var/dis in B.data["viruses"])
|
||||
var/datum/disease/D = dis
|
||||
var/virusData = D.name
|
||||
var/english_symptoms = list()
|
||||
var/datum/disease/advance/A = D
|
||||
if(A)
|
||||
for(var/datum/symptom/S in A.symptoms)
|
||||
english_symptoms += S.name
|
||||
virusData += " ([english_list(english_symptoms)])"
|
||||
virList += virusData
|
||||
var/str = english_list(virList)
|
||||
add_attack_logs(user, M, "Infected with [str].")
|
||||
|
||||
reagents.reaction(M, REAGENT_INGEST, reagents.total_volume)
|
||||
reagents.trans_to(M, 1)
|
||||
|
||||
var/contained = english_list(injected)
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])")
|
||||
|
||||
@@ -397,4 +397,4 @@
|
||||
amount_per_transfer_from_this = 20
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
|
||||
list_reagents = list()
|
||||
list_reagents = list()
|
||||
|
||||
@@ -1,175 +1,175 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// HYPOSPRAY
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/reagent_containers/hypospray
|
||||
name = "hypospray"
|
||||
desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients."
|
||||
icon = 'icons/obj/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "hypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
|
||||
resistance_flags = ACID_PROOF
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
var/ignore_flags = FALSE
|
||||
var/emagged = FALSE
|
||||
var/safety_hypo = FALSE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
if(reagents.total_volume && (ignore_flags || M.can_inject(user, TRUE))) // Ignore flag should be checked first or there will be an error message.
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with [src].</span>")
|
||||
|
||||
if(M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
|
||||
var/primary_reagent_name = reagents.get_master_reagent_name()
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
|
||||
if(safety_hypo)
|
||||
visible_message("<span class='warning'>[user] injects [M] with [trans] units of [primary_reagent_name].</span>")
|
||||
playsound(loc, 'sound/goonstation/items/hypo.ogg', 80, 0)
|
||||
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [reagents.total_volume] unit\s remaining in [src].</span>")
|
||||
|
||||
var/contained = english_list(injected)
|
||||
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/on_reagent_change()
|
||||
if(safety_hypo && !emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(!GLOB.safe_chem_list.Find(R.id))
|
||||
reagents.del_reagent(R.id)
|
||||
found_forbidden_reagent = TRUE
|
||||
if(found_forbidden_reagent)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/emag_act(mob/user)
|
||||
if(safety_hypo && !emagged)
|
||||
emagged = TRUE
|
||||
ignore_flags = TRUE
|
||||
to_chat(user, "<span class='warning'>You short out the safeties on [src].</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety
|
||||
name = "medical hypospray"
|
||||
desc = "A general use medical hypospray for quick injection of chemicals. There is a safety button by the trigger."
|
||||
icon_state = "medivend_hypo"
|
||||
safety_hypo = TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety/ert
|
||||
list_reagents = list("omnizine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/CMO
|
||||
list_reagents = list("omnizine" = 30)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/reagent_containers/hypospray/combat
|
||||
name = "combat stimulant injector"
|
||||
desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat."
|
||||
amount_per_transfer_from_this = 15
|
||||
possible_transfer_amounts = list(15)
|
||||
icon_state = "combat_hypo"
|
||||
volume = 90
|
||||
ignore_flags = 1 // So they can heal their comrades.
|
||||
list_reagents = list("epinephrine" = 30, "weak_omnizine" = 30, "salglu_solution" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/combat/nanites
|
||||
desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with expensive medical nanites for rapid healing."
|
||||
volume = 100
|
||||
list_reagents = list("nanites" = 100)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector
|
||||
name = "emergency autoinjector"
|
||||
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
|
||||
icon_state = "autoinjector"
|
||||
item_state = "autoinjector"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(10)
|
||||
volume = 10
|
||||
ignore_flags = TRUE //so you can medipen through hardsuits
|
||||
container_type = DRAWABLE
|
||||
flags = null
|
||||
list_reagents = list("epinephrine" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/attack(mob/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
..()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/examine()
|
||||
. = ..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
. += "<span class='notice'>It is spent.</span>"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/teporone //basilisks
|
||||
name = "teporone autoinjector"
|
||||
desc = "A rapid way to regulate your body's temperature in the event of a hardsuit malfunction."
|
||||
icon_state = "lepopen"
|
||||
list_reagents = list("teporone" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimpack //goliath kiting
|
||||
name = "stimpack autoinjector"
|
||||
desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor."
|
||||
icon_state = "stimpen"
|
||||
volume = 20
|
||||
amount_per_transfer_from_this = 20
|
||||
list_reagents = list("methamphetamine" = 10, "coffee" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimulants
|
||||
name = "Stimulants autoinjector"
|
||||
desc = "Rapidly stimulates and regenerates the body's organ system."
|
||||
icon_state = "stimpen"
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(50)
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/survival
|
||||
name = "survival medipen"
|
||||
desc = "A medipen for surviving in the harshest of environments, heals and protects from environmental hazards. <br><span class='boldwarning'>WARNING: Do not inject more than one pen in quick succession.</span>"
|
||||
icon_state = "stimpen"
|
||||
volume = 42
|
||||
amount_per_transfer_from_this = 42
|
||||
list_reagents = list("salbutamol" = 10, "teporone" = 15, "epinephrine" = 10, "lavaland_extract" = 2, "weak_omnizine" = 5) //Short burst of healing, followed by minor healing from the saline
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium
|
||||
name = "nanocalcium autoinjector"
|
||||
desc = "After a short period of time the nanites will slow the body's systems and assist with bone repair. Nanomachines son."
|
||||
icon_state = "bonepen"
|
||||
amount_per_transfer_from_this = 30
|
||||
possible_transfer_amounts = list(30)
|
||||
volume = 30
|
||||
list_reagents = list("nanocalcium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium/attack(mob/living/M, mob/user)
|
||||
if(..())
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// HYPOSPRAY
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/reagent_containers/hypospray
|
||||
name = "hypospray"
|
||||
desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients."
|
||||
icon = 'icons/obj/hypo.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "hypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
|
||||
resistance_flags = ACID_PROOF
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
var/ignore_flags = FALSE
|
||||
var/emagged = FALSE
|
||||
var/safety_hypo = FALSE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
if(reagents.total_volume && (ignore_flags || M.can_inject(user, TRUE))) // Ignore flag should be checked first or there will be an error message.
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with [src].</span>")
|
||||
|
||||
if(M.reagents)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
|
||||
var/primary_reagent_name = reagents.get_master_reagent_name()
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
|
||||
if(safety_hypo)
|
||||
visible_message("<span class='warning'>[user] injects [M] with [trans] units of [primary_reagent_name].</span>")
|
||||
playsound(loc, 'sound/goonstation/items/hypo.ogg', 80, 0)
|
||||
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [reagents.total_volume] unit\s remaining in [src].</span>")
|
||||
|
||||
var/contained = english_list(injected)
|
||||
|
||||
add_attack_logs(user, M, "Injected with [src] containing ([contained])", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/on_reagent_change()
|
||||
if(safety_hypo && !emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(!GLOB.safe_chem_list.Find(R.id))
|
||||
reagents.del_reagent(R.id)
|
||||
found_forbidden_reagent = TRUE
|
||||
if(found_forbidden_reagent)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/emag_act(mob/user)
|
||||
if(safety_hypo && !emagged)
|
||||
emagged = TRUE
|
||||
ignore_flags = TRUE
|
||||
to_chat(user, "<span class='warning'>You short out the safeties on [src].</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety
|
||||
name = "medical hypospray"
|
||||
desc = "A general use medical hypospray for quick injection of chemicals. There is a safety button by the trigger."
|
||||
icon_state = "medivend_hypo"
|
||||
safety_hypo = TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/safety/ert
|
||||
list_reagents = list("omnizine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/CMO
|
||||
list_reagents = list("omnizine" = 30)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/reagent_containers/hypospray/combat
|
||||
name = "combat stimulant injector"
|
||||
desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat."
|
||||
amount_per_transfer_from_this = 15
|
||||
possible_transfer_amounts = list(15)
|
||||
icon_state = "combat_hypo"
|
||||
volume = 90
|
||||
ignore_flags = 1 // So they can heal their comrades.
|
||||
list_reagents = list("epinephrine" = 30, "weak_omnizine" = 30, "salglu_solution" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/combat/nanites
|
||||
desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with expensive medical nanites for rapid healing."
|
||||
volume = 100
|
||||
list_reagents = list("nanites" = 100)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector
|
||||
name = "emergency autoinjector"
|
||||
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
|
||||
icon_state = "autoinjector"
|
||||
item_state = "autoinjector"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(10)
|
||||
volume = 10
|
||||
ignore_flags = TRUE //so you can medipen through hardsuits
|
||||
container_type = DRAWABLE
|
||||
flags = null
|
||||
list_reagents = list("epinephrine" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/attack(mob/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
..()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/examine()
|
||||
. = ..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
. += "<span class='notice'>It is spent.</span>"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/teporone //basilisks
|
||||
name = "teporone autoinjector"
|
||||
desc = "A rapid way to regulate your body's temperature in the event of a hardsuit malfunction."
|
||||
icon_state = "lepopen"
|
||||
list_reagents = list("teporone" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimpack //goliath kiting
|
||||
name = "stimpack autoinjector"
|
||||
desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor."
|
||||
icon_state = "stimpen"
|
||||
volume = 20
|
||||
amount_per_transfer_from_this = 20
|
||||
list_reagents = list("methamphetamine" = 10, "coffee" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/stimulants
|
||||
name = "Stimulants autoinjector"
|
||||
desc = "Rapidly stimulates and regenerates the body's organ system."
|
||||
icon_state = "stimpen"
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(50)
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/survival
|
||||
name = "survival medipen"
|
||||
desc = "A medipen for surviving in the harshest of environments, heals and protects from environmental hazards. <br><span class='boldwarning'>WARNING: Do not inject more than one pen in quick succession.</span>"
|
||||
icon_state = "stimpen"
|
||||
volume = 42
|
||||
amount_per_transfer_from_this = 42
|
||||
list_reagents = list("salbutamol" = 10, "teporone" = 15, "epinephrine" = 10, "lavaland_extract" = 2, "weak_omnizine" = 5) //Short burst of healing, followed by minor healing from the saline
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium
|
||||
name = "nanocalcium autoinjector"
|
||||
desc = "After a short period of time the nanites will slow the body's systems and assist with bone repair. Nanomachines son."
|
||||
icon_state = "bonepen"
|
||||
amount_per_transfer_from_this = 30
|
||||
possible_transfer_amounts = list(30)
|
||||
volume = 30
|
||||
list_reagents = list("nanocalcium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/nanocalcium/attack(mob/living/M, mob/user)
|
||||
if(..())
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 20, 1)
|
||||
|
||||
@@ -1,155 +1,155 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/obj/item/reagent_containers/food/pill
|
||||
name = "pill"
|
||||
desc = "a pill."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
item_state = "pill"
|
||||
possible_transfer_amounts = null
|
||||
volume = 100
|
||||
consume_sound = null
|
||||
can_taste = FALSE
|
||||
antable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/pill/New()
|
||||
..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
bitesize = reagents.total_volume
|
||||
if(M.eat(src, user))
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/reagent_containers/food/pill/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(target.is_open_container() != 0 && target.reagents)
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty. Cant dissolve [src].</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notify'>You dissolve [src] in [target].</span>")
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
for(var/mob/O in viewers(2, user))
|
||||
O.show_message("<span class='warning'>[user] puts something in [target].</span>", 1)
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Pills
|
||||
/obj/item/reagent_containers/food/pill/tox
|
||||
name = "Toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("toxin" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/initropidril
|
||||
name = "initropidril pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("initropidril" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/fakedeath
|
||||
name = "fake death pill"
|
||||
desc = "Swallow then rest to appear dead, stand up to wake up. Also mutes the user's voice."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("capulettium_plus" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/adminordrazine
|
||||
name = "Adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/morphine
|
||||
name = "Morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/methamphetamine
|
||||
name = "Methamphetamine pill"
|
||||
desc = "Helps improve the ability to concentrate."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/haloperidol
|
||||
name = "Haloperidol pill"
|
||||
desc = "Haloperidol is an anti-psychotic use to treat psychiatric problems."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("haloperidol" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/happy
|
||||
name = "Happy pill"
|
||||
desc = "Happy happy joy joy!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("space_drugs" = 15, "sugar" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/zoom
|
||||
name = "Zoom pill"
|
||||
desc = "Zoooom!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("synaptizine" = 5, "methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/charcoal
|
||||
name = "Charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/epinephrine
|
||||
name = "Epinephrine pill"
|
||||
desc = "Used to provide shots of adrenaline."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salicylic
|
||||
name = "Salicylic Acid pill"
|
||||
desc = "Commonly used to treat moderate pain and fevers."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("sal_acid" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salbutamol
|
||||
name = "Salbutamol pill"
|
||||
desc = "Used to treat respiratory distress."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("salbutamol" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/hydrocodone
|
||||
name = "Hydrocodone pill"
|
||||
desc = "Used to treat extreme pain."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("hydrocodone" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/calomel
|
||||
name = "calomel pill"
|
||||
desc = "Can be used to purge impurities, but is highly toxic itself."
|
||||
icon_state = "pill3"
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to cure genetic abnormalities."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("mutadone" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat cranial swelling."
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("mannitol" = 20)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/obj/item/reagent_containers/food/pill
|
||||
name = "pill"
|
||||
desc = "a pill."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
item_state = "pill"
|
||||
possible_transfer_amounts = null
|
||||
volume = 100
|
||||
consume_sound = null
|
||||
can_taste = FALSE
|
||||
antable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/pill/New()
|
||||
..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
bitesize = reagents.total_volume
|
||||
if(M.eat(src, user))
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/reagent_containers/food/pill/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(target.is_open_container() != 0 && target.reagents)
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty. Cant dissolve [src].</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notify'>You dissolve [src] in [target].</span>")
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
for(var/mob/O in viewers(2, user))
|
||||
O.show_message("<span class='warning'>[user] puts something in [target].</span>", 1)
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Pills. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Pills
|
||||
/obj/item/reagent_containers/food/pill/tox
|
||||
name = "Toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("toxin" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/initropidril
|
||||
name = "initropidril pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill21"
|
||||
list_reagents = list("initropidril" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/fakedeath
|
||||
name = "fake death pill"
|
||||
desc = "Swallow then rest to appear dead, stand up to wake up. Also mutes the user's voice."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("capulettium_plus" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/adminordrazine
|
||||
name = "Adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/morphine
|
||||
name = "Morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/methamphetamine
|
||||
name = "Methamphetamine pill"
|
||||
desc = "Helps improve the ability to concentrate."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/haloperidol
|
||||
name = "Haloperidol pill"
|
||||
desc = "Haloperidol is an anti-psychotic use to treat psychiatric problems."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("haloperidol" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/happy
|
||||
name = "Happy pill"
|
||||
desc = "Happy happy joy joy!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("space_drugs" = 15, "sugar" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/zoom
|
||||
name = "Zoom pill"
|
||||
desc = "Zoooom!"
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("synaptizine" = 5, "methamphetamine" = 5)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/charcoal
|
||||
name = "Charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/epinephrine
|
||||
name = "Epinephrine pill"
|
||||
desc = "Used to provide shots of adrenaline."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salicylic
|
||||
name = "Salicylic Acid pill"
|
||||
desc = "Commonly used to treat moderate pain and fevers."
|
||||
icon_state = "pill4"
|
||||
list_reagents = list("sal_acid" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salbutamol
|
||||
name = "Salbutamol pill"
|
||||
desc = "Used to treat respiratory distress."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("salbutamol" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/hydrocodone
|
||||
name = "Hydrocodone pill"
|
||||
desc = "Used to treat extreme pain."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("hydrocodone" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/calomel
|
||||
name = "calomel pill"
|
||||
desc = "Can be used to purge impurities, but is highly toxic itself."
|
||||
icon_state = "pill3"
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to cure genetic abnormalities."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("mutadone" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat cranial swelling."
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("mannitol" = 20)
|
||||
|
||||
@@ -1,217 +1,217 @@
|
||||
/obj/item/reagent_containers/spray
|
||||
name = "spray bottle"
|
||||
desc = "A spray bottle, with an unscrewable top."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cleaner"
|
||||
item_state = "cleaner"
|
||||
flags = NOBLUDGEON
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/spray_maxrange = 3 //what the sprayer will set spray_currentrange to in the attack_self.
|
||||
var/spray_currentrange = 3 //the range of tiles the sprayer will reach when in fixed mode.
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 250
|
||||
possible_transfer_amounts = null
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
|
||||
if(istype(A, /obj/item/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|
||||
|| istype(A, /obj/item/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/effect/proc_holder/spell))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1) //this block copypasted from reagent_containers/glass, for lack of a better solution
|
||||
if(!A.reagents.total_volume && A.reagents)
|
||||
to_chat(user, "<span class='notice'>[A] is empty.</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = A.reagents.trans_to(src, 50) //This is a static amount, otherwise, it'll take forever to fill.
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [A].</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume < amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
var/contents_log = reagents.reagent_list.Join(", ")
|
||||
spray(A)
|
||||
|
||||
playsound(loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
|
||||
if(reagents.reagent_list.len == 1 && reagents.has_reagent("cleaner")) // Only show space cleaner logs if it's burning people from being too hot or cold
|
||||
if(reagents.chem_temp < 300 && reagents.chem_temp > 280) // 280 is the cold threshold for slimes, 300 the hot threshold for drask
|
||||
return
|
||||
|
||||
var/attack_log_type = ATKLOG_MOST
|
||||
if(reagents.has_reagent("sacid") || reagents.has_reagent("facid") || reagents.has_reagent("lube"))
|
||||
attack_log_type = ATKLOG_FEW
|
||||
msg_admin_attack("[key_name_admin(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K", attack_log_type)
|
||||
log_game("[key_name(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/proc/spray(var/atom/A)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_currentrange)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
spawn(0)
|
||||
for(var/i=0, i<spray_currentrange, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
sleep(3)
|
||||
qdel(D)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
spray_currentrange = (spray_currentrange == 1 ? spray_maxrange : 1)
|
||||
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
/obj/item/reagent_containers/spray/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) && user == loc)
|
||||
. += "[round(reagents.total_volume)] units left."
|
||||
|
||||
/obj/item/reagent_containers/spray/verb/empty()
|
||||
|
||||
set name = "Empty Spray Bottle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(usr.loc)
|
||||
reagents.clear_reagents()
|
||||
|
||||
//space cleaner
|
||||
/obj/item/reagent_containers/spray/cleaner
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
list_reagents = list("cleaner" = 250)
|
||||
|
||||
/obj/item/reagent_containers/spray/cleaner/drone
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
volume = 50
|
||||
list_reagents = list("cleaner" = 50)
|
||||
|
||||
//spray tan
|
||||
/obj/item/reagent_containers/spray/spraytan
|
||||
name = "spray tan"
|
||||
volume = 50
|
||||
desc = "Gyaro brand spray tan. Do not spray near eyes or other orifices."
|
||||
list_reagents = list("spraytan" = 50)
|
||||
|
||||
//pepperspray
|
||||
/obj/item/reagent_containers/spray/pepper
|
||||
name = "pepperspray"
|
||||
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pepperspray"
|
||||
item_state = "pepperspray"
|
||||
volume = 40
|
||||
spray_maxrange = 4
|
||||
amount_per_transfer_from_this = 5
|
||||
list_reagents = list("condensedcapsaicin" = 40)
|
||||
|
||||
//water flower
|
||||
/obj/item/reagent_containers/spray/waterflower
|
||||
name = "water flower"
|
||||
desc = "A seemingly innocent sunflower...with a twist."
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
item_state = "sunflower"
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 10
|
||||
list_reagents = list("water" = 10)
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays
|
||||
return
|
||||
|
||||
//chemsprayer
|
||||
/obj/item/reagent_containers/spray/chemsprayer
|
||||
name = "chem sprayer"
|
||||
desc = "A utility used to spray large amounts of reagents in a given area."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "chemsprayer"
|
||||
item_state = "chemsprayer"
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
spray_maxrange = 7
|
||||
spray_currentrange = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 600
|
||||
origin_tech = "combat=3;materials=3;engineering=3"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/spray(var/atom/A)
|
||||
var/Sprays[3]
|
||||
for(var/i=1, i<=3, i++) // intialize sprays
|
||||
if(reagents.total_volume < 1) break
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
Sprays[i] = D
|
||||
|
||||
var/direction = get_dir(src, A)
|
||||
var/turf/T = get_turf(A)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/i=1, i<=Sprays.len, i++)
|
||||
spawn()
|
||||
var/obj/effect/decal/chempuff/D = Sprays[i]
|
||||
if(!D) continue
|
||||
|
||||
// Spreads the sprays a little bit
|
||||
var/turf/my_target = pick(the_targets)
|
||||
the_targets -= my_target
|
||||
|
||||
for(var/j=0, j<=spray_currentrange, j++)
|
||||
step_towards(D, my_target)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/t in get_turf(D))
|
||||
D.reagents.reaction(t)
|
||||
sleep(2)
|
||||
qdel(D)
|
||||
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
to_chat(user, "<span class='notice'>You adjust the output switch. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
|
||||
// Plant-B-Gone
|
||||
/obj/item/reagent_containers/spray/plantbgone // -- Skie
|
||||
name = "Plant-B-Gone"
|
||||
desc = "Kills those pesky weeds!"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbgone"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
list_reagents = list("glyphosate" = 100)
|
||||
/obj/item/reagent_containers/spray
|
||||
name = "spray bottle"
|
||||
desc = "A spray bottle, with an unscrewable top."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cleaner"
|
||||
item_state = "cleaner"
|
||||
flags = NOBLUDGEON
|
||||
container_type = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/spray_maxrange = 3 //what the sprayer will set spray_currentrange to in the attack_self.
|
||||
var/spray_currentrange = 3 //the range of tiles the sprayer will reach when in fixed mode.
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 250
|
||||
possible_transfer_amounts = null
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
|
||||
if(istype(A, /obj/item/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \
|
||||
|| istype(A, /obj/item/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/effect/proc_holder/spell))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1) //this block copypasted from reagent_containers/glass, for lack of a better solution
|
||||
if(!A.reagents.total_volume && A.reagents)
|
||||
to_chat(user, "<span class='notice'>[A] is empty.</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = A.reagents.trans_to(src, 50) //This is a static amount, otherwise, it'll take forever to fill.
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [A].</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume < amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
var/contents_log = reagents.reagent_list.Join(", ")
|
||||
spray(A)
|
||||
|
||||
playsound(loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
|
||||
if(reagents.reagent_list.len == 1 && reagents.has_reagent("cleaner")) // Only show space cleaner logs if it's burning people from being too hot or cold
|
||||
if(reagents.chem_temp < 300 && reagents.chem_temp > 280) // 280 is the cold threshold for slimes, 300 the hot threshold for drask
|
||||
return
|
||||
|
||||
var/attack_log_type = ATKLOG_MOST
|
||||
if(reagents.has_reagent("sacid") || reagents.has_reagent("facid") || reagents.has_reagent("lube"))
|
||||
attack_log_type = ATKLOG_FEW
|
||||
msg_admin_attack("[key_name_admin(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K", attack_log_type)
|
||||
log_game("[key_name(user)] used a spray bottle at [COORD(user)] - Contents: [contents_log] - Temperature: [reagents.chem_temp]K")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/proc/spray(var/atom/A)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_currentrange)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
spawn(0)
|
||||
for(var/i=0, i<spray_currentrange, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
sleep(3)
|
||||
qdel(D)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
spray_currentrange = (spray_currentrange == 1 ? spray_maxrange : 1)
|
||||
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
/obj/item/reagent_containers/spray/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) && user == loc)
|
||||
. += "[round(reagents.total_volume)] units left."
|
||||
|
||||
/obj/item/reagent_containers/spray/verb/empty()
|
||||
|
||||
set name = "Empty Spray Bottle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty [src] onto the floor.</span>")
|
||||
reagents.reaction(usr.loc)
|
||||
reagents.clear_reagents()
|
||||
|
||||
//space cleaner
|
||||
/obj/item/reagent_containers/spray/cleaner
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
list_reagents = list("cleaner" = 250)
|
||||
|
||||
/obj/item/reagent_containers/spray/cleaner/drone
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
volume = 50
|
||||
list_reagents = list("cleaner" = 50)
|
||||
|
||||
//spray tan
|
||||
/obj/item/reagent_containers/spray/spraytan
|
||||
name = "spray tan"
|
||||
volume = 50
|
||||
desc = "Gyaro brand spray tan. Do not spray near eyes or other orifices."
|
||||
list_reagents = list("spraytan" = 50)
|
||||
|
||||
//pepperspray
|
||||
/obj/item/reagent_containers/spray/pepper
|
||||
name = "pepperspray"
|
||||
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "pepperspray"
|
||||
item_state = "pepperspray"
|
||||
volume = 40
|
||||
spray_maxrange = 4
|
||||
amount_per_transfer_from_this = 5
|
||||
list_reagents = list("condensedcapsaicin" = 40)
|
||||
|
||||
//water flower
|
||||
/obj/item/reagent_containers/spray/waterflower
|
||||
name = "water flower"
|
||||
desc = "A seemingly innocent sunflower...with a twist."
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
item_state = "sunflower"
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 10
|
||||
list_reagents = list("water" = 10)
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays
|
||||
return
|
||||
|
||||
//chemsprayer
|
||||
/obj/item/reagent_containers/spray/chemsprayer
|
||||
name = "chem sprayer"
|
||||
desc = "A utility used to spray large amounts of reagents in a given area."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "chemsprayer"
|
||||
item_state = "chemsprayer"
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
spray_maxrange = 7
|
||||
spray_currentrange = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 600
|
||||
origin_tech = "combat=3;materials=3;engineering=3"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/spray(var/atom/A)
|
||||
var/Sprays[3]
|
||||
for(var/i=1, i<=3, i++) // intialize sprays
|
||||
if(reagents.total_volume < 1) break
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
Sprays[i] = D
|
||||
|
||||
var/direction = get_dir(src, A)
|
||||
var/turf/T = get_turf(A)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/i=1, i<=Sprays.len, i++)
|
||||
spawn()
|
||||
var/obj/effect/decal/chempuff/D = Sprays[i]
|
||||
if(!D) continue
|
||||
|
||||
// Spreads the sprays a little bit
|
||||
var/turf/my_target = pick(the_targets)
|
||||
the_targets -= my_target
|
||||
|
||||
for(var/j=0, j<=spray_currentrange, j++)
|
||||
step_towards(D, my_target)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/t in get_turf(D))
|
||||
D.reagents.reaction(t)
|
||||
sleep(2)
|
||||
qdel(D)
|
||||
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/attack_self(var/mob/user)
|
||||
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
to_chat(user, "<span class='notice'>You adjust the output switch. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
|
||||
// Plant-B-Gone
|
||||
/obj/item/reagent_containers/spray/plantbgone // -- Skie
|
||||
name = "Plant-B-Gone"
|
||||
desc = "Kills those pesky weeds!"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbgone"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
list_reagents = list("glyphosate" = 100)
|
||||
|
||||
@@ -1,234 +1,234 @@
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
#define SYRINGE_BROKEN 2
|
||||
|
||||
/obj/item/reagent_containers/syringe
|
||||
name = "Syringe"
|
||||
desc = "A syringe."
|
||||
icon = 'icons/goonstation/objects/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
sharp = TRUE
|
||||
var/busy = FALSE
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/projectile_type = /obj/item/projectile/bullet/dart/syringe
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
container_type = TRANSPARENT
|
||||
|
||||
/obj/item/reagent_containers/syringe/New()
|
||||
..()
|
||||
if(list_reagents) //syringe starts in inject mode if its already got something inside
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/pickup(mob/user)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/storage/bag))
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.holder_full())
|
||||
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 = TRUE
|
||||
if(!do_mob(user, target))
|
||||
busy = FALSE
|
||||
return
|
||||
if(reagents.holder_full())
|
||||
return
|
||||
busy = FALSE
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("<span class='notice'>[user] takes a blood sample from [L].</span>")
|
||||
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(user))
|
||||
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. It now contains [reagents.total_volume] units.</span>")
|
||||
if(reagents.holder_full())
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!L && !target.is_injectable(user)) //only checks on non-living mobs, due to how can_inject() handles
|
||||
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.can_inject(user, TRUE))
|
||||
return
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject you!</span>")
|
||||
if(!do_mob(user, L))
|
||||
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)
|
||||
|
||||
add_attack_logs(user, L, "Injected with [name] containing [contained], transfered [amount_per_transfer_from_this] units", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this / reagents.total_volume, 1)
|
||||
reagents.reaction(L, REAGENT_INGEST, 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/reagent_containers/syringe/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = Clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
else
|
||||
rounded_vol = 0
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if(SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/reagent_containers/syringe/antiviral
|
||||
name = "Syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/charcoal
|
||||
name = "Syringe (charcoal)"
|
||||
desc = "Contains charcoal - used to treat toxins and damage from toxins."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/epinephrine
|
||||
name = "Syringe (Epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/insulin
|
||||
name = "Syringe (insulin)"
|
||||
desc = "Contains insulin - used to treat diabetes."
|
||||
list_reagents = list("insulin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/calomel
|
||||
name = "Syringe (calomel)"
|
||||
desc = "Contains calomel, which be used to purge impurities, but is highly toxic itself."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/heparin
|
||||
name = "Syringe (heparin)"
|
||||
desc = "Contains heparin, a blood anticoagulant."
|
||||
list_reagents = list("heparin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/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/reagent_containers/syringe/capulettium_plus
|
||||
name = "capulettium plus syringe"
|
||||
desc = "For silencing targets. Allows for fake deaths."
|
||||
list_reagents = list("capulettium_plus" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/sarin
|
||||
name = "sarin syringe"
|
||||
desc = "A deadly neurotoxin, for killing."
|
||||
list_reagents = list("sarin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/pancuronium
|
||||
name = "pancuronium syringe"
|
||||
desc = "A powerful paralyzing poison."
|
||||
list_reagents = list("pancuronium" = 15)
|
||||
|
||||
/obj/item/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
|
||||
list_reagents = list("toxin" = 15, "pancuronium" = 10, "cyanide" = 5, "facid" = 10, "fluorine" = 10)
|
||||
#define SYRINGE_DRAW 0
|
||||
#define SYRINGE_INJECT 1
|
||||
#define SYRINGE_BROKEN 2
|
||||
|
||||
/obj/item/reagent_containers/syringe
|
||||
name = "Syringe"
|
||||
desc = "A syringe."
|
||||
icon = 'icons/goonstation/objects/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
sharp = TRUE
|
||||
var/busy = FALSE
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/projectile_type = /obj/item/projectile/bullet/dart/syringe
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
container_type = TRANSPARENT
|
||||
|
||||
/obj/item/reagent_containers/syringe/New()
|
||||
..()
|
||||
if(list_reagents) //syringe starts in inject mode if its already got something inside
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/pickup(mob/user)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/storage/bag))
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.holder_full())
|
||||
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 = TRUE
|
||||
if(!do_mob(user, target))
|
||||
busy = FALSE
|
||||
return
|
||||
if(reagents.holder_full())
|
||||
return
|
||||
busy = FALSE
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("<span class='notice'>[user] takes a blood sample from [L].</span>")
|
||||
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(user))
|
||||
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. It now contains [reagents.total_volume] units.</span>")
|
||||
if(reagents.holder_full())
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!L && !target.is_injectable(user)) //only checks on non-living mobs, due to how can_inject() handles
|
||||
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.can_inject(user, TRUE))
|
||||
return
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject you!</span>")
|
||||
if(!do_mob(user, L))
|
||||
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)
|
||||
|
||||
add_attack_logs(user, L, "Injected with [name] containing [contained], transfered [amount_per_transfer_from_this] units", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this / reagents.total_volume, 1)
|
||||
reagents.reaction(L, REAGENT_INGEST, 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/reagent_containers/syringe/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = Clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
else
|
||||
rounded_vol = 0
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if(SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/reagent_containers/syringe/antiviral
|
||||
name = "Syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/charcoal
|
||||
name = "Syringe (charcoal)"
|
||||
desc = "Contains charcoal - used to treat toxins and damage from toxins."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/epinephrine
|
||||
name = "Syringe (Epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/insulin
|
||||
name = "Syringe (insulin)"
|
||||
desc = "Contains insulin - used to treat diabetes."
|
||||
list_reagents = list("insulin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/calomel
|
||||
name = "Syringe (calomel)"
|
||||
desc = "Contains calomel, which be used to purge impurities, but is highly toxic itself."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/heparin
|
||||
name = "Syringe (heparin)"
|
||||
desc = "Contains heparin, a blood anticoagulant."
|
||||
list_reagents = list("heparin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/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/reagent_containers/syringe/capulettium_plus
|
||||
name = "capulettium plus syringe"
|
||||
desc = "For silencing targets. Allows for fake deaths."
|
||||
list_reagents = list("capulettium_plus" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/sarin
|
||||
name = "sarin syringe"
|
||||
desc = "A deadly neurotoxin, for killing."
|
||||
list_reagents = list("sarin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/pancuronium
|
||||
name = "pancuronium syringe"
|
||||
desc = "A powerful paralyzing poison."
|
||||
list_reagents = list("pancuronium" = 15)
|
||||
|
||||
/obj/item/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
|
||||
list_reagents = list("toxin" = 15, "pancuronium" = 10, "cyanide" = 5, "facid" = 10, "fluorine" = 10)
|
||||
|
||||
@@ -1,278 +1,278 @@
|
||||
/obj/structure/reagent_dispensers
|
||||
name = "Dispenser"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "watertank"
|
||||
density = 1
|
||||
anchored = 0
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
container_type = DRAINABLE | AMOUNT_VISIBLE
|
||||
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
|
||||
var/lastrigger = "" // The last person to rig this fuel tank - Stored with the object. Only the last person matter for investigation
|
||||
|
||||
/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/I, mob/user, params)
|
||||
if(I.is_refillable())
|
||||
return FALSE //so we can refill them via their afterattack.
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/New()
|
||||
create_reagents(tank_volume)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
..()
|
||||
|
||||
/obj/structure/reagent_dispensers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(reagents)
|
||||
for(var/i in 1 to 8)
|
||||
if(reagents)
|
||||
reagents.temperature_reagents(exposed_temperature)
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>[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)
|
||||
|
||||
//Dispensers
|
||||
/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/oil
|
||||
name = "oil tank"
|
||||
desc = "A tank of oil, commonly used to by robotics to fix leaking IPCs or just to loosen up those rusted underused parts."
|
||||
icon_state = "oil"
|
||||
reagent_id = "oil"
|
||||
tank_volume = 3000
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank
|
||||
name = "fuel tank"
|
||||
desc = "A tank full of industrial welding fuel. Do not consume."
|
||||
icon_state = "fuel"
|
||||
reagent_id = "fuel"
|
||||
tank_volume = 4000
|
||||
var/obj/item/assembly_holder/rig = null
|
||||
var/accepts_rig = 1
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Destroy()
|
||||
QDEL_NULL(rig)
|
||||
return ..()
|
||||
|
||||
/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)))
|
||||
message_admins("[key_name_admin(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)] ")
|
||||
log_game("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]")
|
||||
investigate_log("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/boom(rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion
|
||||
if(rigtrigger) // If the explosion is triggered by an assembly holder
|
||||
message_admins("A fueltank, last rigged by [lastrigger], was triggered at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank
|
||||
log_game("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]")
|
||||
investigate_log("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
if(reagents)
|
||||
reagents.set_reagent_temp(1000) //uh-oh
|
||||
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(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/tesla_act()
|
||||
..() //extend the zap
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2 && rig)
|
||||
. += "<span class='notice'>There is some kind of device rigged to the tank.</span>"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attack_hand()
|
||||
if(rig)
|
||||
usr.visible_message("<span class='notice'>[usr] begins to detach [rig] from [src].</span>", "<span class='notice'>You begin to detach [rig] from [src].</span>")
|
||||
if(do_after(usr, 20, target = src))
|
||||
usr.visible_message("<span class='notice'>[usr] detaches [rig] from [src].</span>", "<span class='notice'>You detach [rig] from [src].</span>")
|
||||
rig.forceMove(get_turf(usr))
|
||||
rig = null
|
||||
lastrigger = null
|
||||
overlays.Cut()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/assembly_holder) && accepts_rig)
|
||||
if(rig)
|
||||
to_chat(user, "<span class='warning'>There is another device in the way.</span>")
|
||||
return ..()
|
||||
user.visible_message("[user] begins rigging [I] to [src].", "You begin rigging [I] to [src]")
|
||||
if(do_after(user, 20, target = src))
|
||||
user.visible_message("<span class='notice'>[user] rigs [I] to [src].</span>", "<span class='notice'>You rig [I] to [src].</span>")
|
||||
|
||||
var/obj/item/assembly_holder/H = I
|
||||
if(istype(H.a_left, /obj/item/assembly/igniter) || istype(H.a_right, /obj/item/assembly/igniter))
|
||||
msg_admin_attack("[key_name_admin(user)] rigged [src.name] with [I.name] for explosion (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", ATKLOG_FEW)
|
||||
log_game("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]")
|
||||
investigate_log("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
|
||||
lastrigger = "[key_name(user)]"
|
||||
rig = H
|
||||
user.drop_item()
|
||||
H.forceMove(src)
|
||||
|
||||
var/icon/test = getFlatIcon(H)
|
||||
test.Shift(NORTH, 1)
|
||||
test.Shift(EAST, 6)
|
||||
overlays += test
|
||||
else
|
||||
return ..()
|
||||
|
||||
obj/structure/reagent_dispensers/fueltank/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!reagents.has_reagent("fuel"))
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
if(I.tool_enabled && I.use_tool(src, user, volume = I.tool_volume)) //check it's enabled first to prevent duplicate messages when refuelling
|
||||
user.visible_message("<span class='danger'>[user] catastrophically fails at refilling [user.p_their()] [I]!</span>", "<span class='userdanger'>That was stupid of you.</span>")
|
||||
message_admins("[key_name_admin(user)] triggered a fueltank explosion at [COORD(loc)]")
|
||||
log_game("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]")
|
||||
investigate_log("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
boom()
|
||||
else
|
||||
I.refill(user, src, reagents.get_reagent_amount("fuel")) //Try dump all fuel into the welder
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Move()
|
||||
..()
|
||||
if(rig)
|
||||
rig.process_movement()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/HasProximity(atom/movable/AM)
|
||||
if(rig)
|
||||
rig.HasProximity(AM)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Crossed(atom/movable/AM, oldloc)
|
||||
if(rig)
|
||||
rig.Crossed(AM, oldloc)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/hear_talk(mob/living/M, list/message_pieces)
|
||||
if(rig)
|
||||
rig.hear_talk(M, message_pieces)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/hear_message(mob/living/M, msg)
|
||||
if(rig)
|
||||
rig.hear_message(M, msg)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Bump()
|
||||
..()
|
||||
if(rig)
|
||||
rig.process_movement()
|
||||
|
||||
|
||||
/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/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
|
||||
reagent_id = "water"
|
||||
var/paper_cups = 25 //Paper cups left from the cooler
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
. += "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/reagent_containers/food/drinks/sillycup/S = new(get_turf(src))
|
||||
user.put_in_hands(S)
|
||||
paper_cups--
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
default_unfasten_wrench(user, I, 40)
|
||||
|
||||
/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(loc, 0, 3, 5, 7, 10)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/nuke
|
||||
name = "Nanotrasen-brand nuclear fission explosive"
|
||||
desc = "One of the more successful achievements of the Nanotrasen Corporate Warfare Division, their nuclear fission explosives are renowned for being cheap\
|
||||
to produce and devestatingly effective. Signs explain that though this is just a model, every Nanotrasen station is equipped with one, just in case. \
|
||||
All Captains carefully guard the disk needed to detonate them - at least, the sign says they do. There seems to be a tap on the back."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "nuclearbomb0"
|
||||
|
||||
/obj/structure/reagent_dispensers/virusfood
|
||||
name = "virus food dispenser"
|
||||
desc = "A dispenser of low-potency virus mutagenic."
|
||||
icon_state = "virus_food"
|
||||
anchored = 1
|
||||
density = 0
|
||||
reagent_id = "virusfood"
|
||||
|
||||
/obj/structure/reagent_dispensers/spacecleanertank
|
||||
name = "space cleaner refiller"
|
||||
desc = "Refills space cleaner bottles."
|
||||
icon_state = "cleaner"
|
||||
anchored = 1
|
||||
density = 0
|
||||
tank_volume = 5000
|
||||
reagent_id = "cleaner"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/chem
|
||||
icon_state = "fuel_chem"
|
||||
anchored = 1
|
||||
density = 0
|
||||
accepts_rig = 0
|
||||
tank_volume = 1000
|
||||
/obj/structure/reagent_dispensers
|
||||
name = "Dispenser"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "watertank"
|
||||
density = 1
|
||||
anchored = 0
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
container_type = DRAINABLE | AMOUNT_VISIBLE
|
||||
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
|
||||
var/lastrigger = "" // The last person to rig this fuel tank - Stored with the object. Only the last person matter for investigation
|
||||
|
||||
/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/I, mob/user, params)
|
||||
if(I.is_refillable())
|
||||
return FALSE //so we can refill them via their afterattack.
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/New()
|
||||
create_reagents(tank_volume)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
..()
|
||||
|
||||
/obj/structure/reagent_dispensers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(reagents)
|
||||
for(var/i in 1 to 8)
|
||||
if(reagents)
|
||||
reagents.temperature_reagents(exposed_temperature)
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>[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)
|
||||
|
||||
//Dispensers
|
||||
/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/oil
|
||||
name = "oil tank"
|
||||
desc = "A tank of oil, commonly used to by robotics to fix leaking IPCs or just to loosen up those rusted underused parts."
|
||||
icon_state = "oil"
|
||||
reagent_id = "oil"
|
||||
tank_volume = 3000
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank
|
||||
name = "fuel tank"
|
||||
desc = "A tank full of industrial welding fuel. Do not consume."
|
||||
icon_state = "fuel"
|
||||
reagent_id = "fuel"
|
||||
tank_volume = 4000
|
||||
var/obj/item/assembly_holder/rig = null
|
||||
var/accepts_rig = 1
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Destroy()
|
||||
QDEL_NULL(rig)
|
||||
return ..()
|
||||
|
||||
/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)))
|
||||
message_admins("[key_name_admin(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)] ")
|
||||
log_game("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]")
|
||||
investigate_log("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/boom(rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion
|
||||
if(rigtrigger) // If the explosion is triggered by an assembly holder
|
||||
message_admins("A fueltank, last rigged by [lastrigger], was triggered at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank
|
||||
log_game("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]")
|
||||
investigate_log("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
if(reagents)
|
||||
reagents.set_reagent_temp(1000) //uh-oh
|
||||
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(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/tesla_act()
|
||||
..() //extend the zap
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2 && rig)
|
||||
. += "<span class='notice'>There is some kind of device rigged to the tank.</span>"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attack_hand()
|
||||
if(rig)
|
||||
usr.visible_message("<span class='notice'>[usr] begins to detach [rig] from [src].</span>", "<span class='notice'>You begin to detach [rig] from [src].</span>")
|
||||
if(do_after(usr, 20, target = src))
|
||||
usr.visible_message("<span class='notice'>[usr] detaches [rig] from [src].</span>", "<span class='notice'>You detach [rig] from [src].</span>")
|
||||
rig.forceMove(get_turf(usr))
|
||||
rig = null
|
||||
lastrigger = null
|
||||
overlays.Cut()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/assembly_holder) && accepts_rig)
|
||||
if(rig)
|
||||
to_chat(user, "<span class='warning'>There is another device in the way.</span>")
|
||||
return ..()
|
||||
user.visible_message("[user] begins rigging [I] to [src].", "You begin rigging [I] to [src]")
|
||||
if(do_after(user, 20, target = src))
|
||||
user.visible_message("<span class='notice'>[user] rigs [I] to [src].</span>", "<span class='notice'>You rig [I] to [src].</span>")
|
||||
|
||||
var/obj/item/assembly_holder/H = I
|
||||
if(istype(H.a_left, /obj/item/assembly/igniter) || istype(H.a_right, /obj/item/assembly/igniter))
|
||||
msg_admin_attack("[key_name_admin(user)] rigged [src.name] with [I.name] for explosion (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", ATKLOG_FEW)
|
||||
log_game("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]")
|
||||
investigate_log("[key_name(user)] rigged [src.name] with [I.name] for explosion at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
|
||||
lastrigger = "[key_name(user)]"
|
||||
rig = H
|
||||
user.drop_item()
|
||||
H.forceMove(src)
|
||||
|
||||
var/icon/test = getFlatIcon(H)
|
||||
test.Shift(NORTH, 1)
|
||||
test.Shift(EAST, 6)
|
||||
overlays += test
|
||||
else
|
||||
return ..()
|
||||
|
||||
obj/structure/reagent_dispensers/fueltank/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!reagents.has_reagent("fuel"))
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
if(I.tool_enabled && I.use_tool(src, user, volume = I.tool_volume)) //check it's enabled first to prevent duplicate messages when refuelling
|
||||
user.visible_message("<span class='danger'>[user] catastrophically fails at refilling [user.p_their()] [I]!</span>", "<span class='userdanger'>That was stupid of you.</span>")
|
||||
message_admins("[key_name_admin(user)] triggered a fueltank explosion at [COORD(loc)]")
|
||||
log_game("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]")
|
||||
investigate_log("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
boom()
|
||||
else
|
||||
I.refill(user, src, reagents.get_reagent_amount("fuel")) //Try dump all fuel into the welder
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Move()
|
||||
..()
|
||||
if(rig)
|
||||
rig.process_movement()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/HasProximity(atom/movable/AM)
|
||||
if(rig)
|
||||
rig.HasProximity(AM)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Crossed(atom/movable/AM, oldloc)
|
||||
if(rig)
|
||||
rig.Crossed(AM, oldloc)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/hear_talk(mob/living/M, list/message_pieces)
|
||||
if(rig)
|
||||
rig.hear_talk(M, message_pieces)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/hear_message(mob/living/M, msg)
|
||||
if(rig)
|
||||
rig.hear_message(M, msg)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Bump()
|
||||
..()
|
||||
if(rig)
|
||||
rig.process_movement()
|
||||
|
||||
|
||||
/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/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
|
||||
reagent_id = "water"
|
||||
var/paper_cups = 25 //Paper cups left from the cooler
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
. += "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/reagent_containers/food/drinks/sillycup/S = new(get_turf(src))
|
||||
user.put_in_hands(S)
|
||||
paper_cups--
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
default_unfasten_wrench(user, I, 40)
|
||||
|
||||
/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(loc, 0, 3, 5, 7, 10)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/nuke
|
||||
name = "Nanotrasen-brand nuclear fission explosive"
|
||||
desc = "One of the more successful achievements of the Nanotrasen Corporate Warfare Division, their nuclear fission explosives are renowned for being cheap\
|
||||
to produce and devestatingly effective. Signs explain that though this is just a model, every Nanotrasen station is equipped with one, just in case. \
|
||||
All Captains carefully guard the disk needed to detonate them - at least, the sign says they do. There seems to be a tap on the back."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "nuclearbomb0"
|
||||
|
||||
/obj/structure/reagent_dispensers/virusfood
|
||||
name = "virus food dispenser"
|
||||
desc = "A dispenser of low-potency virus mutagenic."
|
||||
icon_state = "virus_food"
|
||||
anchored = 1
|
||||
density = 0
|
||||
reagent_id = "virusfood"
|
||||
|
||||
/obj/structure/reagent_dispensers/spacecleanertank
|
||||
name = "space cleaner refiller"
|
||||
desc = "Refills space cleaner bottles."
|
||||
icon_state = "cleaner"
|
||||
anchored = 1
|
||||
density = 0
|
||||
tank_volume = 5000
|
||||
reagent_id = "cleaner"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/chem
|
||||
icon_state = "fuel_chem"
|
||||
anchored = 1
|
||||
density = 0
|
||||
accepts_rig = 0
|
||||
tank_volume = 1000
|
||||
|
||||
Reference in New Issue
Block a user