Merge branch 'master' into spike-loot-differentces

This commit is contained in:
Trilbyspaceclone
2020-08-03 10:53:08 -04:00
committed by GitHub
2245 changed files with 150873 additions and 463893 deletions
@@ -13,7 +13,7 @@
/obj/item/reagent_containers/blood/Initialize()
. = ..()
if(blood_type != null)
reagents.add_reagent(/datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_colour"=color, "blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
reagents.add_reagent(/datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"bloodcolor"=bloodtype_to_color(blood_type), "blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
update_icon()
/obj/item/reagent_containers/blood/on_reagent_change(changetype)
@@ -0,0 +1,51 @@
/obj/item/reagent_containers/chem_pack
name = "intravenous medicine bag"
desc = "A plastic pressure bag, or 'chem pack', for IV administration of drugs. It is fitted with a thermosealing strip."
icon = 'icons/obj/bloodpack.dmi'
icon_state = "chempack"
volume = 100
reagent_flags = OPENCONTAINER
spillable = TRUE
obj_flags = UNIQUE_RENAME
resistance_flags = ACID_PROOF
var/sealed = FALSE
/obj/item/reagent_containers/chem_pack/on_reagent_change(changetype)
update_icon()
/obj/item/reagent_containers/chem_pack/update_icon()
cut_overlays()
var/v = min(round(reagents.total_volume / volume * 10), 10)
if(v > 0)
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "chempack1")
filling.icon_state = "chempack[v]"
filling.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling)
/obj/item/reagent_containers/chem_pack/AltClick(mob/living/user)
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERY) && !sealed)
if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)))
to_chat(user, "<span class='warning'>Uh... whoops! You accidentally spill the content of the bag onto yourself.</span>")
SplashReagents(user)
return
else
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAWABLE |INJECTABLE )
spillable = FALSE
sealed = TRUE
to_chat(user, "<span class='notice'>You seal the bag.</span>")
/obj/item/reagent_containers/chem_pack/examine()
. = ..()
if(sealed)
. += "<span class='notice'>The bag is sealed shut.</span>"
else
. += "<span class='notice'>Alt-click to seal it.</span>"
obj/item/reagent_containers/chem_pack/attack_self(mob/user)
if(sealed)
return
..()
@@ -9,6 +9,11 @@
container_HP = 2
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
// WARNING: This entire section is shitcode and prone to breaking at any time.
INVOKE_ASYNC(src, .proc/attempt_feed, M, user, target) // for example, the arguments in this proc are wrong
// but i don't have time to properly fix it right now.
/obj/item/reagent_containers/glass/proc/attempt_feed(mob/M, mob/user, obj/target)
if(!canconsume(M, user))
return
@@ -386,6 +391,20 @@
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
list_reagents = list()
/obj/item/reagent_containers/glass/beaker/waterbottle/wataur
name = "Bottled Wataur"
desc = "Finally, a bottle as proportionate as you."
icon = 'icons/obj/drinks.dmi'
icon_state = "wataur"
custom_materials = list(/datum/material/plastic=0)
list_reagents = list(/datum/reagent/water = 100)
volume = 100
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(5,10,15,20,25,30,50, 100)
container_flags = TEMP_WEAK|APTFT_ALTCLICK|APTFT_VERB
container_HP = 1
cached_icon = "wataur"
/obj/item/reagent_containers/glass/get_belt_overlay()
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "bottle")
@@ -90,12 +90,12 @@
item_state = "medipen"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
amount_per_transfer_from_this = 13
volume = 13
amount_per_transfer_from_this = 15
volume = 15
ignore_flags = 1 //so you can medipen through hardsuits
reagent_flags = DRAWABLE
flags_1 = null
list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/preservahyde = 3)
list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/preservahyde = 3, /datum/reagent/medicine/coagulant = 2)
custom_premium_price = PRICE_ALMOST_EXPENSIVE
/obj/item/reagent_containers/hypospray/medipen/suicide_act(mob/living/carbon/user)
@@ -133,6 +133,13 @@
else
. += "<span class='notice'>It is spent.</span>"
/obj/item/reagent_containers/hypospray/medipen/ekit
name = "emergency first-aid autoinjector"
desc = "An epinephrine medipen with trace amounts of coagulants and antibiotics to help stabilize bad cuts and burns."
volume = 15
amount_per_transfer_from_this = 15
list_reagents = list(/datum/reagent/medicine/epinephrine = 12, /datum/reagent/medicine/coagulant = 2.5, /datum/reagent/medicine/spaceacillin = 0.5)
/obj/item/reagent_containers/hypospray/medipen/stimulants
name = "illegal stimpack medipen"
desc = "A highly illegal medipen due to its load and small injections, allow for five uses before being drained"
@@ -354,13 +361,17 @@
obj_flags |= EMAGGED
return TRUE
/obj/item/hypospray/mkii/attack_hand(mob/user)
/obj/item/hypospray/mkii/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..() //Don't bother changing this or removing it from containers will break.
/obj/item/hypospray/mkii/attack(obj/item/I, mob/user, params)
return
/obj/item/hypospray/mkii/afterattack(atom/target, mob/user, proximity)
. = ..()
INVOKE_ASYNC(src, .proc/attempt_inject, target, user, proximity)
/obj/item/hypospray/mkii/proc/attempt_inject(atom/target, mob/user, proximity)
if(!vial || !proximity || !isliving(target))
return
var/mob/living/L = target
@@ -88,7 +88,7 @@
user.visible_message("<span class='notice'>[user] inserts a power cell into [src].</span>", "<span class='notice'>You insert the power cell into [src].</span>")
update_icon()
/obj/item/reagent_containers/glass/maunamug/attack_hand(mob/living/user)
/obj/item/reagent_containers/glass/maunamug/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
if(cell && open)
cell.update_icon()
user.put_in_hands(cell)
@@ -11,8 +11,8 @@
grind_results = list()
var/apply_type = INGEST
var/apply_method = "swallow"
var/roundstart = 0
var/self_delay = 0 //pills are instant, this is because patches inheret their aplication from pills
var/roundstart = FALSE
var/self_delay = FALSE //pills are instant, this is because patches inheret their aplication from pills
var/dissolvable = TRUE
/obj/item/reagent_containers/pill/Initialize()
@@ -28,22 +28,24 @@
/obj/item/reagent_containers/pill/get_w_volume() // DEFAULT_VOLUME_TINY at 25u, DEFAULT_VOLUME_SMALL at 50u
return DEFAULT_VOLUME_TINY/2 + reagents.total_volume / reagents.maximum_volume * DEFAULT_VOLUME_TINY
/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone)
/obj/item/reagent_containers/pill/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1)
INVOKE_ASYNC(src, .proc/attempt_feed, M, user)
/obj/item/reagent_containers/pill/proc/attempt_feed(mob/living/M, mob/living/user)
if(!canconsume(M, user))
return 0
return FALSE
if(M == user)
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>")
if(self_delay)
if(!do_mob(user, M, self_delay))
return 0
return FALSE
to_chat(M, "<span class='notice'>You [apply_method] [src].</span>")
else
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \
"<span class='userdanger'>[user] attempts to force [M] to [apply_method] [src].</span>")
if(!do_mob(user, M))
return 0
return FALSE
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \
"<span class='userdanger'>[user] forces [M] to [apply_method] [src].</span>")
@@ -56,8 +58,7 @@
reagents.reaction(M, apply_type)
reagents.trans_to(M, reagents.total_volume)
qdel(src)
return 1
return TRUE
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity)
. = ..()
@@ -77,125 +78,133 @@
"<span class='notice'>You dissolve [src] in [target].</span>", vision_distance = 2)
reagents.trans_to(target, reagents.total_volume)
qdel(src)
return STOP_ATTACK_PROC_CHAIN
/obj/item/reagent_containers/pill/tox
name = "toxins pill"
desc = "Highly toxic."
icon_state = "pill5"
list_reagents = list(/datum/reagent/toxin = 50)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/cyanide
name = "cyanide pill"
desc = "Don't swallow this."
icon_state = "pill5"
list_reagents = list(/datum/reagent/toxin/cyanide = 50)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/adminordrazine
name = "adminordrazine pill"
desc = "It's magic. We don't have to explain it."
icon_state = "pill16"
list_reagents = list(/datum/reagent/medicine/adminordrazine = 50)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/morphine
name = "morphine pill"
desc = "Commonly used to treat insomnia."
icon_state = "pill8"
list_reagents = list(/datum/reagent/medicine/morphine = 30)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/stimulant
name = "stimulant pill"
desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!"
icon_state = "pill19"
list_reagents = list(/datum/reagent/medicine/ephedrine = 10, /datum/reagent/medicine/antihol = 10, /datum/reagent/consumable/coffee = 30)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/salbutamol
name = "salbutamol pill"
desc = "Used to treat oxygen deprivation."
icon_state = "pill16"
list_reagents = list(/datum/reagent/medicine/salbutamol = 30)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/charcoal
name = "charcoal pill"
desc = "Neutralizes many common toxins."
icon_state = "pill17"
list_reagents = list(/datum/reagent/medicine/charcoal = 10)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/epinephrine
name = "epinephrine pill"
desc = "Used to stabilize patients."
icon_state = "pill5"
list_reagents = list(/datum/reagent/medicine/epinephrine = 15)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/mannitol
name = "mannitol pill"
desc = "Used to treat brain damage."
icon_state = "pill17"
list_reagents = list(/datum/reagent/medicine/mannitol = 25)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/mutadone
name = "mutadone pill"
desc = "Used to treat genetic damage."
icon_state = "pill20"
list_reagents = list(/datum/reagent/medicine/mutadone = 25)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/salicyclic
name = "salicylic acid pill"
desc = "Used to dull pain."
icon_state = "pill9"
list_reagents = list(/datum/reagent/medicine/sal_acid = 24)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/oxandrolone
name = "oxandrolone pill"
desc = "Used to stimulate burn healing."
icon_state = "pill11"
list_reagents = list(/datum/reagent/medicine/oxandrolone = 24)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/insulin
name = "insulin pill"
desc = "Handles hyperglycaemic coma."
icon_state = "pill18"
list_reagents = list(/datum/reagent/medicine/insulin = 50)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/psicodine
name = "psicodine pill"
desc = "Used to treat mental instability and traumas."
desc = "Used to treat mental instability and phobias."
list_reagents = list(/datum/reagent/medicine/psicodine = 10)
icon_state = "pill22"
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/antirad
name = "potassium iodide pill"
desc = "Used to treat radition used to counter radiation poisoning."
icon_state = "pill18"
list_reagents = list(/datum/reagent/medicine/potass_iodide = 50)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/antirad_plus
name = "prussian blue pill"
desc = "Used to treat heavy radition poisoning."
icon_state = "prussian_blue"
list_reagents = list(/datum/reagent/medicine/prussian_blue = 25)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/mutarad
name = "radiation treatment deluxe pill"
desc = "Used to treat heavy radition poisoning and genetic defects."
icon_state = "anit_rad_fixgene"
list_reagents = list(/datum/reagent/medicine/prussian_blue = 10, /datum/reagent/medicine/potass_iodide = 10, /datum/reagent/medicine/mutadone = 5)
roundstart = 1
roundstart = TRUE
/obj/item/reagent_containers/pill/neurine
name = "neurine pill"
desc = "Used to treat non-severe mental traumas."
list_reagents = list("neurine" = 10)
icon_state = "pill22"
roundstart = TRUE
///////////////////////////////////////// this pill is used only in a legion mob drop
/obj/item/reagent_containers/pill/shadowtoxin
@@ -36,26 +36,29 @@
var/reagentlist = pretty_string_from_reagent_list(reagents)
var/log_object = "a damp rag containing [reagentlist]"
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
reagents.reaction(C, INGEST)
reagents.trans_to(C, 5)
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
log_combat(user, C, "smothered", log_object)
C.visible_message("<span class='danger'>[user] is trying to smother \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] is trying to smother you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
if(do_after(user, 20, target = C))
reagents.reaction(C, INGEST)
reagents.trans_to(C, 5)
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and a heavy breath taken.</span>")
log_combat(user, C, "smothered", log_object)
else
reagents.reaction(C, TOUCH)
reagents.remove_all(5)
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
log_combat(user, C, "touched", log_object)
C.visible_message("<span class='notice'>[user] is trying to wipe \the [C] with \the [src].</span>")
if(do_after(user, 20, target = C))
reagents.reaction(C, TOUCH)
reagents.remove_all(5)
C.visible_message("<span class='notice'>[user] has wiped \the [C] with \the [src].</span>")
log_combat(user, C, "touched", log_object)
else if(istype(A) && (src in user))
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
if(do_after(user, action_speed, target = A))
user.visible_message("[user] finishes wiping off [A]!", "<span class='notice'>You finish wiping off [A].</span>")
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
return
/obj/item/reagent_containers/rag/alt_pre_attack(mob/living/M, mob/living/user, params)
if(istype(M) && user.a_intent == INTENT_HELP)
user.changeNext_move(CLICK_CD_MELEE)
user.DelayNextAction(CLICK_CD_MELEE)
if(M.on_fire)
user.visible_message("<span class='warning'>\The [user] uses \the [src] to pat out [M == user ? "[user.p_their()]" : "\the [M]'s"] flames!</span>")
if(hitsound)
@@ -189,4 +192,4 @@
extinguish_efficiency = 5
action_speed = 15
damp_threshold = 0.8
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.
@@ -27,6 +27,8 @@
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
. = ..()
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
return
if(istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
return
@@ -50,7 +52,7 @@
spray(A)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
user.changeNext_move(CLICK_CD_RANGE*2)
user.last_action = world.time
user.newtonian_move(get_dir(A, user))
var/turf/T = get_turf(src)
if(reagents.has_reagent(/datum/reagent/toxin/acid))
@@ -42,8 +42,7 @@
mode = !mode
update_icon()
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/reagent_containers/syringe/attack_hand()
/obj/item/reagent_containers/syringe/on_attack_hand()
. = ..()
update_icon()
@@ -53,8 +52,11 @@
/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
return
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user, proximity)
. = ..()
INVOKE_ASYNC(src, .proc/attempt_inject, target, user, proximity)
/obj/item/reagent_containers/syringe/proc/attempt_inject(atom/target, mob/user, proximity)
if(busy)
return
if(!proximity)