diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 1058587d..91cc89ce 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -103,5 +103,3 @@ */ #define ELEMENT_BESPOKE (1 << 1) #define COMSIG_MOVABLE_UPDATE_GLIDE_SIZE "movable_glide_size" //Called when the movable's glide size is updated: (new_glide_size) -//Blood color -#define COMSIG_BLOOD_COLOR "blood_DNA_to_color" //RGB blood stuff diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3e7fc722..841b4816 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -510,9 +510,8 @@ return final_rgb /atom/proc/clean_blood() - if(islist(blood_DNA)) - blood_DNA = null - return TRUE + . = blood_DNA? TRUE : FALSE + blood_DNA = null /atom/proc/wash_cream() return TRUE diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index e4e19668..51970125 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -266,7 +266,7 @@ for(var/atom/movable/AM in things_to_clear) //Scorches away blood and forensic evidence, although the SSU itself is unaffected SEND_SIGNAL(AM, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRONG) AM.clean_blood() - AM.fingerprints = list() + AM.fingerprints = null var/datum/component/radioactive/contamination = AM.GetComponent(/datum/component/radioactive) if(contamination) qdel(contamination) diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index e5d38d3e..e02eb86b 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -5,6 +5,7 @@ layer = LOW_OBJ_LAYER random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6") mergeable_decal = FALSE + bloodiness = 0 var/body_colors = "#e3ba84" //a default color just in case. var/gibs_reagent_id = "liquidgibs" var/gibs_bloodtype = "A+" diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 80169778..ef9e1d1a 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -5,12 +5,12 @@ icon_state = "floor1" random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") blood_state = BLOOD_STATE_BLOOD - bloodiness = MAX_SHOE_BLOODINESS + bloodiness = BLOOD_AMOUNT_PER_DECAL color = BLOOD_COLOR_HUMAN //default so we don't have white splotches everywhere. /obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C) if (C.blood_DNA) - blood_DNA |= C.blood_DNA.Copy() + blood_DNA |= C.blood_DNA update_icon() ..() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index db4fea47..873cb7ba 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -390,10 +390,14 @@ . = ..() /obj/item/stack/proc/copy_evidences(obj/item/stack/from) - blood_DNA = from.blood_DNA - fingerprints = from.fingerprints - fingerprintshidden = from.fingerprintshidden - fingerprintslast = from.fingerprintslast + if(from.blood_DNA) + blood_DNA = from.blood_DNA.Copy() + if(from.fingerprints) + fingerprints = from.fingerprints.Copy() + if(from.fingerprintshidden) + fingerprintshidden = from.fingerprintshidden.Copy() + if(from.fingerprintslast) + fingerprintslast = from.fingerprintslast //TODO bloody overlay /obj/item/stack/microwave_act(obj/machinery/microwave/M) @@ -437,4 +441,4 @@ /datum/stack_recipe_list/New(title, recipes) src.title = title - src.recipes = recipes \ No newline at end of file + src.recipes = recipes diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index 8cdd4f08..55f5e061 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons) /obj/item/storage/toolbox/update_icon() ..() cut_overlays() - if(blood_DNA && blood_DNA.len) + if(length(blood_DNA)) add_blood_overlay() if(has_latches) var/icon/I = icon('icons/obj/storage.dmi', latches) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index b756265b..49fb6720 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -741,7 +741,7 @@ var/turf/T = get_turf(target) if(T) for(var/obj/effect/decal/cleanable/blood/B in view(T, 2)) - if(B.blood_state == "blood") + if(B.blood_state == BLOOD_STATE_BLOOD) if(B.bloodiness == 100) //Bonus for "pristine" bloodpools, also to prevent cheese with footprint spam temp += 30 else diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 98f95a7c..13a332de 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -255,7 +255,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' var/mob/living/carbon/human/target = null - var/list/mob/living/carbon/human/possible = list() + var/list/mob/living/carbon/human/possible var/obj/item/voodoo_link = null var/cooldown_time = 30 //3s var/cooldown = 0 @@ -293,7 +293,7 @@ user.unset_machine() /obj/item/voodoo/attack_self(mob/user) - if(!target && possible.len) + if(!target && length(possible)) target = input(user, "Select your victim!", "Voodoo") as null|anything in possible return @@ -333,12 +333,12 @@ cooldown = world.time + cooldown_time /obj/item/voodoo/proc/update_targets() - LAZYINITLIST(possible) + possible = null if(!voodoo_link) return for(var/mob/living/carbon/human/H in GLOB.alive_mob_list) if(md5(H.dna.uni_identity) in voodoo_link.fingerprints) - possible |= H + LAZYOR(possible, H) /obj/item/voodoo/proc/GiveHint(mob/victim,force=0) if(prob(50) || force) diff --git a/code/modules/detectivework/detective_work.dm b/code/modules/detectivework/detective_work.dm index 0f3b6532..7ab5b2db 100644 --- a/code/modules/detectivework/detective_work.dm +++ b/code/modules/detectivework/detective_work.dm @@ -9,8 +9,7 @@ else if(M.bloody_hands > 1) if(add_blood_DNA(M.blood_DNA, M.diseases)) M.bloody_hands-- - if(!suit_fibers) - suit_fibers = list() + LAZYINITLIST(suit_fibers) var/fibertext var/item_multiplier = isitem(src)?1.2:1 if(M.wear_suit) @@ -93,15 +92,10 @@ fingerprints[full_print] = full_print /atom/proc/transfer_fingerprints_to(atom/A) - // Make sure everything are lists. - LAZYINITLIST(A.fingerprints) - LAZYINITLIST(A.fingerprintshidden) - LAZYINITLIST(fingerprints) - LAZYINITLIST(fingerprintshidden) - - // Transfer if(fingerprints) - A.fingerprints |= fingerprints.Copy() //detective + LAZYINITLIST(A.fingerprints) + A.fingerprints |= fingerprints //detective if(fingerprintshidden) - A.fingerprintshidden |= fingerprintshidden.Copy() //admin + LAZYINITLIST(A.fingerprintshidden) + A.fingerprintshidden |= fingerprintshidden //admin A.fingerprintslast = fingerprintslast diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 757aadae..051aea93 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -33,7 +33,7 @@ bleed_rate = 0 return - if(bleed_rate <= 0) + if(bleed_rate < 0) bleed_rate = 0 if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood. @@ -91,12 +91,12 @@ //We want an accurate reading of .len listclearnulls(BP.embedded_objects) - temp_bleed += 0.5*BP.embedded_objects.len + temp_bleed += 0.5 * BP.embedded_objects.len if(brutedamage >= 20) temp_bleed += (brutedamage * 0.013) - bleed_rate = max(bleed_rate - 0.50, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases + bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases if(bleed_rate && !bleedsuppress && !(HAS_TRAIT(src, TRAIT_FAKEDEATH))) bleed(bleed_rate) @@ -286,8 +286,7 @@ drop.update_icon() 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.blood_DNA.Copy() //transfer dna from drip to splatter. qdel(drop)//the drip is replaced by a bigger splatter else drop = new(T, get_static_viruses()) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 16a6b4ed..f5b00200 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -49,7 +49,6 @@ //Gets filled up in create_bodyparts() var/list/hand_bodyparts = list() //a collection of arms (or actually whatever the fug /bodyparts you monsters use to wreck my systems) - var/list/leg_bodyparts = list() var/icon_render_key = "" var/static/list/limb_icon_cache = list() diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index a78f4574..343f22d7 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -85,7 +85,7 @@ if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage amount = -amount if(amount > 0) - blood_volume -= 3*amount // x5 is too much, x3 should be still penalizing enough. + blood_volume -= 3 * amount //5x was too much, this is punishing enough. else blood_volume -= amount return ..() diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index c6fb6870..95f1a69c 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -59,7 +59,7 @@ var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T if(oldFP && (oldFP.blood_state == S.blood_state && oldFP.color == bloodtype_to_color(S.last_bloodtype))) return - S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state]-BLOOD_LOSS_PER_STEP) + S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP) var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T) FP.blood_state = S.blood_state FP.entered_dirs |= dir diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 8e512fa5..3601f1ca 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -474,7 +474,7 @@ if(isturf(next)) if(bloodiness) var/obj/effect/decal/cleanable/blood/tracks/B = new(loc) - if(blood_DNA && blood_DNA.len) + if(length(blood_DNA)) B.blood_DNA |= blood_DNA.Copy() var/newdir = get_dir(next, loc) if(newdir == dir) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index d1bca659..85f42356 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1128,7 +1128,7 @@ /datum/reagent/iron/on_mob_life(mob/living/carbon/C) if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio)) - C.blood_volume += 0.01 //we'll have synthetics from medbay. + C.blood_volume += 0.25 ..() /datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume) diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 29afcc8c..408133d2 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -774,8 +774,6 @@ px_y = 12 stam_heal_tick = 2 max_stamina_damage = 50 - var/blood_state = BLOOD_STATE_NOT_BLOODY - var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0) /obj/item/bodypart/l_leg/is_disabled() if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG)) @@ -840,8 +838,6 @@ px_y = 12 max_stamina_damage = 50 stam_heal_tick = 2 - var/blood_state = BLOOD_STATE_NOT_BLOODY - var/list/bloody_legs = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0) /obj/item/bodypart/r_leg/is_disabled() if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG)) diff --git a/code/modules/surgery/bodyparts/helpers.dm b/code/modules/surgery/bodyparts/helpers.dm index c6e2da08..d33d0167 100644 --- a/code/modules/surgery/bodyparts/helpers.dm +++ b/code/modules/surgery/bodyparts/helpers.dm @@ -31,7 +31,7 @@ return FALSE /mob/living/carbon/alien/larva/has_left_hand() - return 1 + return TRUE /mob/proc/has_right_hand(check_disabled = TRUE) @@ -45,7 +45,7 @@ return FALSE /mob/living/carbon/alien/larva/has_right_hand() - return 1 + return TRUE diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 40e20d60..e84cd518 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -227,13 +227,6 @@ obj/item/organ/heart/cybernetic/upgraded/on_life() icon_state = "heart-c" organ_flags = ORGAN_SYNTHETIC -/obj/item/organ/heart/ipc/emp_act() - . = ..() - if(. & EMP_PROTECT_SELF) - return - Stop() - addtimer(CALLBACK(src, .proc/Restart), 10) - /obj/item/organ/heart/freedom name = "heart of freedom" desc = "This heart pumps with the passion to give... something freedom." diff --git a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm index 164fa944..d9f2cdf0 100644 --- a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm +++ b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm @@ -2,7 +2,7 @@ /datum/reagent/consumable/semen name = "Semen" id = "semen" - description = "Sperm from some animal. I bet you'll drink this out of a bucket someday." + description = "Sperm from some animal. Useless for anything but insemination, really." taste_description = "something salty" taste_mult = 2 //Not very overpowering flavor data = list("donor"=null,"viruses"=null,"donor_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null) @@ -36,15 +36,15 @@ icon_state = "semen1" random_icon_states = list("semen1", "semen2", "semen3", "semen4") -/obj/effect/decal/cleanable/semen/New() - ..() - dir = pick(1,2,4,8) +/obj/effect/decal/cleanable/semen/Initialize(mapload) + . = ..() + dir = GLOB.cardinals add_blood_DNA(list("Non-human DNA" = "A+")) /obj/effect/decal/cleanable/semen/replace_decal(obj/effect/decal/cleanable/semen/S) if(S.blood_DNA) - blood_DNA |= S.blood_DNA.Copy() - ..() + blood_DNA |= S.blood_DNA + return ..() /datum/reagent/consumable/femcum name = "Female Ejaculate" @@ -70,15 +70,15 @@ blood_state = null bloodiness = null -/obj/effect/decal/cleanable/femcum/New() - ..() - dir = pick(1,2,4,8) +/obj/effect/decal/cleanable/femcum/Initialize(mapload) + . = ..() + dir = GLOB.cardinals add_blood_DNA(list("Non-human DNA" = "A+")) /obj/effect/decal/cleanable/femcum/replace_decal(obj/effect/decal/cleanable/femcum/F) if(F.blood_DNA) - blood_DNA |= F.blood_DNA.Copy() - ..() + blood_DNA |= F.blood_DNA + return ..() /datum/reagent/consumable/femcum/reaction_turf(turf/T, reac_volume) if(!istype(T))