Merge branch 'master' into donut
This commit is contained in:
@@ -843,7 +843,7 @@
|
||||
return FALSE
|
||||
|
||||
if (D.id == "water" && !no_react && !istype(my_atom, /obj/item/reagent_containers/food)) //Do like an otter, add acid to water, but also don't blow up botany.
|
||||
if (pH <= 2)
|
||||
if (pH < 2)
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "water-acid explosions")
|
||||
var/datum/effect_system/smoke_spread/chem/s = new
|
||||
var/turf/T = get_turf(my_atom)
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
. = ..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
cut_overlays()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
@@ -428,10 +428,11 @@
|
||||
return final_list
|
||||
|
||||
/obj/machinery/chem_dispenser/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -29,10 +29,11 @@
|
||||
icon_state = "mixer0b"
|
||||
|
||||
/obj/machinery/chem_heater/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_heater/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
|
||||
@@ -58,14 +58,14 @@
|
||||
if(bottle)
|
||||
bottle.ex_act(severity, target)
|
||||
|
||||
/obj/machinery/chem_master/handle_atom_del(atom/A)
|
||||
..()
|
||||
/obj/machinery/chem_master/Exited(atom/movable/A, atom/newloc)
|
||||
. = ..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
reagents.clear_reagents()
|
||||
update_icon()
|
||||
else if(A == bottle)
|
||||
if(A == bottle)
|
||||
bottle = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_master/update_icon()
|
||||
cut_overlays()
|
||||
@@ -103,6 +103,10 @@
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
else if(!condi && istype(I, /obj/item/storage/pill_bottle))
|
||||
. = TRUE // no afterattack
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You can't use the [src.name] while its panel is opened!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
replace_pillbottle(user, I)
|
||||
@@ -112,40 +116,40 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
if(beaker)
|
||||
replace_beaker(user)
|
||||
else if(bottle)
|
||||
replace_pillbottle(user)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
var/obj/item/reagent_containers/B = beaker
|
||||
B.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
user.put_in_hands(B)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/proc/replace_pillbottle(mob/living/user, obj/item/storage/pill_bottle/new_bottle)
|
||||
if(bottle)
|
||||
bottle.forceMove(drop_location())
|
||||
var/obj/item/storage/pill_bottle/B = bottle
|
||||
B.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
user.put_in_hands(B)
|
||||
else
|
||||
adjust_item_drop_location(bottle)
|
||||
adjust_item_drop_location(B)
|
||||
if(new_bottle)
|
||||
bottle = new_bottle
|
||||
else
|
||||
bottle = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/on_deconstruction()
|
||||
replace_beaker(usr)
|
||||
replace_pillbottle(usr)
|
||||
var/atom/A = drop_location()
|
||||
beaker.forceMove(A)
|
||||
bottle.forceMove(A)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
@@ -260,15 +264,16 @@
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
var/target_loc = bottle ? bottle : drop_location()
|
||||
var/target_loc = drop_location()
|
||||
var/drop_threshold = INFINITY
|
||||
if(bottle)
|
||||
var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage)
|
||||
if(STRB)
|
||||
drop_threshold = STRB.max_items - bottle.contents.len
|
||||
target_loc = bottle
|
||||
|
||||
for(var/i in 1 to amount)
|
||||
if(i < drop_threshold)
|
||||
if(i <= drop_threshold)
|
||||
P = new(target_loc)
|
||||
else
|
||||
P = new(drop_location())
|
||||
|
||||
@@ -237,10 +237,11 @@
|
||||
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
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
|
||||
@@ -199,17 +199,17 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
to_chat(M, "<span class='notice'>[pick("You have a really bad headache.", "Your eyes hurt.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]</span>")
|
||||
|
||||
if(prob(5) && iscarbon(M))
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(HAS_TRAIT(M, TRAIT_BLIND))
|
||||
var/obj/item/organ/eyes/eye = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(istype(eye))
|
||||
eye.Remove(M)
|
||||
eye.forceMove(get_turf(M))
|
||||
if(eyes)
|
||||
eyes.Remove(M)
|
||||
eyes.forceMove(get_turf(M))
|
||||
to_chat(M, "<span class='userdanger'>You double over in pain as you feel your eyeballs liquify in your head!</span>")
|
||||
M.emote("scream")
|
||||
M.adjustBruteLoss(15)
|
||||
else
|
||||
to_chat(M, "<span class='userdanger'>You scream in terror as you go blind!</span>")
|
||||
M.become_blind(EYE_DAMAGE)
|
||||
eyes?.applyOrganDamage(eyes.maxHealth)
|
||||
M.emote("scream")
|
||||
|
||||
if(prob(3) && iscarbon(M))
|
||||
@@ -610,6 +610,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
value = 1.3
|
||||
|
||||
/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C)
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
|
||||
..()
|
||||
|
||||
@@ -355,6 +355,8 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
value = 1
|
||||
|
||||
/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M)
|
||||
if((HAS_TRAIT(M, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(last_added)
|
||||
M.blood_volume -= last_added
|
||||
last_added = 0
|
||||
@@ -793,6 +795,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
eyes.applyOrganDamage(-2)
|
||||
if(HAS_TRAIT_FROM(M, TRAIT_BLIND, EYE_DAMAGE))
|
||||
if(prob(20))
|
||||
to_chat(M, "<span class='warning'>Your vision slowly returns...</span>")
|
||||
@@ -807,8 +810,6 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
else if(M.eye_blind || M.eye_blurry)
|
||||
M.set_blindness(0)
|
||||
M.set_blurriness(0)
|
||||
else if(eyes.eye_damage > 0)
|
||||
M.adjust_eye_damage(-1)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/atropine
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/reagent/blood
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"= null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"= null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null,"quirks"=null)
|
||||
name = "Blood"
|
||||
id = "blood"
|
||||
value = 1
|
||||
@@ -30,7 +30,7 @@
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
var/blood_id = C.get_blood_id()
|
||||
if((blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW) || blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
|
||||
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM * C.blood_ratio)
|
||||
// we don't care about bloodtype here, we're just refilling the mob
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
L.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
|
||||
|
||||
/datum/reagent/blood/on_mob_life(mob/living/carbon/C) //Because lethals are preferred over stamina. damnifino.
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return //We dont want vampires getting toxed from blood
|
||||
var/blood_id = C.get_blood_id()
|
||||
if((blood_id == "blood" || blood_id == "jellyblood"))
|
||||
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) //we only care about bloodtype here because this is where the poisoning should be
|
||||
@@ -1116,6 +1118,8 @@
|
||||
color = "#c2391d"
|
||||
|
||||
/datum/reagent/iron/on_mob_life(mob/living/carbon/C)
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume += 0.01 //we'll have synthetics from medbay.
|
||||
..()
|
||||
@@ -1654,7 +1658,7 @@
|
||||
description = "Cheap and extremely common type of plant nutriment."
|
||||
color = "#376400" // RBG: 50, 100, 0
|
||||
tox_prob = 10
|
||||
pH = 2
|
||||
pH = 2.5
|
||||
|
||||
/datum/reagent/plantnutriment/left4zednutriment
|
||||
name = "Left 4 Zed"
|
||||
@@ -1662,7 +1666,7 @@
|
||||
description = "Unstable nutriment that makes plants mutate more often than usual."
|
||||
color = "#1A1E4D" // RBG: 26, 30, 77
|
||||
tox_prob = 25
|
||||
pH = 1.5
|
||||
pH = 3.5
|
||||
|
||||
/datum/reagent/plantnutriment/robustharvestnutriment
|
||||
name = "Robust Harvest"
|
||||
@@ -1670,7 +1674,7 @@
|
||||
description = "Very potent nutriment that prevents plants from mutating."
|
||||
color = "#9D9D00" // RBG: 157, 157, 0
|
||||
tox_prob = 15
|
||||
pH = 1
|
||||
pH = 2.5
|
||||
|
||||
// GOON OTHERS
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
toxpwr = 0
|
||||
taste_description = "slime"
|
||||
taste_mult = 0.9
|
||||
pH = 2
|
||||
pH = 2.3
|
||||
|
||||
/datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, reac_volume)
|
||||
if(!..())
|
||||
@@ -220,7 +220,7 @@
|
||||
color = "#49002E" // rgb: 73, 0, 46
|
||||
toxpwr = 1
|
||||
taste_mult = 1
|
||||
pH = 2
|
||||
pH = 2.7
|
||||
|
||||
/datum/reagent/toxin/plantbgone/reaction_obj(obj/O, reac_volume)
|
||||
if(istype(O, /obj/structure/alien/weeds))
|
||||
@@ -986,4 +986,3 @@
|
||||
to_chat(M, "<span class='notice'>[tox_message]</span>")
|
||||
. = 1
|
||||
..()
|
||||
|
||||
|
||||
@@ -107,8 +107,29 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/blood/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent == INTENT_HELP && reagents.total_volume > 0)
|
||||
if (user != M)
|
||||
to_chat(user, "<span class='notice'>You force [M] to drink from the [src]</span>")
|
||||
user.visible_message("<span class='userdanger'>[user] forces [M] to drink from the [src].</span>")
|
||||
if(!do_mob(user, M, 50))
|
||||
return
|
||||
else
|
||||
if(!do_mob(user, M, 10))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You take a sip from the [src].</span>")
|
||||
user.visible_message("<span class='notice'>[user] puts the [src] up to their mouth.</span>")
|
||||
if(reagents.total_volume <= 0) // Safety: In case you spam clicked the blood bag on yourself, and it is now empty (below will divide by zero)
|
||||
return
|
||||
var/gulp_size = 5
|
||||
var/fraction = min(gulp_size / reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction) //checkLiked(fraction, M) // Blood isn't food, sorry.
|
||||
reagents.trans_to(M, gulp_size)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/blood/bluespace
|
||||
name = "bluespace blood pack"
|
||||
desc = "Contains blood used for transfusion, this one has been made with bluespace technology to hold much more blood. Must be attached to an IV drip."
|
||||
icon_state = "bsbloodpack"
|
||||
volume = 600 //its a blood bath!
|
||||
volume = 600 //its a blood bath!
|
||||
|
||||
@@ -338,8 +338,10 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/hypospray/mkii/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(vial)
|
||||
vial.attack_self(user)
|
||||
return TRUE
|
||||
|
||||
// Gunna allow this for now, still really don't approve - Pooj
|
||||
/obj/item/hypospray/mkii/emag_act(mob/user)
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
msg += "'s liquids into \the [target]"
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[msg].</span>")
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/reagent_containers/rag/towel
|
||||
|
||||
Reference in New Issue
Block a user