Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-03-03 03:08:41 -07:00
485 changed files with 2456 additions and 2614 deletions

View File

@@ -221,3 +221,13 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
rs += "[R.name], [R.volume]"
return rs.Join(" | ")
//For easy bloodsucker disgusting and blood removal
/datum/reagent/proc/disgust_bloodsucker(mob/living/carbon/C, disgust, blood_change, blood_puke = TRUE, force)
if(isvamp(C))
var/datum/antagonist/bloodsucker/bloodsuckerdatum = C.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
if(disgust)
bloodsuckerdatum.handle_eat_human_food(disgust, blood_puke, force)
if(blood_change)
bloodsuckerdatum.AddBloodVolume(blood_change)

View File

@@ -579,8 +579,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(isvamp(C))
disgust_bloodsucker(FALSE, 1) //Bloodsuckers get SOME blood from it, for style reasons.
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.
..()

View File

@@ -593,7 +593,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
/datum/reagent/medicine/salbutamol
name = "Salbutamol"
description = "Rapidly restores oxygen deprivation as well as preventing more of it to an extent."
description = "Rapidly restores oxygen deprivation as well as preventing more of it to an extent. Causes jittering."
reagent_state = LIQUID
color = "#00FFFF"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
@@ -603,6 +603,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
M.adjustOxyLoss(-3*REM, 0)
if(M.losebreath >= 4)
M.losebreath -= 2
M.Jitter(5)
..()
. = 1

View File

@@ -13,7 +13,7 @@
shot_glass_icon_state = "shotglassred"
pH = 7.4
/datum/reagent/blood/reaction_mob(mob/living/L, method=TOUCH, reac_volume)
/datum/reagent/blood/reaction_mob(mob/living/L, method = TOUCH, reac_volume)
if(data && data["viruses"])
for(var/thing in data["viruses"])
var/datum/disease/D = thing
@@ -26,6 +26,18 @@
else //ingest, patch or inject
L.ForceContractDisease(D)
if(data["blood_type"] == "SY")
//Synthblood is very disgusting to bloodsuckers. They will puke it out to expel it, unless they have masquarade on
switch(reac_volume)
if(0 to 3)
disgust_bloodsucker(L, 3, FALSE, FALSE, FALSE)
if(3 to 6)
//If theres more than 8 units, they will start expelling it, even if they are masquarading.
disgust_bloodsucker(L, 5, FALSE, FALSE, TRUE)
else
//If they have too much in them, they will also puke out their blood.
disgust_bloodsucker(L, 7, -5, TRUE, TRUE)
if(iscarbon(L))
var/mob/living/carbon/C = L
var/blood_id = C.get_blood_id()
@@ -37,10 +49,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 == /datum/reagent/blood || blood_id == /datum/reagent/blood/jellyblood))
if((blood_id in GLOB.blood_reagent_types) && !HAS_TRAIT(C, TRAIT_NOMARROW))
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
C.adjustToxLoss(rand(2,8)*REM, TRUE, TRUE) //forced to ensure people don't use it to gain beneficial toxin as slime person
..()
@@ -117,7 +127,7 @@
if(!istype(D, /datum/disease/advance))
preserve += D
data["viruses"] = preserve
return 1
return TRUE
/datum/reagent/blood/proc/get_diseases()
. = list()
@@ -142,6 +152,13 @@
taste_mult = 1.3
pH = 4
/datum/reagent/blood/tomato
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_HUMAN, "blood_type"="SY","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Tomato Blood"
description = "This highly resembles blood, but it doesnt actually function like it, resembling more ketchup, with a more blood-like consistency."
taste_description = "sap" //Like tree sap?
pH = 7.45
/datum/reagent/blood/jellyblood/on_mob_life(mob/living/carbon/M)
if(prob(10))
if(M.dna?.species?.exotic_bloodtype != "GEL")

View File

@@ -89,7 +89,7 @@
blood_type = "BUG"
/obj/item/reagent_containers/blood/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/pen) || istype(I, /obj/item/toy/crayon))
if(istype(I, /obj/item/pen) || istype(I, /obj/item/toy/crayon))
if(!user.is_literate())
to_chat(user, "<span class='notice'>You scribble illegibly on the label of [src]!</span>")
return
@@ -107,25 +107,31 @@
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))
/obj/item/reagent_containers/blood/attack(mob/living/carbon/C, mob/user, def_zone)
if(user.a_intent == INTENT_HELP && reagents.total_volume > 0 && iscarbon(C) && user.a_intent == INTENT_HELP)
if(C.is_mouth_covered())
to_chat(user, "<span class='notice'>You cant drink from the [src] while your mouth is covered.</span>")
return
if(user != C)
user.visible_message("<span class='danger'>[user] forces [C] to drink from the [src].</span>", \
"<span class='notice'>You force [C] to drink from the [src]</span>")
if(!do_mob(user, C, 50))
return
else
if(!do_mob(user, M, 10))
if(!do_mob(user, C, 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/gulp_size = 3
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)
reagents.reaction(C, INGEST, fraction) //checkLiked(fraction, M) // Blood isn't food, sorry.
reagents.trans_to(C, gulp_size)
reagents.remove_reagent(src, 2) //Inneficency, so hey, IVs are usefull.
playsound(C.loc,'sound/items/drink.ogg', rand(10, 50), TRUE)
return
..()
/obj/item/reagent_containers/blood/bluespace
@@ -133,3 +139,14 @@
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!
/obj/item/reagent_containers/blood/bluespace/attack(mob/living/carbon/C, mob/user, def_zone)
if(user.a_intent == INTENT_HELP)
if(user != C)
to_chat(user, "<span class='notice'>You can't force people to drink from the [src]. Nothing comes out from it.</span>")
return
else
to_chat(user, "<span class='notice'>You try to suck on the [src], but nothing comes out.</span>")
return
else
..()