This commit is contained in:
Improvedname
2020-03-22 19:17:51 +01:00
parent 1bbb7d1a94
commit 78786b28da
57 changed files with 1354 additions and 207 deletions
@@ -125,12 +125,6 @@
else
cut_overlays()
/obj/machinery/computer/pandemic/proc/eject_beaker()
if(beaker)
beaker.forceMove(drop_location())
beaker = null
update_icon()
/obj/machinery/computer/pandemic/ui_interact(mob/user, ui_key = "main", datum/tgui/ui, force_open = FALSE, datum/tgui/master_ui, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -165,7 +159,7 @@
return
switch(action)
if("eject_beaker")
eject_beaker()
replace_beaker(usr)
. = TRUE
if("empty_beaker")
if(beaker)
@@ -174,7 +168,7 @@
if("empty_eject_beaker")
if(beaker)
beaker.reagents.clear_reagents()
eject_beaker()
replace_beaker(usr)
. = TRUE
if("rename_disease")
var/id = get_virus_id_by_index(text2num(params["index"]))
@@ -232,18 +226,32 @@
. = TRUE //no afterattack
if(stat & (NOPOWER|BROKEN))
return
if(beaker)
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
var/obj/item/reagent_containers/B = I
if(!user.transferItemToLoc(B, src))
return
if(!user.transferItemToLoc(I, src))
return
beaker = I
replace_beaker(user, B)
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
update_icon()
else
return ..()
/obj/machinery/computer/pandemic/AltClick(mob/living/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
replace_beaker(user)
return
/obj/machinery/computer/pandemic/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
if(beaker)
beaker.forceMove(drop_location())
if(user && Adjacent(user) && !issiliconoradminghost(user))
user.put_in_hands(beaker)
if(new_beaker)
beaker = new_beaker
else
beaker = null
update_icon()
return TRUE
/obj/machinery/computer/pandemic/on_deconstruction()
eject_beaker()
replace_beaker(usr)
. = ..()
@@ -236,10 +236,12 @@
/datum/reagent/medicine/silver_sulfadiazine
name = "Silver Sulfadiazine"
id = "silver_sulfadiazine"
description = "If used in touch-based applications, immediately restores burn wounds as well as restoring more over time. If ingested through other means, deals minor toxin damage."
description = "If used in touch-based applications, immediately restores burn wounds as well as restoring more over time. It is mildly poisonous taken orally or by injection. If overdosed, deals brute and minor liver damage."
reagent_state = LIQUID
pH = 7.2
color = "#ffeac9"
metabolization_rate = 5 * REAGENTS_METABOLISM
overdose_threshold = 50
/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
if(iscarbon(M) && M.stat != DEAD)
@@ -260,6 +262,15 @@
..()
. = 1
/datum/reagent/medicine/silver_sulfadiazine/overdose_start(mob/living/M)
metabolization_rate = 15 * REAGENTS_METABOLISM
M.adjustBruteLoss(2*REM, 0)
if(iscarbon(M))
var/mob/living/carbon/C = M
C.applyLiverDamage(1)
..()
. = 1
/datum/reagent/medicine/oxandrolone
name = "Oxandrolone"
id = "oxandrolone"
@@ -287,10 +298,12 @@
/datum/reagent/medicine/styptic_powder
name = "Styptic Powder"
id = "styptic_powder"
description = "If used in touch-based applications, immediately restores bruising as well as restoring more over time. If ingested through other means, deals minor toxin damage."
description = "If used in touch-based applications, immediately restores bruising as well as restoring more over time. It is poisonous if taken orally or by injection. If overdosed, deals brute and minor liver damage."
reagent_state = LIQUID
color = "#FF9696"
pH = 6.7
metabolization_rate = 5 * REAGENTS_METABOLISM
overdose_threshold = 50
/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
if(iscarbon(M) && M.stat != DEAD)
@@ -312,6 +325,15 @@
..()
. = 1
datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
metabolization_rate = 15 * REAGENTS_METABOLISM
M.adjustBruteLoss(2*REM, 0)
if(iscarbon(M))
var/mob/living/carbon/C = M
C.applyLiverDamage(1)
..()
. = 1
/datum/reagent/medicine/salglu_solution
name = "Saline-Glucose Solution"
id = "salglu_solution"
@@ -398,23 +420,35 @@
/datum/reagent/medicine/synthflesh
name = "Synthflesh"
id = "synthflesh"
description = "Has a 100% chance of instantly healing brute and burn damage. One unit of the chemical will heal one point of damage. Touch application only."
description = "Has a 100% chance of healing large amounts of brute and burn damage very quickly. One unit of the chemical will heal one point of damage. Touch application only."
reagent_state = LIQUID
color = "#FFEBEB"
pH = 11.5
metabolization_rate = 5 * REAGENTS_METABOLISM
overdose_threshold = 40
/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1)
if(iscarbon(M))
if (M.stat == DEAD)
show_message = 0
if(method in list(PATCH, TOUCH))
M.adjustBruteLoss(-1.25 * reac_volume)
M.adjustFireLoss(-1.25 * reac_volume)
if(method in list(INGEST, VAPOR))
var/mob/living/carbon/C = M
C.losebreath++
C.emote("cough")
to_chat(M, "<span class='danger'>You feel your throat closing up!</span>")
else if(method == INJECT)
return
else if(method in list(PATCH, TOUCH))
M.adjustBruteLoss(-1 * reac_volume)
M.adjustFireLoss(-1 * reac_volume)
if(show_message)
to_chat(M, "<span class='danger'>You feel your burns and bruises healing! It stings like hell!</span>")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
..()
/datum/reagent/medicine/synthflesh/overdose_start(mob/living/M)
metabolization_rate = 15 * REAGENTS_METABOLISM
/datum/reagent/medicine/charcoal
name = "Charcoal"
id = "charcoal"
@@ -19,8 +19,8 @@
var/can_fill_from_container = TRUE
var/apply_type = PATCH
var/apply_method = "spray"
var/self_delay = 30
var/squirt_mode = 0
var/self_delay = 3 SECONDS
var/squirt_mode = FALSE
var/squirt_amount = 5
/obj/item/reagent_containers/medspray/attack_self(mob/user)
@@ -31,40 +31,51 @@
amount_per_transfer_from_this = initial(amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You will now apply the medspray's contents in [squirt_mode ? "short bursts":"extended sprays"]. You'll now use [amount_per_transfer_from_this] units per use.</span>")
/obj/item/reagent_containers/medspray/attack(mob/M, mob/user, def_zone)
/obj/item/reagent_containers/medspray/attack(mob/living/L, mob/user, def_zone)
if(!reagents || !reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
if(M == user)
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src] on [user.p_them()]self.</span>")
if(ishuman(L))
var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected))
if(!affecting)
to_chat(user, "<span class='warning'>The limb is missing!</span>")
return
if(!L.can_inject(user, TRUE, user.zone_selected, FALSE, TRUE)) //stopped by clothing, like patches
return
if(affecting.status != BODYPART_ORGANIC)
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
return
if(L == user)
L.visible_message("<span class='notice'>[user] attempts to [apply_method] [src] on [user.p_them()]self.</span>")
if(self_delay)
if(!do_mob(user, M, self_delay))
if(!do_mob(user, L, self_delay))
return
if(!reagents || !reagents.total_volume)
return
to_chat(M, "<span class='notice'>You [apply_method] yourself with [src].</span>")
to_chat(L, "<span class='notice'>You [apply_method] yourself with [src].</span>")
else
log_combat(user, M, "attempted to apply", src, reagents.log_list())
M.visible_message("<span class='danger'>[user] attempts to [apply_method] [src] on [M].</span>", \
"<span class='userdanger'>[user] attempts to [apply_method] [src] on [M].</span>")
if(!do_mob(user, M))
log_combat(user, L, "attempted to apply", src, reagents.log_list())
L.visible_message("<span class='danger'>[user] attempts to [apply_method] [src] on [L].</span>", \
"<span class='userdanger'>[user] attempts to [apply_method] [src] on [L].</span>")
if(!do_mob(user, L))
return
if(!reagents || !reagents.total_volume)
return
M.visible_message("<span class='danger'>[user] [apply_method]s [M] down with [src].</span>", \
"<span class='userdanger'>[user] [apply_method]s [M] down with [src].</span>")
L.visible_message("<span class='danger'>[user] [apply_method]s [L] down with [src].</span>", \
"<span class='userdanger'>[user] [apply_method]s [L] down with [src].</span>")
if(!reagents || !reagents.total_volume)
return
else
log_combat(user, M, "applied", src, reagents.log_list())
log_combat(user, L, "applied", src, reagents.log_list())
playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6)
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
reagents.reaction(M, apply_type, fraction)
reagents.trans_to(M, amount_per_transfer_from_this)
reagents.reaction(L, apply_type, fraction)
reagents.trans_to(L, amount_per_transfer_from_this)
return
/obj/item/reagent_containers/medspray/styptic