Impliments Ghom review, reverts blood list back to component

This commit is contained in:
Poojawa
2019-08-15 12:32:44 -05:00
parent 2073921f4b
commit 0290a46ddc
54 changed files with 662 additions and 613 deletions
+5 -11
View File
@@ -160,7 +160,7 @@
C.reagents.add_reagent("bonehurtingjuice", amount * 0.5)
else
C.blood_volume = min(C.blood_volume + round(amount, 0.1), BLOOD_VOLUME_MAXIMUM)
return 1
return 1
C.blood_volume = min(C.blood_volume + round(amount, 0.1), BLOOD_VOLUME_MAXIMUM)
return 1
@@ -232,12 +232,7 @@
return "blood"
/mob/living/carbon/get_blood_id()
var/mob/living/carbon/C = src
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(H.dna.species.exotic_blood)
return H.dna.species.exotic_blood
if(dna.species.exotic_blood)
if(dna?.species?.exotic_blood)
return dna.species.exotic_blood
else if((NOBLOOD in dna.species.species_traits) || (HAS_TRAIT(src, TRAIT_NOCLONE)))
return
@@ -290,8 +285,7 @@
drop.transfer_mob_blood_dna(src)
return
else
temp_blood_DNA = list()
temp_blood_DNA |= drop.blood_DNA.Copy() //we transfer the dna from the drip to the splatter
temp_blood_DNA = drop.return_blood_DNA() //we transfer the dna from the drip to the splatter
qdel(drop)//the drip is replaced by a bigger splatter
else
drop = new(T, get_static_viruses())
@@ -307,9 +301,9 @@
B.transfer_mob_blood_dna(src) //give blood info to the blood decal.
if(temp_blood_DNA)
if(isalien(src))
B.blood_DNA["UNKNOWN DNA"] = "X*"
B.add_blood(list("UNKNOWN DNA" = "X*"))
else
B.blood_DNA |= temp_blood_DNA
B.add_blood(temp_blood_DNA)
/mob/living/carbon/human/add_splatter_floor(turf/T, small_drip)
if(!(NOBLOOD in dna.species.species_traits))
+2 -8
View File
@@ -24,14 +24,8 @@
if(!stored_dna.species)
var/rando_race = pick(GLOB.roundstart_races)
stored_dna.species = new rando_race()
if(isjellyperson(stored_dna.species))
stored_dna.blood_type = "GEL"
if(isipcperson(stored_dna.species))
stored_dna.blood_type = "HF"
if(isxenoperson(stored_dna.species))
stored_dna.blood_type = "X*"
if(islizard(stored_dna.species))
stored_dna.blood_type = "L"
if(stored_dna.species.exotic_bloodtype)
stored_dna.blood_type = stored_dna.species.exotic_bloodtype
/mob/living/brain/Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
+5 -8
View File
@@ -11,21 +11,18 @@
if (handcuffed)
msg += "<span class='warning'>[t_He] [t_is] [icon2html(handcuffed, user)] handcuffed!</span>\n"
if (head)
msg += "[t_He] [t_is] wearing [icon2html(head, user)] \a [src.head] on [t_his] head. \n"
msg += "[t_He] [t_is] wearing [head.get_examine_string(user)] on [t_his] head. \n"
if (wear_mask)
msg += "[t_He] [t_is] wearing [icon2html(wear_mask, user)] \a [src.wear_mask] on [t_his] face.\n"
msg += "[t_He] [t_is] wearing [wear_mask.get_examine_string(user)] on [t_his] face.\n"
if (wear_neck)
msg += "[t_He] [t_is] wearing [icon2html(wear_neck, user)] \a [src.wear_neck] around [t_his] neck.\n"
msg += "[t_He] [t_is] wearing [wear_neck.get_examine_string(user)] around [t_his] neck.\n"
for(var/obj/item/I in held_items)
if(!(I.item_flags & ABSTRACT))
if(I.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] holding [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in [t_his] [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
else
msg += "[t_He] [t_is] holding [icon2html(I, user)] \a [I] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
msg += "[t_He] [t_is] holding [I.get_examine_string(user)] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
if (back)
msg += "[t_He] [t_has] [icon2html(back, user)] \a [src.back] on [t_his] back.\n"
msg += "[t_He] [t_has] [back.get_examine_string(user)] on [t_his] back.\n"
var/appears_dead = 0
if (stat == DEAD)
appears_dead = 1
+23 -54
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/human/examine(mob/user) //User is the person being examined
/mob/living/carbon/human/examine(mob/user)
//this is very slightly better than it was because you can use it more places. still can't do \his[src] though.
var/t_He = p_they(TRUE)
var/t_His = p_their(TRUE)
@@ -37,47 +37,30 @@
if(U.attached_accessory)
accessory_msg += " with [icon2html(U.attached_accessory, user)] \a [U.attached_accessory]"
if(w_uniform.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(w_uniform, user)] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name][accessory_msg]!</span>\n"
else
msg += "[t_He] [t_is] wearing [icon2html(w_uniform, user)] \a [w_uniform][accessory_msg].\n"
msg += "[t_He] [t_is] wearing [w_uniform.get_examine_string(user)][accessory_msg].\n"
//head
if(head)
if(head.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(head, user)] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on [t_his] head!</span>\n"
else
msg += "[t_He] [t_is] wearing [icon2html(head, user)] \a [head] on [t_his] head.\n"
msg += "[t_He] [t_is] wearing [head.get_examine_string(user)] on [t_his] head.\n"
//suit/armor
if(wear_suit)
if(wear_suit.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(wear_suit, user)] [wear_suit.gender==PLURAL?"some":"a"] blood-stained [wear_suit.name]!</span>\n"
else
msg += "[t_He] [t_is] wearing [icon2html(wear_suit, user)] \a [wear_suit].\n"
//suit/armour storage
if(s_store)
if(s_store.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] carrying [icon2html(s_store, user)] [s_store.gender==PLURAL?"some":"a"] blood-stained [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
else
msg += "[t_He] [t_is] carrying [icon2html(s_store, user)] \a [s_store] on [t_his] [wear_suit.name].\n"
msg += "[t_He] [t_is] wearing [wear_suit.get_examine_string(user)].\n"
//suit/armor storage
if(s_store && !(SLOT_S_STORE in obscured))
msg += "[t_He] [t_is] carrying [s_store.get_examine_string(user)] on [t_his] [wear_suit.name].\n"
//back
if(back)
if(back.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] [icon2html(back, user)] [back.gender==PLURAL?"some":"a"] blood-stained [back] on [t_his] back.</span>\n"
else
msg += "[t_He] [t_has] [icon2html(back, user)] \a [back] on [t_his] back.\n"
msg += "[t_He] [t_has] [back.get_examine_string(user)] on [t_his] back.\n"
//Hands
for(var/obj/item/I in held_items)
if(I.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] holding [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in [t_his] [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
else
msg += "[t_He] [t_is] holding [icon2html(I, user)] \a [I] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
if(!(I.item_flags & ABSTRACT))
msg += "[t_He] [t_is] holding [I.get_examine_string(user)] in [t_his] [get_held_index_name(get_held_index_of_item(I))].\n"
var/datum/component/forensics/FR = GetComponent(/datum/component/forensics)
//gloves
if(gloves && !(SLOT_GLOVES in obscured))
if(gloves.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] [icon2html(gloves, user)] [gloves.gender==PLURAL?"some":"a"] blood-stained [gloves.name] on [t_his] hands!</span>\n"
else
msg += "[t_He] [t_has] [icon2html(gloves, user)] \a [gloves] on [t_his] hands.\n"
else if(blood_DNA)
msg += "[t_He] [t_has] [gloves.get_examine_string(user)] on [t_his] hands.\n"
else if(FR && length(FR.blood_DNA))
var/hand_number = get_num_arms(FALSE)
if(hand_number)
msg += "<span class='warning'>[t_He] [t_has] [hand_number > 1 ? "" : "a"] blood-stained hand[hand_number > 1 ? "s" : ""]!</span>\n"
@@ -93,47 +76,33 @@
//belt
if(belt)
if(belt.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] [icon2html(belt, user)] [belt.gender==PLURAL?"some":"a"] blood-stained [belt.name] about [t_his] waist!</span>\n"
else
msg += "[t_He] [t_has] [icon2html(belt, user)] \a [belt] about [t_his] waist.\n"
msg += "[t_He] [t_has] [belt.get_examine_string(user)] about [t_his] waist.\n"
//shoes
if(shoes && !(SLOT_SHOES in obscured))
if(shoes.blood_DNA)
msg += "<span class='warning'>[t_He] [t_is] wearing [icon2html(shoes, user)] [shoes.gender==PLURAL?"some":"a"] blood-stained [shoes.name] on [t_his] feet!</span>\n"
else
msg += "[t_He] [t_is] wearing [icon2html(shoes, user)] \a [shoes] on [t_his] feet.\n"
msg += "[t_He] [t_is] wearing [shoes.get_examine_string(user)] on [t_his] feet.\n"
//mask
if(wear_mask && !(SLOT_WEAR_MASK in obscured))
if(wear_mask.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] [icon2html(wear_mask, user)] [wear_mask.gender==PLURAL?"some":"a"] blood-stained [wear_mask.name] on [t_his] face!</span>\n"
else
msg += "[t_He] [t_has] [icon2html(wear_mask, user)] \a [wear_mask] on [t_his] face.\n"
msg += "[t_He] [t_has] [wear_mask.get_examine_string(user)] on [t_his] face.\n"
//neck
if(wear_neck && !(SLOT_NECK in obscured))
msg += "[t_He] [t_is] wearing [icon2html(wear_neck, user)] \a [src.wear_neck] around [t_his] neck.\n"
msg += "[t_He] [t_is] wearing [wear_neck.get_examine_string(user)] around [t_his] neck.\n"
//eyes
if(!(SLOT_GLASSES in obscured))
if(glasses)
if(glasses.blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] [icon2html(glasses, user)] [glasses.gender==PLURAL?"some":"a"] blood-stained [glasses] covering [t_his] eyes!</span>\n"
else
msg += "[t_He] [t_has] [icon2html(glasses, user)] \a [glasses] covering [t_his] eyes.\n"
msg += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes.\n"
else if(eye_color == BLOODCULT_EYE && iscultist(src) && HAS_TRAIT(src, TRAIT_CULT_EYES))
msg += "<span class='warning'><B>[t_His] eyes are glowing an unnatural red!</B></span>\n"
//ears
if(ears && !(SLOT_EARS in obscured))
msg += "[t_He] [t_has] [icon2html(ears, user)] \a [ears] on [t_his] ears.\n"
msg += "[t_He] [t_has] [ears.get_examine_string(user)] on [t_his] ears.\n"
//ID
if(wear_id)
msg += "[t_He] [t_is] wearing [icon2html(wear_id, user)] \a [wear_id].\n"
msg += "[t_He] [t_is] wearing [wear_id.get_examine_string(user)].\n"
//Status effects
msg += status_effect_examines()
@@ -183,7 +152,7 @@
var/temp = getBruteLoss() //no need to calculate each of these twice
msg += "<span class='warning'>"
msg += "<span class='warning'>" //Everything below gets this span
var/list/missing = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/list/disabled = list()
+12 -15
View File
@@ -32,6 +32,8 @@
if(CONFIG_GET(flag/disable_stambuffer))
togglesprint()
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, .proc/clean_blood)))
/mob/living/carbon/human/ComponentInitialize()
. = ..()
@@ -687,21 +689,16 @@
if(..())
dropItemToGround(I)
/mob/living/carbon/human/clean_blood()
var/mob/living/carbon/human/H = src
if(H.gloves)
if(H.gloves.clean_blood())
H.update_inv_gloves()
/mob/living/carbon/human/proc/clean_blood(datum/source, strength)
if(strength < CLEAN_STRENGTH_BLOOD)
return
if(gloves)
if(SEND_SIGNAL(gloves, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD))
update_inv_gloves()
else
..() // Clear the Blood_DNA list
if(H.bloody_hands)
H.bloody_hands = 0
H.update_inv_gloves()
/* if(H.bloody_feet)
H.bloody_feet = 0
H.update_inv_shoes()*/
update_icons() //apply the now updated overlays to the mob
if(bloody_hands)
bloody_hands = 0
update_inv_gloves()
/mob/living/carbon/human/wash_cream()
if(creamed) //clean both to prevent a rare bug
@@ -1069,4 +1066,4 @@
race = /datum/species/zombie/infectious
/mob/living/carbon/human/species/zombie/krokodil_addict
race = /datum/species/krokodil_addict
race = /datum/species/krokodil_addict
@@ -64,9 +64,7 @@
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.bloody_shoes[S.blood_state]
if(S.last_blood_DNA && S.last_bloodtype)
FP.blood_DNA += list(S.last_blood_DNA = S.last_bloodtype)
//hacky as heck; we need to move the LAST entry to there, otherwise we mix all the blood
FP.add_blood(S.return_blood_DNA())
FP.update_icon()
update_inv_shoes()
//End bloody footprints
@@ -269,16 +269,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
regenerate_organs(C,old_species)
if(exotic_bloodtype && C.dna.blood_type != exotic_bloodtype)
if(isjellyperson(C))
C.dna.blood_type = "GEL"
if(isipcperson(C))
C.dna.blood_type = "HF"
if(isxenoperson(C))
C.dna.blood_type = "X*"
if(islizard(C))
C.dna.blood_type = "L"
else
C.dna.blood_type = exotic_bloodtype
C.dna.blood_type = exotic_bloodtype
if(old_species.mutanthands)
for(var/obj/item/I in C.held_items)
@@ -319,16 +310,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
if(C.dna.species.exotic_bloodtype)
if(isjellyperson(C))
C.dna.blood_type = "GEL"
if(isipcperson(C))
C.dna.blood_type = "HF"
if(isxenoperson(C))
C.dna.blood_type = "X*"
if(islizard(C))
C.dna.blood_type = "L"
else
C.dna.blood_type = random_blood_type()
C.dna.blood_type = random_blood_type()
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(TRUE)
for(var/X in inherent_traits)
@@ -474,8 +474,7 @@
if(isturf(next))
if(bloodiness)
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
if(blood_DNA && blood_DNA.len)
B.blood_DNA |= blood_DNA.Copy()
B.add_blood(return_blood_DNA())
var/newdir = get_dir(next, loc)
if(newdir == dir)
B.setDir(newdir)
@@ -488,7 +487,6 @@
B.setDir(newdir)
bloodiness--
var/oldloc = loc
var/moved = step_towards(src, next) // attempt to move
if(cell)
@@ -657,8 +655,7 @@
T.add_mob_blood(H)
var/list/blood_dna = H.get_blood_dna_list()
if(blood_dna)
transfer_blood_dna(blood_dna)
add_blood(blood_dna)
bloodiness += 4
// player on mulebot attempted to move
@@ -37,7 +37,6 @@
gender = NEUTER
mob_biotypes = list(MOB_ROBOTIC)
speak_emote = list("chirps")
speech_span = SPAN_ROBOT
bubble_icon = "machine"
initial_language_holder = /datum/language_holder/drone
mob_size = MOB_SIZE_SMALL
@@ -93,7 +92,7 @@
var/obj/item/I = new default_hatmask(src)
equip_to_slot_or_del(I, SLOT_HEAD)
ADD_TRAIT(access_card, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT)
access_card.item_flags |= TRAIT_NODROP
alert_drones(DRONE_NET_CONNECT)
@@ -170,23 +169,15 @@
//Hands
for(var/obj/item/I in held_items)
if(!(I.item_flags & ABSTRACT))
if(I.blood_DNA)
msg += "<span class='warning'>It has [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
else
msg += "It has [icon2html(I, user)] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
msg += "It has [I.get_examine_string(user)] in its [get_held_index_name(get_held_index_of_item(I))].\n"
//Internal storage
if(internal_storage && !(internal_storage.item_flags & ABSTRACT))
if(internal_storage.blood_DNA)
msg += "<span class='warning'>It is holding [icon2html(internal_storage, user)] [internal_storage.gender==PLURAL?"some":"a"] blood-stained [internal_storage.name] in its internal storage!</span>\n"
else
msg += "It is holding [icon2html(internal_storage, user)] \a [internal_storage] in its internal storage.\n"
msg += "It is holding [internal_storage.get_examine_string(user)] in its internal storage.\n"
//Cosmetic hat - provides no function other than looks
if(head && !(head.item_flags & ABSTRACT))
if(head.blood_DNA)
msg += "<span class='warning'>It is wearing [icon2html(head, user)] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on its head!</span>\n"
else
msg += "It is wearing [icon2html(head, user)] \a [head] on its head.\n"
msg += "It is wearing [head.get_examine_string(user)] on its head.\n"
//Braindead
if(!client && stat != DEAD)
@@ -281,4 +272,4 @@
return 1
/mob/living/simple_animal/drone/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
return 0 //So they don't die trying to fix wiring
return 0 //So they don't die trying to fix wiring
@@ -23,15 +23,9 @@
for(var/obj/item/I in held_items)
if(!(I.item_flags & ABSTRACT))
if(I.blood_DNA)
msg += "<span class='warning'>It has [icon2html(I, user)] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
else
msg += "It has [icon2html(I, user)] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
msg += "It has [I.get_examine_string(user)] in its [get_held_index_name(get_held_index_of_item(I))].\n"
if(internal_storage && !(internal_storage.item_flags & ABSTRACT))
if(internal_storage.blood_DNA)
msg += "<span class='warning'>It is holding [icon2html(internal_storage, user)] [internal_storage.gender==PLURAL?"some":"a"] blood-stained [internal_storage.name] in its internal storage!</span>\n"
else
msg += "It is holding [icon2html(internal_storage, user)] \a [internal_storage] in its internal storage.\n"
msg += "It is holding [internal_storage.get_examine_string(user)] in its internal storage.\n"
msg += "*---------*</span>"
to_chat(user, msg)
else
@@ -90,4 +84,4 @@
/mob/living/simple_animal/hostile/guardian/dextrous/regenerate_icons()
..()
update_inv_internal_storage()
update_inv_internal_storage()
@@ -177,6 +177,6 @@
qdel(target)
return TRUE
var/atom/movable/M = target
M.clean_blood()
SEND_SIGNAL(M, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
visible_message("[src] polishes \the [target].")
return TRUE
return TRUE
+4 -3
View File
@@ -491,7 +491,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
. = BLOOD_COLOR_HUMAN
switch(type)
if("U")//Universal blood; a bit orange
. = "#db3300"
. = BLOOD_COLOR_UNIVERSAL
if("SY")//Synthetics blood; blue
. = BLOOD_COLOR_SYNTHETIC
if("L")//lizard, a bit pink/purple
@@ -502,6 +502,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
. = BLOOD_COLOR_OIL
if("GEL")// slimepeople blood, rgb 0, 255, 144
. = BLOOD_COLOR_SLIME
if("BUG")
. = "#a37c0f"
if("BUG")// yellowish, like, y'know bug guts I guess.
. = BLOOD_COLOR_BUG
//add more stuff to the switch if you have more blood colors for different types
// the defines are in _DEFINES/misc.dm