From 24cbe67f27389ecc3de3c822ebaa40b7f1ead3cc Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 24 Jan 2020 21:18:19 -0700 Subject: [PATCH] optimizations, unnecessary crap, undocumented ipc change --- code/__DEFINES/components.dm | 2 -- code/_globalvars/lists/mobs.dm | 12 +++--------- code/game/atoms.dm | 5 ++--- code/game/machinery/suit_storage_unit.dm | 2 +- code/modules/surgery/organs/heart.dm | 9 --------- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index a4ee7cc3cc..be29b70f6a 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -275,8 +275,6 @@ #define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool. #define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength) -//Blood color -#define COMSIG_BLOOD_COLOR "blood_DNA_to_color" //RGB blood stuff //Food #define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder) diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index ae385339be..ffad931cd8 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -91,13 +91,7 @@ GLOBAL_LIST_INIT(all_types_bloods,list( "BUG" )) -GLOBAL_LIST_INIT(blood_types, list( - "blood", - "jellyblood" +GLOBAL_LIST_INIT(blood_reagent_types, list( + /datum/reagent/blood, + /datum/reagent/blood/jellyblood )) - -GLOBAL_LIST_INIT(blood_id_types, list( - "blood" = /datum/reagent/blood, - "jellyblood" = /datum/reagent/blood/jellyblood - )) - diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 1f62be8a24..465ac2e2a3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -505,9 +505,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 670ce91674..42d38d2a04 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/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 51784bdc61..2d70f44e06 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -220,21 +220,12 @@ obj/item/organ/heart/cybernetic/upgraded/on_life() addtimer(VARSET_CALLBACK(src, dose_available, TRUE), 5 MINUTES) ramount = 0 - - /obj/item/organ/heart/ipc name = "IPC heart" desc = "An electronic pump that regulates hydraulic functions, they have an auto-restart after EMPs." 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."