diff --git a/aurorastation.dme b/aurorastation.dme index 2e12fdc9e54..7084c9a12a6 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -2049,11 +2049,18 @@ #include "code\modules\organs\organ.dm" #include "code\modules\organs\organ_external.dm" #include "code\modules\organs\organ_icon.dm" -#include "code\modules\organs\organ_internal.dm" #include "code\modules\organs\organ_stump.dm" #include "code\modules\organs\pain.dm" #include "code\modules\organs\robolimbs.dm" #include "code\modules\organs\wound.dm" +#include "code\modules\organs\internal\_internal.dm" +#include "code\modules\organs\internal\appendix.dm" +#include "code\modules\organs\internal\brain.dm" +#include "code\modules\organs\internal\eyes.dm" +#include "code\modules\organs\internal\heart.dm" +#include "code\modules\organs\internal\kidneys.dm" +#include "code\modules\organs\internal\liver.dm" +#include "code\modules\organs\internal\lungs.dm" #include "code\modules\organs\subtypes\autakh.dm" #include "code\modules\organs\subtypes\diona.dm" #include "code\modules\organs\subtypes\industrial.dm" diff --git a/code/ATMOSPHERICS/he_pipes.dm b/code/ATMOSPHERICS/he_pipes.dm index 217c89a08c4..51359ff6efb 100644 --- a/code/ATMOSPHERICS/he_pipes.dm +++ b/code/ATMOSPHERICS/he_pipes.dm @@ -78,7 +78,7 @@ heat_limit = H.species.heat_level_3 if(pipe_air.temperature > heat_limit + 1) - buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest", used_weapon = "Excessive Heat") + buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BP_CHEST, used_weapon = "Excessive Heat") //fancy radiation glowing if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index e3117e026f9..4fb32e22492 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -117,14 +117,14 @@ mob/living/carbon/human/airflow_hit(atom/A) bloody_body(src) var/b_loss = airflow_speed * vsc.airflow_damage - var/blocked = run_armor_check("head","melee") - apply_damage(b_loss/3, BRUTE, "head", blocked, 0, "Airflow") + var/blocked = run_armor_check(BP_HEAD,"melee") + apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, 0, "Airflow") - blocked = run_armor_check("chest","melee") - apply_damage(b_loss/3, BRUTE, "chest", blocked, 0, "Airflow") + blocked = run_armor_check(BP_CHEST,"melee") + apply_damage(b_loss/3, BRUTE, BP_CHEST, blocked, 0, "Airflow") - blocked = run_armor_check("groin","melee") - apply_damage(b_loss/3, BRUTE, "groin", blocked, 0, "Airflow") + blocked = run_armor_check(BP_GROIN,"melee") + apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, 0, "Airflow") if(airflow_speed > 10) Paralyse(round(airflow_speed * vsc.airflow_stun)) diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index e0a3c55a5ad..80ac5068272 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -455,13 +455,13 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs) //Always check these damage procs first if fire damage isn't working. They're probably what's wrong. - apply_damage(2.5*mx*head_exposure, BURN, "head", 0, 0, "Fire") - apply_damage(2.5*mx*chest_exposure, BURN, "chest", 0, 0, "Fire") - apply_damage(2.0*mx*groin_exposure, BURN, "groin", 0, 0, "Fire") - apply_damage(0.6*mx*legs_exposure, BURN, "l_leg", 0, 0, "Fire") - apply_damage(0.6*mx*legs_exposure, BURN, "r_leg", 0, 0, "Fire") - apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire") - apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire") + apply_damage(2.5*mx*head_exposure, BURN, BP_HEAD, 0, 0, "Fire") + apply_damage(2.5*mx*chest_exposure, BURN, BP_CHEST, 0, 0, "Fire") + apply_damage(2.0*mx*groin_exposure, BURN, BP_GROIN, 0, 0, "Fire") + apply_damage(0.6*mx*legs_exposure, BURN, BP_L_LEG, 0, 0, "Fire") + apply_damage(0.6*mx*legs_exposure, BURN, BP_R_LEG, 0, 0, "Fire") + apply_damage(0.4*mx*arms_exposure, BURN, BP_L_ARM, 0, 0, "Fire") + apply_damage(0.4*mx*arms_exposure, BURN, BP_R_ARM, 0, 0, "Fire") #undef FIRE_LIGHT_1 diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm index f1e14c0c28e..8ba2fd3d6e6 100644 --- a/code/ZAS/Phoron.dm +++ b/code/ZAS/Phoron.dm @@ -126,7 +126,7 @@ obj/var/contaminated = 0 if (!has_eyes() || species.eyes_are_impermeable) return - var/obj/item/organ/eyes/E = get_eyes(no_synthetic = TRUE) + var/obj/item/organ/internal/eyes/E = get_eyes(no_synthetic = TRUE) if(E) if(prob(20)) to_chat(src, "Your eyes burn!") E.damage += 2.5 diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm index a4e41ab4ce5..6568fdc802b 100644 --- a/code/__defines/chemistry.dm +++ b/code/__defines/chemistry.dm @@ -49,6 +49,7 @@ #define CE_ANTIBIOTIC "antibiotic" // Spaceacilin #define CE_BLOODRESTORE "bloodrestore" // Iron/nutriment #define CE_PAINKILLER "painkiller" +#define CE_TOXIN "toxins" //General toxins #define CE_ALCOHOL "alcohol" // Liver filtering #define CE_ALCOHOL_TOXIC "alcotoxic" // Liver damage #define CE_SPEEDBOOST "gofast" // Hyperzine diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index e5624288fe6..7865fb92861 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -52,6 +52,43 @@ #define I_GRAB "grab" #define I_HURT "harm" +// Limbs and robotic stuff. +#define BP_L_FOOT "l_foot" +#define BP_R_FOOT "r_foot" +#define BP_L_LEG "l_leg" +#define BP_R_LEG "r_leg" +#define BP_L_HAND "l_hand" +#define BP_R_HAND "r_hand" +#define BP_L_ARM "l_arm" +#define BP_R_ARM "r_arm" +#define BP_HEAD "head" +#define BP_CHEST "chest" +#define BP_GROIN "groin" +#define BP_ALL_LIMBS list(BP_CHEST, BP_GROIN, BP_HEAD, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT) +#define BP_IS_ROBOTIC(org) (org.status & ORGAN_ROBOT) + +//Generic organs +#define BP_EYES "eyes" +#define BP_HEART "heart" +#define BP_LUNGS "lungs" +#define BP_BRAIN "brain" +#define BP_LIVER "liver" +#define BP_KIDNEYS "kidneys" +#define BP_APPENDIX "appendix" + +//Aut'akh organs +#define BP_ANCHOR "anchor" +#define BP_HAEMO "haemodynamic" +#define BP_ADRENAL "adrenal" + +//IPC organs +#define BP_CELL "cell" +#define BP_OPTICS "optics" +#define BP_IPCTAG "ipc tag" + +//Organ defines +#define PROCESS_ACCURACY 10 + //These are used Bump() code for living mobs, in the mob_bump_flag, mob_swap_flags, and mob_push_flags vars to determine whom can bump/swap with whom. #define HUMAN 1 #define MONKEY 2 diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index d337022ed39..c7505af0964 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -173,9 +173,9 @@ Proc for attack log creation, because really why not /proc/get_exposed_defense_zone(var/atom/movable/target) var/obj/item/grab/G = locate() in target if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people. - return pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg") + return pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG) else - return pick("chest", "groin") + return pick(BP_CHEST, BP_GROIN) // Returns true if M was not already in the dead mob list diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 47d1b9a9261..e11c36b9a78 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -784,18 +784,18 @@ proc/get_mob_with_client_list() /proc/parse_zone(zone) - if(zone == "r_hand") return "right hand" - else if (zone == "l_hand") return "left hand" - else if (zone == "l_arm") return "left arm" - else if (zone == "r_arm") return "right arm" - else if (zone == "l_leg") return "left leg" - else if (zone == "r_leg") return "right leg" - else if (zone == "l_foot") return "left foot" - else if (zone == "r_foot") return "right foot" - else if (zone == "l_hand") return "left hand" - else if (zone == "r_hand") return "right hand" - else if (zone == "l_foot") return "left foot" - else if (zone == "r_foot") return "right foot" + if(zone == BP_R_HAND) return "right hand" + else if (zone == BP_L_HAND) return "left hand" + else if (zone == BP_L_ARM) return "left arm" + else if (zone == BP_R_ARM) return "right arm" + else if (zone == BP_L_LEG) return "left leg" + else if (zone == BP_R_LEG) return "right leg" + else if (zone == BP_L_FOOT) return "left foot" + else if (zone == BP_R_FOOT) return "right foot" + else if (zone == BP_L_HAND) return "left hand" + else if (zone == BP_R_HAND) return "right hand" + else if (zone == BP_L_FOOT) return "left foot" + else if (zone == BP_R_FOOT) return "right foot" else return zone /proc/get(atom/loc, type) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 866f23d07a8..a5cd1f4962c 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -156,7 +156,7 @@ src.adding += using inv_box = new /obj/screen/inventory() - inv_box.name = "r_hand" + inv_box.name = BP_R_HAND inv_box.icon = ui_style inv_box.icon_state = "r_hand_inactive" if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use @@ -171,7 +171,7 @@ src.adding += inv_box inv_box = new /obj/screen/inventory() - inv_box.name = "l_hand" + inv_box.name = BP_L_HAND inv_box.icon = ui_style inv_box.icon_state = "l_hand_inactive" if(mymob && mymob.hand) //This being 1 means the left hand is in use diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 5a709354fb0..e47a3463fc2 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -102,7 +102,7 @@ name = "damage zone" icon_state = "zone_sel" screen_loc = ui_zonesel - var/selecting = "chest" + var/selecting = BP_CHEST /obj/screen/zone_sel/Click(location, control,params) var/list/PL = params2list(params) @@ -114,52 +114,52 @@ if(1 to 3) //Feet switch(icon_x) if(10 to 15) - selecting = "r_foot" + selecting = BP_R_FOOT if(17 to 22) - selecting = "l_foot" + selecting = BP_L_FOOT else return 1 if(4 to 9) //Legs switch(icon_x) if(10 to 15) - selecting = "r_leg" + selecting = BP_R_LEG if(17 to 22) - selecting = "l_leg" + selecting = BP_L_LEG else return 1 if(10 to 13) //Hands and groin switch(icon_x) if(8 to 11) - selecting = "r_hand" + selecting = BP_R_HAND if(12 to 20) - selecting = "groin" + selecting = BP_GROIN if(21 to 24) - selecting = "l_hand" + selecting = BP_L_HAND else return 1 if(14 to 22) //Chest and arms to shoulders switch(icon_x) if(8 to 11) - selecting = "r_arm" + selecting = BP_R_ARM if(12 to 20) - selecting = "chest" + selecting = BP_CHEST if(21 to 24) - selecting = "l_arm" + selecting = BP_L_ARM else return 1 if(23 to 30) //Head, but we need to check for eye or mouth if(icon_x in 12 to 20) - selecting = "head" + selecting = BP_HEAD switch(icon_y) if(23 to 24) if(icon_x in 15 to 17) selecting = "mouth" if(26) //Eyeline, eyes are on 15 and 17 if(icon_x in 14 to 18) - selecting = "eyes" + selecting = BP_EYES if(25 to 27) if(icon_x in 15 to 17) - selecting = "eyes" + selecting = BP_EYES if(old_selecting != selecting) update_icon() @@ -279,11 +279,11 @@ if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech return 1 switch(name) - if("r_hand") + if(BP_R_HAND) if(iscarbon(usr)) var/mob/living/carbon/C = usr C.activate_hand("r") - if("l_hand") + if(BP_L_HAND) if(iscarbon(usr)) var/mob/living/carbon/C = usr C.activate_hand("l") diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index cdbd6ccbc0e..d62eb48376c 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -48,7 +48,7 @@ avoid code duplication. This includes items that may sometimes act as a standard return //I would prefer to rename this attack_as_weapon(), but that would involve touching hundreds of files. -/obj/item/proc/attack(mob/living/M, mob/living/user, var/target_zone = "chest") +/obj/item/proc/attack(mob/living/M, mob/living/user, var/target_zone = BP_CHEST) if(!force || (flags & NOBLUDGEON)) return 0 diff --git a/code/controllers/hooks-defs.dm b/code/controllers/hooks-defs.dm index 5a1026d5de7..26ba5f70bb7 100644 --- a/code/controllers/hooks-defs.dm +++ b/code/controllers/hooks-defs.dm @@ -33,7 +33,7 @@ /** * Debrained hook. * Called in brain_item.dm when someone gets debrained. - * Parameters: var/obj/item/organ/brain + * Parameters: var/obj/item/organ/internal/brain */ /hook/debrain diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm index 132a5d4000c..dee7f276d1f 100644 --- a/code/controllers/subsystems/job.dm +++ b/code/controllers/subsystems/job.dm @@ -387,8 +387,8 @@ EquipItemsStorage(H, H.client.prefs, spawn_in_storage) if(istype(H) && !megavend) //give humans wheelchairs, if they need them. - var/obj/item/organ/external/l_foot = H.get_organ("l_foot") - var/obj/item/organ/external/r_foot = H.get_organ("r_foot") + var/obj/item/organ/external/l_foot = H.get_organ(BP_L_FOOT) + var/obj/item/organ/external/r_foot = H.get_organ(BP_R_FOOT) if(!l_foot || !r_foot) var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc) H.buckled = W @@ -531,8 +531,8 @@ EquipItemsStorage(H, H.client.prefs, spawn_in_storage) if(istype(H)) //give humans wheelchairs, if they need them. - var/obj/item/organ/external/l_foot = H.get_organ("l_foot") - var/obj/item/organ/external/r_foot = H.get_organ("r_foot") + var/obj/item/organ/external/l_foot = H.get_organ(BP_L_FOOT) + var/obj/item/organ/external/r_foot = H.get_organ(BP_R_FOOT) if(!l_foot || !r_foot) var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc) H.buckled = W diff --git a/code/controllers/subsystems/records.dm b/code/controllers/subsystems/records.dm index 4630041abbe..03e5d748216 100644 --- a/code/controllers/subsystems/records.dm +++ b/code/controllers/subsystems/records.dm @@ -270,4 +270,4 @@ /datum/controller/subsystem/records/proc/get_religion_record_name(var/target_religion) var/datum/religion/religion = SSrecords.religions[target_religion] if(religion) - return religion.get_records_name() \ No newline at end of file + return religion.get_records_name() diff --git a/code/controllers/subsystems/traumas.dm b/code/controllers/subsystems/traumas.dm index 77f17d2a00e..b69fcbc2805 100644 --- a/code/controllers/subsystems/traumas.dm +++ b/code/controllers/subsystems/traumas.dm @@ -74,12 +74,12 @@ var/datum/controller/subsystem/traumas/SStraumas /obj/item/toy/plushie/lizard)), "skrell" = typecacheof(list(/obj/structure/sign/flag/jargon, /obj/item/clothing/ears/skrell, /obj/item/clothing/suit/space/void/skrell, - /obj/item/clothing/head/helmet/space/void/skrell, /obj/item/organ/brain/skrell, /obj/item/organ/eyes/skrell, - /obj/item/organ/heart/skrell, /obj/item/organ/kidneys/skrell, /obj/item/organ/liver/skrell, /obj/item/organ/lungs/skrell, + /obj/item/clothing/head/helmet/space/void/skrell, /obj/item/organ/internal/brain/skrell, /obj/item/organ/internal/eyes/skrell, + /obj/item/organ/internal/heart/skrell, /obj/item/organ/internal/kidneys/skrell, /obj/item/organ/internal/liver/skrell, /obj/item/organ/internal/lungs/skrell, /obj/item/reagent_containers/food/snacks/skrellsnacks)), "robots" = typecacheof(list(/obj/item/device/electronic_assembly/drone, /obj/item/holder/drone, /obj/item/device/mmi/digital, - /obj/item/organ/ipc_tag, /obj/machinery/computer/borgupload, /obj/item/clothing/suit/cyborg_suit, + /obj/item/organ/internal/ipc_tag, /obj/machinery/computer/borgupload, /obj/item/clothing/suit/cyborg_suit, /obj/machinery/cryopod/robot, /obj/machinery/robotic_fabricator, /obj/effect/decal/cleanable/blood/gibs/robot, /obj/effect/decal/remains/robot, /obj/item/robot_parts, /obj/item/organ/cell, /obj/item/organ/data, /obj/item/toy/figure/borg)), diff --git a/code/datums/brain_damage/brain_trauma.dm b/code/datums/brain_damage/brain_trauma.dm index 34efc120fa9..3bc1f451d0b 100644 --- a/code/datums/brain_damage/brain_trauma.dm +++ b/code/datums/brain_damage/brain_trauma.dm @@ -6,7 +6,7 @@ var/desc = "A trauma caused by brain damage, which causes issues to the patient." var/scan_desc = "a generic brain trauma" //description when detected by a health scanner var/mob/living/carbon/owner //the poor bastard - var/obj/item/organ/brain/brain //the poor bastard's brain + var/obj/item/organ/internal/brain/brain //the poor bastard's brain var/gain_text = "You feel traumatized." var/lose_text = "You no longer feel traumatized." var/can_gain = TRUE //can this be gained through random traumas? @@ -19,7 +19,7 @@ //CURE_CRYSTAL - cures traumas that have physical effects //CURE_SURGERY - cures traumas not covered above -/datum/brain_trauma/New(obj/item/organ/brain/B, _permanent) +/datum/brain_trauma/New(obj/item/organ/internal/brain/B, _permanent) brain = B owner = B.owner permanent = _permanent diff --git a/code/datums/brain_damage/schizo.dm b/code/datums/brain_damage/schizo.dm index cca4113844c..6a1bcd543bd 100644 --- a/code/datums/brain_damage/schizo.dm +++ b/code/datums/brain_damage/schizo.dm @@ -158,7 +158,7 @@ var/codeword var/objective -/datum/brain_trauma/severe/split_personality/brainwashing/New(obj/item/organ/brain/B, _permanent, _codeword, _objective) +/datum/brain_trauma/severe/split_personality/brainwashing/New(obj/item/organ/internal/brain/B, _permanent, _codeword, _objective) ..() if(_codeword) codeword = _codeword diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm index bdbdc8d7447..7a98422916b 100644 --- a/code/datums/brain_damage/severe.dm +++ b/code/datums/brain_damage/severe.dm @@ -167,7 +167,7 @@ else if(prob(15) && ishuman(owner)) var/mob/living/carbon/human/H = owner - var/obj/item/organ/heart/heart = H.internal_organs_by_name["heart"] + var/obj/item/organ/internal/heart/heart = H.internal_organs_by_name[BP_HEART] heart.take_damage(heart.min_bruised_damage) to_chat(H, "You feel a stabbing pain in your heart!") else diff --git a/code/datums/brain_damage/special_ed.dm b/code/datums/brain_damage/special_ed.dm index 05fa1de07bb..3d5f2eea3aa 100644 --- a/code/datums/brain_damage/special_ed.dm +++ b/code/datums/brain_damage/special_ed.dm @@ -176,7 +176,7 @@ else if(prob(15) && ishuman(owner)) var/mob/living/carbon/human/H = owner - var/obj/item/organ/heart/heart = H.internal_organs_by_name["heart"] + var/obj/item/organ/internal/heart/heart = H.internal_organs_by_name[BP_HEART] heart.take_damage(heart.min_bruised_damage) to_chat(H, "You feel a stabbing pain in your heart!") else diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm index b066e0aca29..6cb48a8f79e 100644 --- a/code/datums/diseases/appendicitis.dm +++ b/code/datums/diseases/appendicitis.dm @@ -46,7 +46,7 @@ to_chat(H, "Your abdomen is a world of pain!") H.Weaken(10) - var/obj/item/organ/external/groin = H.get_organ("groin") + var/obj/item/organ/external/groin = H.get_organ(BP_GROIN) var/datum/wound/W = new /datum/wound/internal_bleeding(20) H.adjustToxLoss(25) groin.wounds += W diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 726d19a1050..f467f67a041 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -195,7 +195,7 @@ I.forceMove(H) I.imp_in = H I.implanted = 1 - var/obj/item/organ/external/affected = H.get_organ("head") + var/obj/item/organ/external/affected = H.get_organ(BP_HEAD) affected.implants += I I.part = affected diff --git a/code/datums/trading/unique.dm b/code/datums/trading/unique.dm index 078189e24aa..a98a8b49708 100644 --- a/code/datums/trading/unique.dm +++ b/code/datums/trading/unique.dm @@ -197,7 +197,7 @@ /obj/item/bluespace_crystal = TRADER_ALL, /obj/machinery/bluespacerelay = TRADER_ALL, /obj/item/stack/telecrystal = TRADER_THIS_TYPE, - /obj/item/organ/brain/golem = TRADER_THIS_TYPE, + /obj/item/organ/internal/brain/golem = TRADER_THIS_TYPE, /obj/item/device/soulstone = TRADER_THIS_TYPE, /obj/item/circuitboard/telesci_console = TRADER_THIS_TYPE, /obj/item/circuitboard/telesci_pad = TRADER_THIS_TYPE, diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 8805691b3b0..32fcbe4df94 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -59,7 +59,7 @@ matter = list(DEFAULT_WALL_MATERIAL = 50) attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") -/obj/item/cane/attack(mob/living/target, mob/living/carbon/human/user, target_zone = "chest") +/obj/item/cane/attack(mob/living/target, mob/living/carbon/human/user, target_zone = BP_CHEST) if(!(istype(target) && istype(user))) return ..() @@ -96,7 +96,7 @@ class = "notice" punct = "." soundname = 0 - if (target_zone == "head" || target_zone == "eyes" || target_zone == "mouth") + if (target_zone == BP_HEAD || target_zone == BP_EYES || target_zone == "mouth") verbtouse = pick("tapped") else verbtouse = pick("tapped","poked","prodded","touched") @@ -109,10 +109,10 @@ if (do_mob(user,target,chargedelay,display_progress=0)) if(!wasblocked && damageamount) var/chancemod = (100 - armorpercent)*0.05*damageamount // Lower chance if lower damage + high armor. Base chance is 50% at 10 damage. - if(target_zone == "l_hand" || target_zone == "l_arm") + if(target_zone == BP_L_HAND || target_zone == BP_L_ARM) if (prob(chancemod) && target.l_hand && target.l_hand != src) shoulddisarm = 1 - else if(target_zone == "r_hand" || target_zone == "r_arm") + else if(target_zone == BP_R_HAND || target_zone == BP_R_ARM) if (prob(chancemod) && target.r_hand && target.r_hand != src) shoulddisarm = 2 else diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm index c76b5fe1851..d0d1183a0d9 100644 --- a/code/game/antagonist/alien/borer.dm +++ b/code/game/antagonist/alien/borer.dm @@ -37,12 +37,12 @@ var/datum/antagonist/xenos/borer/borers var/mob/living/carbon/human/host for(var/mob/living/carbon/human/H in mob_list) if(H.stat != DEAD && !H.has_brain_worms()) - var/obj/item/organ/external/head = H.get_organ("head") + var/obj/item/organ/external/head = H.get_organ(BP_HEAD) if(head && !(head.status & ORGAN_ROBOT)) host = H break if(istype(host)) - var/obj/item/organ/external/head = host.get_organ("head") + var/obj/item/organ/external/head = host.get_organ(BP_HEAD) borer.host = host head.implants += borer borer.forceMove(head) diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 4185420347d..36448e19302 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -21,7 +21,7 @@ if(iscultist(user)) return ..() - var/zone = (user.hand ? "l_arm":"r_arm") + var/zone = (user.hand ? BP_L_ARM:BP_R_ARM) if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/external/affecting = H.get_organ(zone) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 5ac579b76d5..a1e84527be8 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -623,8 +623,8 @@ var/list/sacrificed = list() if(!(iscultist(V))) victims += V//Checks for cult status and mob type for(var/obj/item/I in src.loc)//Checks for MMIs/brains/Intellicards - if(istype(I,/obj/item/organ/brain)) - var/obj/item/organ/brain/B = I + if(istype(I,/obj/item/organ/internal/brain)) + var/obj/item/organ/internal/brain/B = I victims += B.brainmob else if(istype(I,/obj/item/device/mmi)) var/obj/item/device/mmi/B = I diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm index 8647b168487..0926ceacfb3 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -1378,7 +1378,7 @@ datum var/list/all_items = owner.current.get_contents() for(var/obj/item/device/mmi/mmi in all_items) if(mmi.brainmob&&mmi.brainmob.mind==target) return 1 - for(var/obj/item/organ/brain/brain in all_items) + for(var/obj/item/organ/internal/brain/brain in all_items) if(brain.brainmob&&brain.brainmob.mind==target) return 1 return 0 diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index aa1ee74c991..54a801eb0e8 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -410,7 +410,7 @@ datum/objective/harm if(!found) return 1 - var/obj/item/organ/external/head/head = H.get_organ("head") + var/obj/item/organ/external/head/head = H.get_organ(BP_HEAD) if(head.disfigured) return 1 return 0 diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 10866afc4b2..0d201c0b659 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -404,13 +404,13 @@ data["burnDmg"] = O.damage data["bruteDmg"] = 0 - if (istype(O, /obj/item/organ/lungs) && H.is_lung_ruptured()) + if (istype(O, /obj/item/organ/internal/lungs) && H.is_lung_ruptured()) if (O.is_broken()) wounds += get_broken_lung_desc() else wounds += get_collapsed_lung_desc() - if (istype(O, /obj/item/organ/brain) && H.has_brain_worms()) + if (istype(O, /obj/item/organ/internal/brain) && H.has_brain_worms()) wounds += "Has an abnormal growth." if (istype(O, H.species.vision_organ)) diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index 405809d1a01..95d757fddec 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -16,11 +16,11 @@ var/stored_matter = 200 var/loaded_dna //Blood sample for DNA hashing. var/list/products = list( - "heart" = list(/obj/item/organ/heart, 50), - "lungs" = list(/obj/item/organ/lungs, 40), - "kidneys" = list(/obj/item/organ/kidneys,20), - "eyes" = list(/obj/item/organ/eyes, 30), - "liver" = list(/obj/item/organ/liver, 50) + BP_HEART = list(/obj/item/organ/internal/heart, 50), + BP_LUNGS = list(/obj/item/organ/internal/lungs, 40), + BP_KIDNEYS = list(/obj/item/organ/internal/kidneys,20), + BP_EYES = list(/obj/item/organ/internal/eyes, 30), + BP_LIVER = list(/obj/item/organ/internal/liver, 50) ) /obj/machinery/bioprinter/prosthetics diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index b079867d8b5..aac2782bd94 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -695,12 +695,12 @@ playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) var/damage = rand(5,15) - H.apply_damage(2*damage, BRUTE, "head") - H.apply_damage(2*damage, BRUTE, "chest") - H.apply_damage(0.5*damage, BRUTE, "l_leg") - H.apply_damage(0.5*damage, BRUTE, "r_leg") - H.apply_damage(0.5*damage, BRUTE, "l_arm") - H.apply_damage(0.5*damage, BRUTE, "r_arm") + H.apply_damage(2*damage, BRUTE, BP_HEAD) + H.apply_damage(2*damage, BRUTE, BP_CHEST) + H.apply_damage(0.5*damage, BRUTE, BP_L_LEG) + H.apply_damage(0.5*damage, BRUTE, BP_R_LEG) + H.apply_damage(0.5*damage, BRUTE, BP_L_ARM) + H.apply_damage(0.5*damage, BRUTE, BP_R_ARM) blood_splatter(src,H,1) bloodiness += 4 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index f2f7737e0c9..ee25f9805c6 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -16,7 +16,7 @@ //They need a brain! if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - if(H.species.has_organ["brain"] && !H.has_brain()) + if(H.species.has_organ[BP_BRAIN] && !H.has_brain()) continue if(M.ckey == find_key) selected = M diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 26964e3eefa..10546225f49 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -376,7 +376,7 @@ if (!subject.has_brain()) if(istype(subject, /mob/living/carbon/human)) var/mob/living/carbon/human/H = subject - if(H.species.has_organ["brain"]) + if(H.species.has_organ[BP_BRAIN]) scantemp = "Error: No signs of intelligence detected." else scantemp = "Error: No signs of intelligence detected." diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index bb4b8ec24dc..c480e0f5cb4 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -788,7 +788,7 @@ About the new airlock wires panel: playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) if(!istype(H.head, /obj/item/clothing/head/helmet)) user.visible_message("[user] headbutts the airlock.") - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) H.Stun(8) H.Weaken(5) if(affecting.take_damage(10, 0)) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index b3eef19a543..83f2a4240bf 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -85,7 +85,7 @@ if(!H.eyecheck(TRUE) <= 0) continue flash_time *= H.species.flash_mod - var/obj/item/organ/eyes/E = H.get_eyes() + var/obj/item/organ/internal/eyes/E = H.get_eyes() if(!E) return diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index b77a56c2c5f..89dbf21f2b3 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -76,8 +76,8 @@ if(src.attached) if(!(get_dist(src, src.attached) <= 1 && isturf(src.attached.loc))) - var/obj/item/organ/external/affecting = src.attached:get_organ(pick("r_arm", "l_arm")) - src.attached.visible_message("The needle is ripped out of [src.attached]'s [affecting.limb_name == "r_arm" ? "right arm" : "left arm"].", "The needle painfully rips out of your [affecting.limb_name == "r_arm" ? "right arm" : "left arm"].") + var/obj/item/organ/external/affecting = src.attached:get_organ(pick(BP_R_ARM, BP_L_ARM)) + src.attached.visible_message("The needle is ripped out of [src.attached]'s [affecting.limb_name == BP_R_ARM ? "right arm" : "left arm"].", "The needle painfully rips out of your [affecting.limb_name == BP_R_ARM ? "right arm" : "left arm"].") affecting.take_damage(brute = 5, sharp = 1) src.attached = null src.update_icon() diff --git a/code/game/machinery/kitchen/cooking_machines/_appliance.dm b/code/game/machinery/kitchen/cooking_machines/_appliance.dm index e95de697925..3a72a8a3e9e 100644 --- a/code/game/machinery/kitchen/cooking_machines/_appliance.dm +++ b/code/game/machinery/kitchen/cooking_machines/_appliance.dm @@ -356,7 +356,7 @@ for(var/obj/item/holder/H in CI.container.contents) var/mob/living/M = H.contained if (M) - M.apply_damage(rand(1,3), mobdamagetype, "chest") + M.apply_damage(rand(1,3), mobdamagetype, BP_CHEST) return TRUE diff --git a/code/game/machinery/kitchen/cooking_machines/fryer.dm b/code/game/machinery/kitchen/cooking_machines/fryer.dm index 1de887873be..82ed23c4bcf 100644 --- a/code/game/machinery/kitchen/cooking_machines/fryer.dm +++ b/code/game/machinery/kitchen/cooking_machines/fryer.dm @@ -175,7 +175,7 @@ var/obj/item/organ/external/E var/nopain - if(ishuman(victim) && user.zone_sel.selecting != "groin" && user.zone_sel.selecting != "chest") + if(ishuman(victim) && user.zone_sel.selecting != BP_GROIN && user.zone_sel.selecting != BP_CHEST) var/mob/living/carbon/human/H = victim E = H.get_organ(user.zone_sel.selecting) if(!E || !H.can_feel_pain()) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 1130529952c..3bb6d82da39 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -107,7 +107,7 @@ var/mob/living/carbon/human/M = user if(M.h_style == "Floorlength Braid" || M.h_style == "Very Long Hair") if(prob(10)) - M.apply_damage(30, BRUTE, "head") + M.apply_damage(30, BRUTE, BP_HEAD) M.apply_damage(45, HALLOSS) M.visible_message("[user]'s hair catches in the [src]!", "Your hair gets caught in the [src]!") M.say("*scream") diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 1a8e426c556..b9d500bd97d 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -102,7 +102,7 @@ R.adjustFireLoss(-wire_rate) else if(ishuman(occupant)) var/mob/living/carbon/human/H = occupant - if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < H.max_nutrition) + if(!isnull(H.internal_organs_by_name[BP_CELL]) && H.nutrition < H.max_nutrition) H.adjustNutritionLoss(-10) cell.use(7000/H.max_nutrition*10) @@ -223,7 +223,7 @@ return 1 if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!isnull(H.internal_organs_by_name["cell"])) + if(!isnull(H.internal_organs_by_name[BP_CELL])) return 1 return 0 diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 8b3e972481c..f54bac4c661 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -41,7 +41,7 @@ var/mob/living/carbon/human/H = target // if (M.health <= 0) return - var/obj/item/organ/external/temp = H.get_organ(pick("chest", "chest", "chest", "head")) + var/obj/item/organ/external/temp = H.get_organ(pick(BP_CHEST, BP_CHEST, BP_CHEST, BP_HEAD)) if(temp) var/update = 0 switch(damtype) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 73bc4c8d14a..5294402cb47 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -90,7 +90,7 @@ var/mob/living/carbon/human/M = user if(M.h_style == "Floorlength Braid" || M.h_style == "Very Long Hair") if(prob(10)) - M.apply_damage(30, BRUTE, "head") + M.apply_damage(30, BRUTE, BP_HEAD) M.apply_damage(45, HALLOSS) M.visible_message("[user]'s hair catches in the [src]!", "Your hair gets caught in the [src]!") M.say("*scream") @@ -222,7 +222,7 @@ return if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis) user.visible_message(span("warning", "[user] feeds the [target]'s hair into the [src] and flicks it on!"), span("alert", "You turn the [src] on!")) - target.apply_damage(30, BRUTE, "head") + target.apply_damage(30, BRUTE, BP_HEAD) target.apply_damage(25, HALLOSS) target.say("*scream") @@ -237,7 +237,7 @@ return if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis) user.visible_message(span("alert", "[user] starts tugging on [target]'s head as the [src] keeps running!"), span("alert", "You start tugging on [target]'s head!")) - target.apply_damage(25, BRUTE, "head") + target.apply_damage(25, BRUTE, BP_HEAD) target.apply_damage(10, HALLOSS) target.say("*scream") spawn(10) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 1054ee229f3..9b50d80dd31 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -72,8 +72,8 @@ LAZYINITLIST(blood_DNA) - var/obj/item/organ/external/l_foot = perp.get_organ("l_foot") - var/obj/item/organ/external/r_foot = perp.get_organ("r_foot") + var/obj/item/organ/external/l_foot = perp.get_organ(BP_L_FOOT) + var/obj/item/organ/external/r_foot = perp.get_organ(BP_R_FOOT) var/hasfeet = 1 if((!l_foot || l_foot.is_stump()) && (!r_foot || r_foot.is_stump())) hasfeet = 0 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 13cb27a8368..79e40aa5511 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -162,9 +162,9 @@ if (!user) return if (hasorgans(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] + var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND] if (user.hand) - temp = H.organs_by_name["l_hand"] + temp = H.organs_by_name[BP_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return @@ -544,7 +544,7 @@ var/list/global/slot_flags_enumeration = list( */ if(istype(H)) - var/obj/item/organ/eyes/eyes = H.get_eyes() + var/obj/item/organ/internal/eyes/eyes = H.get_eyes() if(H != user) M.visible_message( @@ -572,7 +572,7 @@ var/list/global/slot_flags_enumeration = list( if (eyes.damage >= eyes.min_broken_damage) if(M.stat != 2) to_chat(M, "You go blind!") - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) if(affecting.take_damage(7)) M:UpdateDamageIcon() else diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index c360ceeabc5..5307f3ac254 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -80,7 +80,7 @@ if(safety <= 0) flick("e_flash", M.flash) var/mob/living/carbon/human/H = M - var/obj/item/organ/eyes/E = H.get_eyes() + var/obj/item/organ/internal/eyes/E = H.get_eyes() if(!E) return diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 7607435e01c..6b4a5d9dcc0 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -94,7 +94,7 @@ outmsg = "You fail to hit the lens of [C] with [src]." if(iscarbon(target)) - if(user.zone_sel.selecting == "eyes") + if(user.zone_sel.selecting == BP_EYES) var/mob/living/carbon/C = target if(C.eyecheck() <= 0 && prob(30)) outmsg = "You blind [C] with [src]" diff --git a/code/game/objects/items/devices/lighting/flashlight.dm b/code/game/objects/items/devices/lighting/flashlight.dm index 77d3903062b..4e5f7401714 100644 --- a/code/game/objects/items/devices/lighting/flashlight.dm +++ b/code/game/objects/items/devices/lighting/flashlight.dm @@ -50,7 +50,7 @@ /obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob) add_fingerprint(user) - if(on && user.zone_sel.selecting == "eyes") + if(on && user.zone_sel.selecting == BP_EYES) if(((user.is_clumsy()) || (DUMB in user.mutations)) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head @@ -171,4 +171,4 @@ brightness_on = 2 w_class = 1 light_wedge = LIGHT_WIDE - body_parts_covered = 0 \ No newline at end of file + body_parts_covered = 0 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 3777b06cd8c..650bf76c1c1 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -192,7 +192,7 @@ BREATH ANALYZER continue var/limb = e.name if(e.status & ORGAN_BROKEN) - if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED))) + if(((e.name == BP_L_ARM) || (e.name == BP_R_ARM) || (e.name == BP_L_LEG) || (e.name == BP_R_LEG)) && (!(e.status & ORGAN_SPLINTED))) to_chat(user, "Unsecured fracture in subject [limb]. Splinting recommended for transport.") if(e.has_infected_wound()) to_chat(user, "Infected wound detected in subject [limb]. Disinfection recommended.") @@ -524,7 +524,7 @@ BREATH ANALYZER if(50 to INFINITY) to_chat(user,"Severe oxygen deprivation detected.") - var/obj/item/organ/L = H.internal_organs_by_name["lungs"] + var/obj/item/organ/L = H.internal_organs_by_name[BP_LUNGS] if(istype(L)) if(L.is_bruised()) to_chat(user,"Ruptured lung detected.") diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 63c8e94d8b6..32097dc96cf 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -32,35 +32,35 @@ name = "left arm" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "l_arm" - part = list("l_arm","l_hand") + part = list(BP_L_ARM,BP_L_HAND) model_info = 1 /obj/item/robot_parts/r_arm name = "right arm" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "r_arm" - part = list("r_arm","r_hand") + part = list(BP_R_ARM,BP_R_HAND) model_info = 1 /obj/item/robot_parts/l_leg name = "left leg" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "l_leg" - part = list("l_leg","l_foot") + part = list(BP_L_LEG,BP_L_FOOT) model_info = 1 /obj/item/robot_parts/r_leg name = "right leg" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "r_leg" - part = list("r_leg","r_foot") + part = list(BP_R_LEG,BP_R_FOOT) model_info = 1 /obj/item/robot_parts/chest name = "torso" desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell." icon_state = "chest" - part = list("groin","chest") + part = list(BP_GROIN,BP_CHEST) var/wires = 0.0 var/obj/item/cell/cell = null @@ -68,7 +68,7 @@ name = "head" desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals." icon_state = "head" - part = list("head") + part = list(BP_HEAD) var/obj/item/device/flash/flash1 = null var/obj/item/device/flash/flash2 = null var/law_manager = TRUE diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index a181d4c5c06..3d4b0e82425 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -35,7 +35,7 @@ Contains: var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) - if(affecting.name == "head") + if(affecting.name == BP_HEAD) if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space)) to_chat(user, "You can't apply [src] through [H.head]!") return 1 @@ -355,7 +355,7 @@ Contains: amount = 5 max_amount = 5 drop_sound = 'sound/items/drop/hat.ogg' - var/list/splintable_organs = list("l_arm","r_arm","l_leg","r_leg", "l_hand", "r_hand", "r_foot", "l_foot") + var/list/splintable_organs = list(BP_L_ARM,BP_R_ARM,BP_L_LEG,BP_R_LEG, BP_L_HAND, BP_R_HAND, BP_R_FOOT, BP_L_FOOT) /obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob) if(..()) @@ -377,7 +377,7 @@ Contains: if (M != user) user.visible_message("[user] starts to apply \the [src] to [M]'s [limb].", "You start to apply \the [src] to [M]'s [limb].", "You hear something being wrapped.") else - if((!user.hand && affecting.limb_name == "r_arm") || (user.hand && affecting.limb_name == "l_arm")) + if((!user.hand && affecting.limb_name == BP_R_ARM) || (user.hand && affecting.limb_name == BP_L_ARM)) to_chat(user, "You can't apply a splint to the arm you're using!") return user.visible_message("[user] starts to apply \the [src] to their [limb].", "You start to apply \the [src] to your [limb].", "You hear something being wrapped.") @@ -401,4 +401,4 @@ Contains: desc = "For holding your limbs in place with duct tape and scrap metal." icon_state = "tape-splint" amount = 1 - splintable_organs = list("l_arm","r_arm","l_leg","r_leg") + splintable_organs = list(BP_L_ARM,BP_R_ARM,BP_L_LEG,BP_R_LEG) diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index b709b1db7a6..0e3d581b90d 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -45,7 +45,7 @@ if(S.get_damage()) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - if(S.limb_name == "head") + if(S.limb_name == BP_HEAD) if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space)) to_chat(user, "You can't apply [src] through [H.head]!") return diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index dc89c02a6a6..95ec866a779 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -216,7 +216,7 @@ var/const/NO_EMAG_ACT = -50 /obj/item/card/id/attack(var/mob/living/M, var/mob/user, proximity) - if(user.zone_sel.selecting == "r_hand" || user.zone_sel.selecting == "l_hand") + if(user.zone_sel.selecting == BP_R_HAND || user.zone_sel.selecting == BP_L_HAND) if(!ishuman(M)) return ..() @@ -240,11 +240,11 @@ var/const/NO_EMAG_ACT = -50 return 1 var/has_hand - var/obj/item/organ/external/O = H.organs_by_name["r_hand"] + var/obj/item/organ/external/O = H.organs_by_name[BP_R_HAND] if(istype(O) && !O.is_stump()) has_hand = 1 else - O = H.organs_by_name["l_hand"] + O = H.organs_by_name[BP_L_HAND] if(istype(O) && !O.is_stump()) has_hand = 1 if(!has_hand) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 907be5cba62..9373df9b879 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -558,9 +558,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(user.IgniteMob()) user.visible_message(span("danger","\The [user] accidentally sets themselves on fire!")) if (user.l_hand == src) - user.apply_damage(2,BURN,"l_hand") + user.apply_damage(2,BURN,BP_L_HAND) else - user.apply_damage(2,BURN,"r_hand") + user.apply_damage(2,BURN,BP_R_HAND) user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.") set_light(2, 1, l_color = LIGHT_COLOR_LAVA) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index f9e1a34d3c4..6a0f79bffd9 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -95,7 +95,7 @@ w_class = 2 /obj/item/razor/proc/shave(mob/living/carbon/human/H, location) - if(location == "head") + if(location == BP_HEAD) H.h_style = H.species.default_h_style else H.f_style = H.species.default_f_style @@ -119,7 +119,7 @@ return FALSE - if(target_zone == "head") + if(target_zone == BP_HEAD) if(H.head && (H.head.body_parts_covered & HEAD)) to_chat(user, "\The [H.head] is in the way!") return FALSE diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 2d18b346a4e..83620b670f1 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -217,7 +217,7 @@ /obj/item/ore/coal, /obj/item/ore/coal, /obj/item/stamp/clown, - /obj/item/organ/heart/skrell, + /obj/item/organ/internal/heart/skrell, /obj/item/latexballon) var/atom/movable/I = new gift_type(get_turf(M)) diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 4048d96aa7d..8247f5ed893 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -56,7 +56,7 @@ //Vaurca damage 15/01/16 var/mob/living/carbon/human/H = M if(isvaurca(H)) - var/obj/item/organ/eyes/E = H.get_eyes() + var/obj/item/organ/internal/eyes/E = H.get_eyes() if(!E) return @@ -91,7 +91,7 @@ //This really should be in mob not every check if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/eyes/E = H.get_eyes(no_synthetic = TRUE) + var/obj/item/organ/internal/eyes/E = H.get_eyes(no_synthetic = TRUE) if (E && E.damage >= E.min_bruised_damage) to_chat(M, "Your eyes start to burn badly!") if(!banglet && !(istype(src , /obj/item/grenade/flashbang/clusterbang))) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 0b0805a9a6f..ef1dc400c1d 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -91,7 +91,7 @@ if (H.wear_mask) return if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket)) return - var/obj/item/organ/external/O = H.organs_by_name[H.hand?"l_hand":"r_hand"] + var/obj/item/organ/external/O = H.organs_by_name[H.hand?BP_L_HAND:BP_R_HAND] if (!O) return var/s = "[H.name] chews on \his [O.name]!" diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index d2533c57ac4..32529455b8e 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -152,7 +152,7 @@ /obj/item/implanter/ipc_tag name = "IPC/Shell tag implanter" desc = "A special implanter used for implanting synthetics with a special tag." - var/obj/item/organ/ipc_tag/ipc_tag = null + var/obj/item/organ/internal/ipc_tag/ipc_tag = null /obj/item/implanter/ipc_tag/New() ipc_tag = new(src) @@ -175,11 +175,11 @@ return var/mob/living/carbon/human/H = M - if (!H.species || !isipc(H) || !H.organs_by_name["head"]) + if (!H.species || !isipc(H) || !H.organs_by_name[BP_HEAD]) to_chat(user, "You cannot use this on a non-synthetic organism!") return - if (H.internal_organs_by_name["ipc tag"]) + if (H.internal_organs_by_name[BP_IPCTAG]) to_chat(user, "[H] is already tagged!") return @@ -192,7 +192,7 @@ user.show_message("You implanted the implant into [M].") - ipc_tag.replaced(H, H.organs_by_name["head"]) + ipc_tag.replaced(H, H.organs_by_name[BP_HEAD]) ipc_tag = null @@ -201,7 +201,7 @@ var/datum/species/machine/machine = H.species machine.update_tag(H, H.client) -/obj/item/implanter/ipc_tag/attackby(var/obj/item/organ/ipc_tag/new_tag, mob/user as mob) +/obj/item/implanter/ipc_tag/attackby(var/obj/item/organ/internal/ipc_tag/new_tag, mob/user as mob) ..() if (!istype(new_tag)) diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index bb066744ce1..3722b5b1925 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -28,7 +28,7 @@ return ..() if(user.a_intent != I_HELP) - if(target_zone == "head" || target_zone == "eyes") + if(target_zone == BP_HEAD || target_zone == BP_EYES) if((user.is_clumsy()) && prob(50)) M = user return eyestab(M,user) diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm index a1e16e8954d..bf55fcebe0b 100644 --- a/code/game/objects/items/weapons/material/knives.dm +++ b/code/game/objects/items/weapons/material/knives.dm @@ -19,7 +19,7 @@ /obj/item/material/knife/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone) if(active == 1) - if(target_zone != "eyes" && target_zone != "head") + if(target_zone != BP_EYES && target_zone != BP_HEAD) return ..() if((user.is_clumsy()) && prob(50)) M = user diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index 6e513684f12..2c5323505a1 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -74,7 +74,7 @@ if( H.shoes || ( H.wear_suit && (H.wear_suit.body_parts_covered & FEET) ) ) return - var/list/check = list("l_foot", "r_foot") + var/list/check = list(BP_L_FOOT, BP_R_FOOT) while(check.len) var/picked = pick(check) var/obj/item/organ/external/affecting = H.get_organ(picked) diff --git a/code/game/objects/items/weapons/material/swords.dm b/code/game/objects/items/weapons/material/swords.dm index cbbe9156ac8..1fe431b7f40 100644 --- a/code/game/objects/items/weapons/material/swords.dm +++ b/code/game/objects/items/weapons/material/swords.dm @@ -38,21 +38,21 @@ user.do_attack_animation(target) - if(target_zone == "head" || target_zone == "eyes" || target_zone == "mouth") + if(target_zone == BP_HEAD || target_zone == BP_EYES || target_zone == "mouth") if(prob(70 - armor_reduction)) target.eye_blurry += 5 target.confused += 10 return TRUE - if(target_zone == "r_arm" || target_zone == "l_arm" || target_zone == "r_hand" || target_zone == "l_hand") + if(target_zone == BP_R_ARM || target_zone == BP_L_ARM || target_zone == BP_R_HAND || target_zone == BP_L_HAND) if(prob(80 - armor_reduction)) - if(target_zone == "r_arm" || target_zone == "r_hand") + if(target_zone == BP_R_ARM || target_zone == BP_R_HAND) target.drop_r_hand() else target.drop_l_hand() return TRUE - if(target_zone == "r_feet" || target_zone == "l_feet" || target_zone == "r_leg" || target_zone == "l_leg") + if(target_zone == "r_feet" || target_zone == "l_feet" || target_zone == BP_R_LEG || target_zone == BP_L_LEG) if(prob(60 - armor_reduction)) target.Weaken(5) return TRUE diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm index 87dbe34f2f9..5994b56d366 100644 --- a/code/game/objects/items/weapons/material/twohanded.dm +++ b/code/game/objects/items/weapons/material/twohanded.dm @@ -465,7 +465,7 @@ if (!istype(H) || H.status_flags & GODMODE) return - var/obj/item/organ/eyes/E = H.get_eyes() + var/obj/item/organ/internal/eyes/E = H.get_eyes() if(!istype(E)) return diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 470fa30c090..c53553b45fc 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -92,7 +92,7 @@ var/obj/item/projectile/P = damage_source var/reflectchance = base_reflectchance - round(damage/3) - if(!(def_zone in list("chest", "groin","head"))) + if(!(def_zone in list(BP_CHEST, BP_GROIN,BP_HEAD))) reflectchance /= 2 if(P.starting && prob(reflectchance)) visible_message("\The [user]'s [src.name] reflects [attack_text]!") @@ -112,7 +112,7 @@ else if(istype(damage_source, /obj/item/projectile/bullet) && can_block_bullets) var/reflectchance = (base_reflectchance) - round(damage/3) - if(!(def_zone in list("chest", "groin","head"))) + if(!(def_zone in list(BP_CHEST, BP_GROIN,BP_HEAD))) reflectchance /= 2 if(prob(reflectchance)) user.visible_message("\The [user] blocks [attack_text] with \the [src]!") diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index b40eb3eb76b..241264a9321 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -143,10 +143,10 @@ ..() if(ishuman(target)) if(prob(25)) - if(target_zone == "l_hand" || target_zone == "l_arm") + if(target_zone == BP_L_HAND || target_zone == BP_L_ARM) if (target.l_hand && target.l_hand != src) target.drop_l_hand() - else if(target_zone == "r_hand" || target_zone == "r_arm") + else if(target_zone == BP_R_HAND || target_zone == BP_R_ARM) if (target.r_hand && target.r_hand != src) target.drop_r_hand() user.visible_message("\The [user] disarms \the [target] with \the [src]!") diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 06b32fbf88a..60c0167c4ca 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -14,7 +14,7 @@ if(!user.is_wizard()) if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user - var/obj/item/organ/O = H.internal_organs_by_name[pick("eyes","appendix","kidneys","liver", "heart", "lungs", "brain")] + var/obj/item/organ/O = H.internal_organs_by_name[pick(BP_EYES,"appendix",BP_KIDNEYS,BP_LIVER, BP_HEART, BP_LUNGS, BP_BRAIN)] if(O == null) to_chat(user, span("notice", "You can't make any sense of the arcane glyphs. . . maybe you should try again.")) else diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index e060554f6f1..cbfd9f82cf9 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -49,10 +49,10 @@ if (!( user.restrained() ) && !( user.stat )) switch(over_object.name) - if("r_hand") + if(BP_R_HAND) user.u_equip(master_item) user.put_in_r_hand(master_item) - if("l_hand") + if(BP_L_HAND) user.u_equip(master_item) user.put_in_l_hand(master_item) master_item.add_fingerprint(user) diff --git a/code/game/objects/items/weapons/storage/laundry_basket.dm b/code/game/objects/items/weapons/storage/laundry_basket.dm index 111b8c349cb..db0ee2d3fcf 100644 --- a/code/game/objects/items/weapons/storage/laundry_basket.dm +++ b/code/game/objects/items/weapons/storage/laundry_basket.dm @@ -24,9 +24,9 @@ /obj/item/storage/laundry_basket/attack_hand(mob/user as mob) if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.get_organ("r_hand") + var/obj/item/organ/external/temp = H.get_organ(BP_R_HAND) if (user.hand) - temp = H.get_organ("l_hand") + temp = H.get_organ(BP_L_HAND) if(!temp) to_chat(user, "You need two hands to pick this up!") return diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 8b2ae065345..9ab8bd91440 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -80,10 +80,10 @@ return switch(over_object.name) - if("r_hand") + if(BP_R_HAND) usr.u_equip(src) usr.put_in_r_hand(src,FALSE) - if("l_hand") + if(BP_L_HAND) usr.u_equip(src) usr.put_in_l_hand(src,FALSE) src.add_fingerprint(usr) diff --git a/code/game/objects/items/weapons/surgery_limbattachment.dm b/code/game/objects/items/weapons/surgery_limbattachment.dm index 9b93af63f2a..eb0a8e407b2 100644 --- a/code/game/objects/items/weapons/surgery_limbattachment.dm +++ b/code/game/objects/items/weapons/surgery_limbattachment.dm @@ -10,14 +10,14 @@ if(!istype(M, /mob/living/carbon/human)) return ..() - if((user.zone_sel.selecting == "l_arm") && (istype(src, /obj/item/robot_parts/l_arm))) - limbloc = "l_hand" - else if((user.zone_sel.selecting == "r_arm") && (istype(src, /obj/item/robot_parts/r_arm))) - limbloc = "r_hand" - else if((user.zone_sel.selecting == "r_leg") && (istype(src, /obj/item/robot_parts/r_leg))) - limbloc = "r_foot" - else if((user.zone_sel.selecting == "l_leg") && (istype(src, /obj/item/robot_parts/l_leg))) - limbloc = "l_foot" + if((user.zone_sel.selecting == BP_L_ARM) && (istype(src, /obj/item/robot_parts/l_arm))) + limbloc = BP_L_HAND + else if((user.zone_sel.selecting == BP_R_ARM) && (istype(src, /obj/item/robot_parts/r_arm))) + limbloc = BP_R_HAND + else if((user.zone_sel.selecting == BP_R_LEG) && (istype(src, /obj/item/robot_parts/r_leg))) + limbloc = BP_R_FOOT + else if((user.zone_sel.selecting == BP_L_LEG) && (istype(src, /obj/item/robot_parts/l_leg))) + limbloc = BP_L_FOOT else to_chat(user, "That doesn't fit there!") return ..() diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 02f21ddb842..fe7281f4a5d 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -251,10 +251,10 @@ if((user && (!use_check(user))) && (user.contents.Find(src) || in_range(src, user))) if(ishuman(user) && !user.get_active_hand()) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] + var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND] if (H.hand) - temp = H.organs_by_name["l_hand"] + temp = H.organs_by_name[BP_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index c10a21045ad..a9dfdb43589 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -24,7 +24,7 @@ user.Weaken(3 * force) if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(2*force, BRUTE, "head") + H.apply_damage(2*force, BRUTE, BP_HEAD) else user.take_organ_damage(2*force) return @@ -91,7 +91,7 @@ user.Weaken(3 * force) if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(2*force, BRUTE, "head") + H.apply_damage(2*force, BRUTE, BP_HEAD) else user.take_organ_damage(2*force) return diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 419eef666a5..0258ec4dc44 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -8,9 +8,9 @@ /obj/item/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user, var/target_zone) if(istype(H)) - if(target_zone == "eyes") + if(target_zone == BP_EYES) - if(!H.organs_by_name["head"]) + if(!H.organs_by_name[BP_HEAD]) to_chat(user, "\The [H] doesn't have a head.") return if(!H.has_eyes()) @@ -28,7 +28,7 @@ return // Repeat failure checks. - if(!H || !src || !H.organs_by_name["head"] || !H.has_eyes() || H.glasses || (H.head && (H.head.body_parts_covered & FACE))) + if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.has_eyes() || H.glasses || (H.head && (H.head.body_parts_covered & FACE))) return playsound(src, 'sound/items/tape.ogg',25) @@ -36,8 +36,8 @@ H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/blindfold/tape(H), slot_glasses) H.update_inv_glasses() - else if(target_zone == "mouth" || target_zone == "head") - if(!H.organs_by_name["head"]) + else if(target_zone == "mouth" || target_zone == BP_HEAD) + if(!H.organs_by_name[BP_HEAD]) to_chat(user, "\The [H] doesn't have a head.") return if(!H.check_has_mouth()) @@ -57,7 +57,7 @@ return // Repeat failure checks. - if(!H || !src || !H.organs_by_name["head"] || !H.check_has_mouth() || H.wear_mask || (H.head && (H.head.body_parts_covered & FACE))) + if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.check_has_mouth() || H.wear_mask || (H.head && (H.head.body_parts_covered & FACE))) return playsound(src, 'sound/items/tape.ogg',25) @@ -65,7 +65,7 @@ H.equip_to_slot_or_del(new /obj/item/clothing/mask/muzzle/tape(H), slot_wear_mask) H.update_inv_wear_mask() - else if(target_zone == "r_hand" || target_zone == "l_hand") + else if(target_zone == BP_R_HAND || target_zone == BP_L_HAND) playsound(src, 'sound/items/tape.ogg',25) var/obj/item/handcuffs/cable/tape/T = new(user) if(!T.place_handcuffs(H, user)) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 3e1cdeddc80..c3413932193 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -92,7 +92,7 @@ /obj/item/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone) if(!istype(M) || user.a_intent == "help") return ..() - if(target_zone != "eyes" && target_zone != "head") + if(target_zone != BP_EYES && target_zone != BP_HEAD) return ..() if((user.is_clumsy()) && prob(50)) M = user @@ -471,7 +471,7 @@ if(!iscarbon(user)) return 1 if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user - var/obj/item/organ/eyes/E = H.get_eyes() + var/obj/item/organ/internal/eyes/E = H.get_eyes() if(!E) return var/safety = H.eyecheck() diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 1eaee4fd8c0..0f45b76b3e9 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -90,7 +90,7 @@ if(L.lying) target_zone = ran_zone() else - target_zone = pick("l_foot", "r_foot", "l_leg", "r_leg") + target_zone = pick(BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG) //armour var/blocked = L.run_armor_check(target_zone, "melee") diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm index c246999c13f..eb7312f6d64 100644 --- a/code/game/objects/items/weapons/trays.dm +++ b/code/game/objects/items/weapons/trays.dm @@ -57,7 +57,7 @@ var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later. - if(!(target_zone == ("eyes" || "head"))) //////////////hitting anything else other than the eyes + if(!(target_zone == (BP_EYES || BP_HEAD))) //////////////hitting anything else other than the eyes if(prob(33) && !issilicon(M))//robots dont bleed src.add_blood(H) var/turf/location = H.loc diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 2305ecf28ef..2fdd5b2b019 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -143,17 +143,17 @@ var/obj/item/organ/external/affecting - switch(pick(list("ankle","wrist","head","knee","elbow"))) + switch(pick(list("ankle","wrist",BP_HEAD,"knee","elbow"))) if("ankle") - affecting = H.get_organ(pick("l_foot", "r_foot")) + affecting = H.get_organ(pick(BP_L_FOOT, BP_R_FOOT)) if("knee") - affecting = H.get_organ(pick("l_leg", "r_leg")) + affecting = H.get_organ(pick(BP_L_LEG, BP_R_LEG)) if("wrist") - affecting = H.get_organ(pick("l_hand", "r_hand")) + affecting = H.get_organ(pick(BP_L_HAND, BP_R_HAND)) if("elbow") - affecting = H.get_organ(pick("l_arm", "r_arm")) - if("head") - affecting = H.get_organ("head") + affecting = H.get_organ(pick(BP_L_ARM, BP_R_ARM)) + if(BP_HEAD) + affecting = H.get_organ(BP_HEAD) if(affecting) to_chat(M, "You land heavily on your [affecting.name]!") diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 8a3a8bf8016..dfc6a816da1 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -33,9 +33,9 @@ var/mob/living/L = usr var/touchy_hand if(L.hand) - touchy_hand = "r_hand" + touchy_hand = BP_R_HAND else - touchy_hand = "l_hand" + touchy_hand = BP_L_HAND if(L.electrocute_act(17, src, ground_zero = touchy_hand)) spark(src, 5, alldirs) if(L.stunned) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 2f59d453b23..355bdddf0d7 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -34,9 +34,9 @@ return if (ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] + var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND] if (user.hand) - temp = H.organs_by_name["l_hand"] + temp = H.organs_by_name[BP_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return diff --git a/code/game/objects/structures/therapy.dm b/code/game/objects/structures/therapy.dm index 45e4546f175..f9a1834f7ac 100644 --- a/code/game/objects/structures/therapy.dm +++ b/code/game/objects/structures/therapy.dm @@ -63,10 +63,10 @@ flick("echair1", src) spark(src, 12, alldirs) if(buckled_mob && istype(C)) - if(electrocute_mob(buckled_mob, C, src, 1.25, "head")) + if(electrocute_mob(buckled_mob, C, src, 1.25, BP_HEAD)) to_chat(buckled_mob, "You feel a deep shock course through your body!") sleep(1) - if(electrocute_mob(buckled_mob, C, src, 1.25, "head")) + if(electrocute_mob(buckled_mob, C, src, 1.25, BP_HEAD)) buckled_mob.Stun(PN.get_electrocute_damage()*10) visible_message("The electric chair goes off!", "You hear an electrical discharge!") @@ -499,7 +499,7 @@ if("Initiate Neural Scan") visible_message("[connected] begins humming with an electrical tone.", "You hear an electrical humming.") if(H && connected.occupant.resolve() == H) - var/obj/item/organ/brain/sponge = H.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/sponge = H.internal_organs_by_name[BP_BRAIN] var/retardation = H.getBrainLoss() if(sponge && istype(sponge)) if(!sponge.lobotomized) @@ -555,7 +555,7 @@ visible_message("[connected] buzzes harshly.", "You hear a sharp buzz.") break - var/obj/item/organ/brain/sponge = H.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/sponge = H.internal_organs_by_name[BP_BRAIN] if (!istype(sponge) || !sponge.traumas.len) if(get_dist(user,src) <= 1) to_chat(user, "Error: Subject not recognized. Terminating operation.") diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 5ef3756c793..624fe335f4c 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -389,9 +389,9 @@ /obj/structure/sink/attack_hand(mob/user as mob) if (ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] + var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND] if (user.hand) - temp = H.organs_by_name["l_hand"] + temp = H.organs_by_name[BP_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 5d6c1ae2717..831bf036007 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -273,7 +273,7 @@ var/state = G.state qdel(G) //gotta delete it here because if window breaks, it won't get deleted - var/def_zone = ran_zone("head", 20) + var/def_zone = ran_zone(BP_HEAD, 20) var/blocked = M.run_armor_check(def_zone, "melee") switch (state) if(1) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 3d9a18ef579..115df850005 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -431,16 +431,16 @@ var/const/enterloopsanity = 100 if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/rhand = H.organs_by_name["r_hand"] + var/obj/item/organ/external/rhand = H.organs_by_name[BP_R_HAND] tally += limbCheck(rhand) - var/obj/item/organ/external/lhand = H.organs_by_name["l_hand"] + var/obj/item/organ/external/lhand = H.organs_by_name[BP_L_HAND] tally += limbCheck(lhand) - var/obj/item/organ/external/rfoot = H.organs_by_name["r_foot"] + var/obj/item/organ/external/rfoot = H.organs_by_name[BP_R_FOOT] tally += limbCheck(rfoot) - var/obj/item/organ/external/lfoot = H.organs_by_name["l_foot"] + var/obj/item/organ/external/lfoot = H.organs_by_name[BP_L_FOOT] tally += limbCheck(lfoot) if(tally >= 120) diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index a277059a54a..e9db5de95d2 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -524,7 +524,7 @@ if("fire") L.adjustFireLoss(amount) if("toxin") L.adjustToxLoss(amount) if("oxygen")L.adjustOxyLoss(amount) - if("brain") L.adjustBrainLoss(amount) + if(BP_BRAIN) L.adjustBrainLoss(amount) if("clone") L.adjustCloneLoss(amount) else to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]") diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index e351ecb4173..9c61df03d30 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -30,16 +30,16 @@ visible_message("SPLAT!") M.splat() else - var/zone = "chest" + var/zone = BP_CHEST if(ishuman(target) && target.mob_size) var/mob/living/carbon/human/H = target switch(type) if("feet") - zone = pick("l_foot", "r_foot") + zone = pick(BP_L_FOOT, BP_R_FOOT) if(!H.shoes) H.apply_effect(400/(target.mob_size*(target.mob_size*0.25)), AGONY)//Halloss instead of instant knockdown //Mainly for the benefit of giant monsters like vaurca breeders - if("l_hand", "r_hand") + if(BP_L_HAND, BP_R_HAND) zone = type if(!H.gloves) H.apply_effect(250/(target.mob_size*(target.mob_size*0.25)), AGONY) @@ -59,9 +59,9 @@ to_chat(user, "You arm [src].") else if(((user.is_clumsy()) || (DUMB in user.mutations)) && prob(50)) - var/which_hand = "l_hand" + var/which_hand = BP_L_HAND if(!user.hand) - which_hand = "r_hand" + which_hand = BP_R_HAND triggered(user, which_hand) user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ "You accidentally trigger [src]!") @@ -75,9 +75,9 @@ /obj/item/device/assembly/mousetrap/attack_hand(mob/living/user as mob) if(armed) if(((user.is_clumsy()) || (DUMB in user.mutations)) && prob(50)) - var/which_hand = "l_hand" + var/which_hand = BP_L_HAND if(!user.hand) - which_hand = "r_hand" + which_hand = BP_R_HAND triggered(user, which_hand) user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ "You accidentally trigger [src]!") @@ -102,7 +102,7 @@ if(armed) finder.visible_message("[finder] accidentally sets off [src], breaking their fingers.", \ "You accidentally trigger [src]!") - triggered(finder, finder.hand ? "l_hand" : "r_hand") + triggered(finder, finder.hand ? BP_L_HAND : BP_R_HAND) return 1 //end the search! return 0 diff --git a/code/modules/cargo/bounties/assistant.dm b/code/modules/cargo/bounties/assistant.dm index f5c2098837a..b7c2e57aec7 100644 --- a/code/modules/cargo/bounties/assistant.dm +++ b/code/modules/cargo/bounties/assistant.dm @@ -92,14 +92,14 @@ name = "Heart" description = "Commander Johnson is in critical condition after suffering a heart attack. Doctors say he needs a new heart fast. Ship one, pronto!" reward = 3000 - wanted_types = list(/obj/item/organ/heart) + wanted_types = list(/obj/item/organ/internal/heart) /datum/bounty/item/assistant/lung name = "Lungs" description = "A recent explosion at %BOSSNAME has left multiple staff with punctured lungs. Ship spare lungs to be rewarded." reward = 3000 required_count = 1 - wanted_types = list(/obj/item/organ/lungs) + wanted_types = list(/obj/item/organ/internal/lungs) /datum/bounty/item/assistant/appendix name = "Appendix" diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 8fcfcf368c3..787d707710d 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -210,31 +210,31 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/status = pref.organ_data[name] var/organ_name = null switch(name) - if("l_arm") + if(BP_L_ARM) organ_name = "left arm" - if("r_arm") + if(BP_R_ARM) organ_name = "right arm" - if("l_leg") + if(BP_L_LEG) organ_name = "left leg" - if("r_leg") + if(BP_R_LEG) organ_name = "right leg" - if("l_foot") + if(BP_L_FOOT) organ_name = "left foot" - if("r_foot") + if(BP_R_FOOT) organ_name = "right foot" - if("l_hand") + if(BP_L_HAND) organ_name = "left hand" - if("r_hand") + if(BP_R_HAND) organ_name = "right hand" - if("groin") + if(BP_GROIN) organ_name = "lower body" - if("chest") + if(BP_CHEST) organ_name = "upper body" - if("head") + if(BP_HEAD) organ_name = "head" - if("heart") + if(BP_HEART) organ_name = "heart" - if("eyes") + if(BP_EYES) organ_name = "eyes" if(status == "cyborg") @@ -262,11 +262,11 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O if(ind > 1) out += ", " switch(organ_name) - if("heart") + if(BP_HEART) out += "\tPacemaker-assisted [organ_name]" if("voicebox") //on adding voiceboxes for speaking skrell/similar replacements out += "\tSurgically altered [organ_name]" - if("eyes") + if(BP_EYES) out += "\tRetinal overlayed [organ_name]" else out += "\tMechanically assisted [organ_name]" @@ -538,37 +538,37 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/third_limb = null // if you try to unchange the hand, the arm should also change switch(limb_name) if("Left Leg") - limb = "l_leg" - second_limb = "l_foot" + limb = BP_L_LEG + second_limb = BP_L_FOOT if("Right Leg") - limb = "r_leg" - second_limb = "r_foot" + limb = BP_R_LEG + second_limb = BP_R_FOOT if("Left Arm") - limb = "l_arm" - second_limb = "l_hand" + limb = BP_L_ARM + second_limb = BP_L_HAND if("Right Arm") - limb = "r_arm" - second_limb = "r_hand" + limb = BP_R_ARM + second_limb = BP_R_HAND if("Left Foot") - limb = "l_foot" - third_limb = "l_leg" + limb = BP_L_FOOT + third_limb = BP_L_LEG if("Right Foot") - limb = "r_foot" - third_limb = "r_leg" + limb = BP_R_FOOT + third_limb = BP_R_LEG if("Left Hand") - limb = "l_hand" - third_limb = "l_arm" + limb = BP_L_HAND + third_limb = BP_L_ARM if("Right Hand") - limb = "r_hand" - third_limb = "r_arm" + limb = BP_R_HAND + third_limb = BP_R_ARM if("Lower Body") - limb = "groin" + limb = BP_GROIN carries_organs = 1 if("Upper Body") - limb = "chest" + limb = BP_CHEST carries_organs = 1 - if("Head") - limb = "head" + if(BP_HEAD) + limb = BP_HEAD carries_organs = 1 else to_chat(user, "Cancelled.") @@ -617,15 +617,15 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O return TOPIC_REFRESH else if(href_list["organs"]) - var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes") + var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list(BP_HEART, BP_EYES) if(!organ_name) return var/organ = null switch(organ_name) - if("Heart") - organ = "heart" - if("Eyes") - organ = "eyes" + if(BP_HEART) + organ = BP_HEART + if(BP_EYES) + organ = BP_EYES var/new_state = input(user, "What state do you wish the organ to be in?") as null|anything in list("Normal","Assisted","Mechanical") if(!new_state) return diff --git a/code/modules/client/preference_setup/general/06_flavor.dm b/code/modules/client/preference_setup/general/06_flavor.dm index b814417ef36..cc84ec67079 100644 --- a/code/modules/client/preference_setup/general/06_flavor.dm +++ b/code/modules/client/preference_setup/general/06_flavor.dm @@ -4,9 +4,9 @@ /datum/category_item/player_setup_item/general/flavor/load_character(var/savefile/S) S["flavor_texts_general"] >> pref.flavor_texts["general"] - S["flavor_texts_head"] >> pref.flavor_texts["head"] + S["flavor_texts_head"] >> pref.flavor_texts[BP_HEAD] S["flavor_texts_face"] >> pref.flavor_texts["face"] - S["flavor_texts_eyes"] >> pref.flavor_texts["eyes"] + S["flavor_texts_eyes"] >> pref.flavor_texts[BP_EYES] S["flavor_texts_torso"] >> pref.flavor_texts["torso"] S["flavor_texts_arms"] >> pref.flavor_texts["arms"] S["flavor_texts_hands"] >> pref.flavor_texts["hands"] @@ -23,9 +23,9 @@ /datum/category_item/player_setup_item/general/flavor/save_character(var/savefile/S) S["flavor_texts_general"] << pref.flavor_texts["general"] - S["flavor_texts_head"] << pref.flavor_texts["head"] + S["flavor_texts_head"] << pref.flavor_texts[BP_HEAD] S["flavor_texts_face"] << pref.flavor_texts["face"] - S["flavor_texts_eyes"] << pref.flavor_texts["eyes"] + S["flavor_texts_eyes"] << pref.flavor_texts[BP_EYES] S["flavor_texts_torso"] << pref.flavor_texts["torso"] S["flavor_texts_arms"] << pref.flavor_texts["arms"] S["flavor_texts_hands"] << pref.flavor_texts["hands"] @@ -94,9 +94,9 @@ var/list/var_list = list( "char_id" = pref.current_character, "flavour_general" = pref.flavor_texts["general"], - "flavour_head" = pref.flavor_texts["head"], + "flavour_head" = pref.flavor_texts[BP_HEAD], "flavour_face" = pref.flavor_texts["face"], - "flavour_eyes" = pref.flavor_texts["eyes"], + "flavour_eyes" = pref.flavor_texts[BP_EYES], "flavour_torso" = pref.flavor_texts["torso"], "flavour_arms" = pref.flavor_texts["arms"], "flavour_hands" = pref.flavor_texts["hands"], @@ -219,13 +219,13 @@ HTML += TextPreview(pref.flavor_texts["general"]) HTML += "
" HTML += "Head: " - HTML += TextPreview(pref.flavor_texts["head"]) + HTML += TextPreview(pref.flavor_texts[BP_HEAD]) HTML += "
" HTML += "Face: " HTML += TextPreview(pref.flavor_texts["face"]) HTML += "
" HTML += "Eyes: " - HTML += TextPreview(pref.flavor_texts["eyes"]) + HTML += TextPreview(pref.flavor_texts[BP_EYES]) HTML += "
" HTML += "Body: " HTML += TextPreview(pref.flavor_texts["torso"]) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index fc58328af30..d1c1d7203ed 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -315,9 +315,9 @@ datum/preferences character.dna.real_name = character.real_name character.flavor_texts["general"] = flavor_texts["general"] - character.flavor_texts["head"] = flavor_texts["head"] + character.flavor_texts[BP_HEAD] = flavor_texts[BP_HEAD] character.flavor_texts["face"] = flavor_texts["face"] - character.flavor_texts["eyes"] = flavor_texts["eyes"] + character.flavor_texts[BP_EYES] = flavor_texts[BP_EYES] character.flavor_texts["torso"] = flavor_texts["torso"] character.flavor_texts["arms"] = flavor_texts["arms"] character.flavor_texts["hands"] = flavor_texts["hands"] diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 1e2f24729b1..dfde80bd853 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -194,7 +194,7 @@ var/obj/item/projectile/P = damage_source var/reflectchance = 40 - round(damage/3) - if(!(def_zone in list("chest", "groin"))) + if(!(def_zone in list(BP_CHEST, BP_GROIN))) reflectchance /= 2 if(P.starting && prob(reflectchance)) visible_message("\The [user]'s [src.name] reflects [attack_text]!") diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index dcc8acc146b..3b64ca05926 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -59,11 +59,11 @@ usr.unEquip(C) switch(over_object.name) - if("r_hand") + if(BP_R_HAND) if(istype(src, /obj/item/clothing/ears)) C = check_two_ears(usr) usr.put_in_r_hand(C) - if("l_hand") + if(BP_L_HAND) if(istype(src, /obj/item/clothing/ears)) C = check_two_ears(usr) usr.put_in_l_hand(C) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 5ea4792ed0f..0f8e0621c0c 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -182,7 +182,7 @@ /obj/item/clothing/shoes/heels/attack(mob/living/carbon/M, mob/living/carbon/user, var/target_zone) if(!istype(M) || user.a_intent == "help") return ..() - if(target_zone != "eyes" && target_zone != "head") + if(target_zone != BP_EYES && target_zone != BP_HEAD) return ..() if((user.is_clumsy()) && prob(50)) M = user diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 31fa7ad685e..2f701225b81 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -231,7 +231,7 @@ if(!wearer) failed_to_seal = 1 else - for(var/list/piece_data in list(list(wearer.shoes,boots,"boots",boot_type),list(wearer.gloves,gloves,"gloves",glove_type),list(wearer.head,helmet,"helmet",helm_type),list(wearer.wear_suit,chest,"chest",chest_type))) + for(var/list/piece_data in list(list(wearer.shoes,boots,"boots",boot_type),list(wearer.gloves,gloves,"gloves",glove_type),list(wearer.head,helmet,"helmet",helm_type),list(wearer.wear_suit,chest,BP_CHEST,chest_type))) var/obj/item/piece = piece_data[1] var/obj/item/compare_piece = piece_data[2] @@ -260,7 +260,7 @@ if("gloves") to_chat(wearer, "\The [piece] [!seal_target ? "tighten around your fingers and wrists" : "become loose around your fingers"].") wearer.update_inv_gloves() - if("chest") + if(BP_CHEST) to_chat(wearer, "\The [piece] [!seal_target ? "cinches tight again your chest" : "releases your chest"].") wearer.update_inv_wear_suit() if("helmet") @@ -428,7 +428,7 @@ data["helmet"] = (helmet ? "[helmet.name]" : "None.") data["gauntlets"] = (gloves ? "[gloves.name]" : "None.") data["boots"] = (boots ? "[boots.name]" : "None.") - data["chest"] = (chest ? "[chest.name]" : "None.") + data[BP_CHEST] = (chest ? "[chest.name]" : "None.") data["charge"] = cell ? round(cell.charge,1) : 0 data["maxcharge"] = cell ? cell.maxcharge : 0 @@ -624,7 +624,7 @@ equip_to = slot_shoes use_obj = boots check_slot = wearer.shoes - if("chest") + if(BP_CHEST) equip_to = slot_wear_suit use_obj = chest check_slot = wearer.wear_suit @@ -690,11 +690,11 @@ H.wear_suit = null qdel(garbage) - for(var/piece in list("helmet","gauntlets","chest","boots")) + for(var/piece in list("helmet","gauntlets",BP_CHEST,"boots")) toggle_piece(piece, H, ONLY_DEPLOY) /obj/item/rig/proc/null_wearer(var/mob/user) - for(var/piece in list("helmet","gauntlets","chest","boots")) + for(var/piece in list("helmet","gauntlets",BP_CHEST,"boots")) toggle_piece(piece, user, ONLY_RETRACT) if(wearer) wearer.wearing_rig = null @@ -727,7 +727,7 @@ take_hit((100/severity_class), "electrical pulse", 1) /obj/item/rig/proc/shock(mob/user) - var/touchy = pick("chest","head","groin") + var/touchy = pick(BP_CHEST,BP_HEAD,BP_GROIN) if(!wearer) touchy = "hand" @@ -907,8 +907,8 @@ return wearer.pulledby.relaymove(wearer, direction) else if(istype(wearer.buckled, /obj/structure/bed/chair/wheelchair)) if(ishuman(wearer.buckled)) - var/obj/item/organ/external/l_hand = wearer.get_organ("l_hand") - var/obj/item/organ/external/r_hand = wearer.get_organ("r_hand") + var/obj/item/organ/external/l_hand = wearer.get_organ(BP_L_HAND) + var/obj/item/organ/external/r_hand = wearer.get_organ(BP_R_HAND) if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED))) return // No hands to drive your chair? Tough luck! wearer_move_delay += 2 diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm index 2479c29f010..37e78b5febd 100644 --- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm +++ b/code/modules/clothing/spacesuits/rig/rig_verbs.dm @@ -65,7 +65,7 @@ if(!check_suit_access(usr)) return - toggle_piece("chest",wearer) + toggle_piece(BP_CHEST,wearer) /obj/item/rig/proc/toggle_gauntlets() diff --git a/code/modules/clothing/spacesuits/void/wizard.dm b/code/modules/clothing/spacesuits/void/wizard.dm index 940232082da..1cf8669ba20 100644 --- a/code/modules/clothing/spacesuits/void/wizard.dm +++ b/code/modules/clothing/spacesuits/void/wizard.dm @@ -16,8 +16,8 @@ /obj/item/clothing/head/helmet/space/void/wizard/equipped(var/mob/living/user) if(!user.is_wizard()) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/LH = H.get_organ("l_hand") - var/obj/item/organ/external/RH = H.get_organ("r_hand") + var/obj/item/organ/external/LH = H.get_organ(BP_L_HAND) + var/obj/item/organ/external/RH = H.get_organ(BP_R_HAND) var/active_hand = H.hand to_chat(user, "Your hand passes through the [src] with a flash of searing heat!") playsound(user, 'sound/effects/sparks4.ogg', 40, 1) @@ -52,8 +52,8 @@ /obj/item/clothing/suit/space/void/wizard/equipped(var/mob/living/user) if(!user.is_wizard()) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/LH = H.get_organ("l_hand") - var/obj/item/organ/external/RH = H.get_organ("r_hand") + var/obj/item/organ/external/LH = H.get_organ(BP_L_HAND) + var/obj/item/organ/external/RH = H.get_organ(BP_R_HAND) var/active_hand = H.hand to_chat(user, "Your hand passes through the [src] with a flash of searing heat!") playsound(user, 'sound/effects/sparks4.ogg', 40, 1) diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 9bd0dedd23e..f7fad8362bd 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -147,7 +147,7 @@ var/obj/item/projectile/P = damage_source var/reflectchance = 40 - round(damage/3) - if(!(def_zone in list("chest", "groin"))) + if(!(def_zone in list(BP_CHEST, BP_GROIN))) reflectchance /= 2 if(P.starting && prob(reflectchance)) visible_message("\The [user]'s [src.name] reflects [attack_text]!") diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index c5d6aede687..f9dfa209553 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -181,8 +181,8 @@ var/sound = "heartbeat" var/sound_strength = "cannot hear" var/heartbeat = 0 - if(M.species && M.species.has_organ["heart"]) - var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"] + if(M.species && M.species.has_organ[BP_HEART]) + var/obj/item/organ/internal/heart/heart = M.internal_organs_by_name[BP_HEART] if(heart && !heart.robotic) heartbeat = 1 if(M.stat == DEAD || (M.status_flags&FAKEDEATH)) @@ -190,24 +190,24 @@ sound = "anything" else switch(body_part) - if("chest") + if(BP_CHEST) sound_strength = "hear" sound = "no heartbeat" if(heartbeat) - var/obj/item/organ/heart/heart = M.internal_organs_by_name["heart"] + var/obj/item/organ/internal/heart/heart = M.internal_organs_by_name[BP_HEART] if(heart.is_bruised() || M.getOxyLoss() > 50) sound = "[pick("odd noises in","weak")] heartbeat" else sound = "healthy heartbeat" - var/obj/item/organ/heart/L = M.internal_organs_by_name["lungs"] + var/obj/item/organ/internal/heart/L = M.internal_organs_by_name[BP_LUNGS] if(!L || M.losebreath) sound += " and no respiration" else if(M.is_lung_ruptured() || M.getOxyLoss() > 50) sound += " and [pick("wheezing","gurgling")] sounds" else sound += " and healthy respiration" - if("eyes","mouth") + if(BP_EYES,"mouth") sound_strength = "cannot hear" sound = "anything" else diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 0dbbd8b6db8..8e22bc0111a 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -548,7 +548,7 @@ All custom items with worn sprites must follow the contained sprite system: http last_special = world.time + 500 - var/obj/item/organ/F = src.internal_organs_by_name["heart"] + var/obj/item/organ/F = src.internal_organs_by_name[BP_HEART] if(isnull(F)) return @@ -2449,7 +2449,7 @@ All custom items with worn sprites must follow the contained sprite system: http to_chat(user,span("notice","It looks strangely familiar...")) return - var/obj/item/organ/external/OL = H.get_organ("l_arm") + var/obj/item/organ/external/OL = H.get_organ(BP_L_ARM) var/obj/item/organ/external/arm/industrial/fluff/dionaea_l_arm/NA = new(get_turf(src)) var/obj/item/organ/external/hand/industrial/fluff/dionaea_l_hand/NH = new(get_turf(src)) diff --git a/code/modules/detectivework/tools/sample_kits.dm b/code/modules/detectivework/tools/sample_kits.dm index 0f6da0a8a01..5f6e9aa910e 100644 --- a/code/modules/detectivework/tools/sample_kits.dm +++ b/code/modules/detectivework/tools/sample_kits.dm @@ -94,13 +94,13 @@ user.visible_message("\The [user] tries to take prints from \the [H], but they move away.") return 1 - if(target_zone == "r_hand" || target_zone == "l_hand") + if(target_zone == BP_R_HAND || target_zone == BP_L_HAND) var/has_hand - var/obj/item/organ/external/O = H.organs_by_name["r_hand"] + var/obj/item/organ/external/O = H.organs_by_name[BP_R_HAND] if(istype(O) && !O.is_stump()) has_hand = 1 else - O = H.organs_by_name["l_hand"] + O = H.organs_by_name[BP_L_HAND] if(istype(O) && !O.is_stump()) has_hand = 1 if(!has_hand) diff --git a/code/modules/detectivework/tools/swabs.dm b/code/modules/detectivework/tools/swabs.dm index 0a1426c9ea1..f2d7cdbc3b8 100644 --- a/code/modules/detectivework/tools/swabs.dm +++ b/code/modules/detectivework/tools/swabs.dm @@ -33,7 +33,7 @@ return if(target_zone == "mouth") - if(!H.organs_by_name["head"]) + if(!H.organs_by_name[BP_HEAD]) to_chat(user, "They don't have a head.") return if(!H.check_has_mouth()) @@ -43,13 +43,13 @@ dna = list(H.dna.unique_enzymes) sample_type = "DNA" - else if(target_zone == "r_hand" || target_zone == "l_hand") + else if(target_zone == BP_R_HAND || target_zone == BP_L_HAND) var/has_hand - var/obj/item/organ/external/O = H.organs_by_name["r_hand"] + var/obj/item/organ/external/O = H.organs_by_name[BP_R_HAND] if(istype(O) && !O.is_stump()) has_hand = 1 else - O = H.organs_by_name["l_hand"] + O = H.organs_by_name[BP_L_HAND] if(istype(O) && !O.is_stump()) has_hand = 1 if(!has_hand) diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm index 7c745de9029..a57547375c9 100644 --- a/code/modules/food/recipes_microwave.dm +++ b/code/modules/food/recipes_microwave.dm @@ -40,7 +40,7 @@ /datum/recipe/brainburger items = list( /obj/item/reagent_containers/food/snacks/bun, - /obj/item/organ/brain + /obj/item/organ/internal/brain ) result = /obj/item/reagent_containers/food/snacks/burger/brain diff --git a/code/modules/food/recipes_oven.dm b/code/modules/food/recipes_oven.dm index d2a24b85148..fc5ef72009f 100644 --- a/code/modules/food/recipes_oven.dm +++ b/code/modules/food/recipes_oven.dm @@ -493,7 +493,7 @@ /datum/recipe/cake/brain appliance = OVEN - items = list(/obj/item/organ/brain) + items = list(/obj/item/organ/internal/brain) result = /obj/item/reagent_containers/food/snacks/sliceable/cake/brain /datum/recipe/pancakes diff --git a/code/modules/genetics/side_effects.dm b/code/modules/genetics/side_effects.dm index d0768a34400..98cc4be3d3b 100644 --- a/code/modules/genetics/side_effects.dm +++ b/code/modules/genetics/side_effects.dm @@ -25,7 +25,7 @@ finish(mob/living/carbon/human/H) if(!H.reagents.has_reagent("dexalin")) - for(var/organ_name in list("chest","l_arm","r_arm","r_leg","l_leg","head","groin")) + for(var/organ_name in list(BP_CHEST,BP_L_ARM,BP_R_ARM,BP_R_LEG,BP_L_LEG,BP_HEAD,BP_GROIN)) var/obj/item/organ/external/E = H.get_organ(organ_name) E.take_damage(0, 5, 0) @@ -41,7 +41,7 @@ finish(mob/living/carbon/human/H) if(!H.reagents.has_reagent("bicaridine")) - var/organ_name = pick("chest","l_arm","r_arm","r_leg","l_leg","head","groin") + var/organ_name = pick(BP_CHEST,BP_L_ARM,BP_R_ARM,BP_R_LEG,BP_L_LEG,BP_HEAD,BP_GROIN) var/obj/item/organ/external/E = H.get_organ(organ_name) E.take_damage(20, 0, 0) E.fracture() diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index b9fd5712103..bd43d8a2eb8 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -321,7 +321,7 @@ return reagents.remove_any(rand(1,3)) //Todo, make it actually remove the reagents the seed uses. seed.do_thorns(H,src) - seed.do_sting(H,src,pick("r_hand","l_hand")) + seed.do_sting(H,src,pick(BP_R_HAND,BP_L_HAND)) /obj/item/reagent_containers/food/snacks/fruit_slice name = "fruit slice" diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 08de3baa98b..569341815b6 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -116,7 +116,7 @@ return - if(!target_limb) target_limb = pick("l_foot","r_foot","l_leg","r_leg","l_hand","r_hand","l_arm", "r_arm","head","chest","groin") + if(!target_limb) target_limb = pick(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_HAND,BP_R_HAND,BP_L_ARM, BP_R_ARM,BP_HEAD,BP_CHEST,BP_GROIN) var/obj/item/organ/external/affecting = target.get_organ(target_limb) var/damage = 0 diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index e7df888f446..9ad14895074 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -25,7 +25,7 @@ if(istype(H) && H.shoes) return seed.do_thorns(victim,src) - seed.do_sting(victim,src,pick("r_foot","l_foot","r_leg","l_leg")) + seed.do_sting(victim,src,pick(BP_R_FOOT,BP_L_FOOT,BP_R_LEG,BP_L_LEG)) /obj/effect/plant/proc/unbuckle() if(buckled_mob) diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index 0f85a316982..3befe1f97b4 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -148,7 +148,7 @@ var/datum/reagent/B if(istype(T, /mob/living/carbon/human)) var/mob/living/carbon/human/H = T - if(H.species && !H.has_organ("heart")) + if(H.species && !H.has_organ(BP_HEART)) H.reagents.trans_to_obj(src, tramount) else B = T.take_blood(src, tramount) diff --git a/code/modules/item_worth/worths_list.dm b/code/modules/item_worth/worths_list.dm index 6b0ba247dc7..2040f6df074 100644 --- a/code/modules/item_worth/worths_list.dm +++ b/code/modules/item_worth/worths_list.dm @@ -627,9 +627,9 @@ var/list/worths = list( /obj/item/device/eftpos = 30, /obj/item/device = 90, //ORGANS, - /obj/item/organ/heart = 1200, - /obj/item/organ/brain/golem = 3000, - /obj/item/organ/brain = 1200, + /obj/item/organ/internal/heart = 1200, + /obj/item/organ/internal/brain/golem = 3000, + /obj/item/organ/internal/brain = 1200, /obj/item/organ/pariah_brain = 5, /obj/item/organ/vaurca/neuralsocket = 1500, /obj/item/organ/stack/vox = 5000, diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 68d07f6e00f..c1708fabd0c 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -307,7 +307,7 @@ ..() /obj/item/book/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone) - if(target_zone == "eyes") + if(target_zone == BP_EYES) user.visible_message("You open up the book and show it to [M]. ", \ " [user] opens up a book and shows it to [M]. ") M << browse("Penned by [author].
" + "[dat]", "window=book") diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 926c5a2362f..c0aaac8deb8 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -65,7 +65,7 @@ if(!accurate) if(prob(80)) hit_zone = ran_zone(hit_zone) - if(prob(15) && hit_zone != "chest") // Missed! + if(prob(15) && hit_zone != BP_CHEST) // Missed! if(!D.lying) attack_message = "[A] attempted to strike [D], but missed!" else diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index d93a4c0d035..3aeea0e9f6e 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -41,7 +41,7 @@ D.visible_message("[A] grabs [D]'s wrist and wrenches it sideways!") playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1) D.drop_item() - D.apply_damage(5, BRUTE, pick("l_arm", "r_arm")) + D.apply_damage(5, BRUTE, pick(BP_L_ARM, BP_R_ARM)) D.Stun(3) return 1 return basic_hit(A,D) @@ -76,7 +76,7 @@ A.do_attack_animation(D) D.visible_message("[A] kicks [D] in the head!", \ "[A] kicks you in the jaw!") - D.apply_damage(20, BRUTE, "head") + D.apply_damage(20, BRUTE, BP_HEAD) D.drop_item() playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1) @@ -90,7 +90,7 @@ D.visible_message("[A] elbow drops [D]!") if(D.stat) D.death() //FINISH HIM! - D.apply_damage(50, BRUTE, "chest") + D.apply_damage(50, BRUTE, BP_CHEST) playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1) return 1 return basic_hit(A,D) diff --git a/code/modules/martial_arts/tajara.dm b/code/modules/martial_arts/tajara.dm index 4050141985c..3497ccf6c78 100644 --- a/code/modules/martial_arts/tajara.dm +++ b/code/modules/martial_arts/tajara.dm @@ -27,10 +27,10 @@ A.do_attack_animation(D) playsound(get_turf(A), 'sound/weapons/slice.ogg', 50, 1, -1) - if(!D.species.has_limbs["head"]) + if(!D.species.has_limbs[BP_HEAD]) return 0 - var/obj/item/organ/external/affecting = D.get_organ("head") + var/obj/item/organ/external/affecting = D.get_organ(BP_HEAD) if(!istype(affecting) || affecting.is_stump()) return 0 @@ -46,10 +46,10 @@ if(isipc(D)) return 1 - var/obj/item/organ/eyes/eyes = D.get_eyes() + var/obj/item/organ/internal/eyes/eyes = D.get_eyes() eyes.take_damage(rand(3,4), 1) var/armor = D.getarmor_organ(affecting,"melee") - D.apply_damage(10,BRUTE, "head", armor, sharp=1, edge=1) + D.apply_damage(10,BRUTE, BP_HEAD, armor, sharp=1, edge=1) return 1 diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index d3421e4262e..aa83f359d99 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -112,7 +112,7 @@ if(89) new/obj/item/stack/material/animalhide/xeno(src) if(90) - new/obj/item/organ/heart(src) + new/obj/item/organ/internal/heart(src) if(91) new/obj/item/poppet(src) if(92) diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 05a03cb29d4..f8cba3c8c99 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -342,8 +342,8 @@ if(istype(user, /mob/living/carbon/human)) //Save the users active hand var/mob/living/carbon/human/H = user - var/obj/item/organ/external/LA = H.get_organ("l_hand") - var/obj/item/organ/external/RA = H.get_organ("r_hand") + var/obj/item/organ/external/LA = H.get_organ(BP_L_HAND) + var/obj/item/organ/external/RA = H.get_organ(BP_R_HAND) var/active_hand = H.hand if(prob(20)) if(active_hand) diff --git a/code/modules/mob/abstract/new_player/sprite_accessories.dm b/code/modules/mob/abstract/new_player/sprite_accessories.dm index 59da91a0e59..94e884fccbd 100644 --- a/code/modules/mob/abstract/new_player/sprite_accessories.dm +++ b/code/modules/mob/abstract/new_player/sprite_accessories.dm @@ -2692,141 +2692,141 @@ Follow by example and make good judgement based on length which list to include tiger_stripes name = "Tiger Stripes (Tajara)" icon_state = "tiger" - body_parts = list("l_foot","r_foot","l_leg","r_leg","l_arm","r_arm","chest","groin") + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_CHEST,BP_GROIN) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") taj_paw_socks name = "Socks Coloration (Tajara)" icon_state = "taj_pawsocks" - body_parts = list("l_foot","r_foot","l_leg","r_leg","l_arm","r_arm","l_hand","r_hand") + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") una_paw_socks name = "Socks Coloration (Unathi)" icon_state = "una_pawsocks" - body_parts = list("l_foot","r_foot","l_leg","r_leg","l_arm","r_arm","l_hand","r_hand") + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND) species_allowed = list("Unathi") belly_hands_feet name = "Hands,Feet,Belly Color (Minor)" icon_state = "bellyhandsfeetsmall" - body_parts = list("l_foot","r_foot","l_leg","r_leg","l_arm","r_arm","l_hand","r_hand","groin","chest") + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_CHEST) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") patches name = "Color Patches" icon_state = "patches" - body_parts = list("l_foot","r_foot","l_leg","r_leg","l_arm","r_arm","l_hand","r_hand","chest","groin") + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_CHEST,BP_GROIN) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") patchesface name = "Color Patches (Face)" icon_state = "patchesface" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") bands name = "Color Bands" icon_state = "bands" - body_parts = list("l_foot","r_foot","l_leg","r_leg","l_arm","r_arm","l_hand","r_hand","chest","groin") + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_CHEST,BP_GROIN) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara", "Unathi") bandsface name = "Color Bands (Face)" icon_state = "bandsface" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara", "Unathi") tigerhead name = "Tiger Stripes (Head, Minor)" icon_state = "tigerhead" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") tigerface name = "Tiger Stripes (Head, Major)" icon_state = "tigerface" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") backstripe name = "Back Stripe" icon_state = "backstripe" - body_parts = list("chest") + body_parts = list(BP_CHEST) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara", "Unathi") taj_nose name = "Nose Color" icon_state = "taj_nose" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") taj_muzzle name = "Muzzle Color" icon_state = "taj_muzzle" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") taj_face name = "Cheeks Color" icon_state = "taj_face" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") taj_all name = "All Tajara Head" icon_state = "taj_all" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Tajara", "Zhan-Khazan Tajara", "M'sai Tajara") una_face name = "Face Color" icon_state = "una_face" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Unathi") una_facelow name = "Face Color Low" icon_state = "una_facelow" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Unathi") una_scutes name = "Scutes" icon_state = "una_scutes" - body_parts = list("chest") + body_parts = list(BP_CHEST) species_allowed = list("Unathi") spelunker name = "Spelunker" icon_state = "spelunker" - body_parts = list("l_leg","r_leg","l_arm","r_arm","chest","groin","head") + body_parts = list(BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_CHEST,BP_GROIN,BP_HEAD) species_allowed = list("Vaurca") delver name = "Delver" icon_state = "delver" - body_parts = list("l_leg","r_leg","l_arm","r_arm","chest","groin","head") + body_parts = list(BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_CHEST,BP_GROIN,BP_HEAD) species_allowed = list("Vaurca") skr_tears name = "Tear Stains" icon_state = "skr_tears" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Skrell") do_colouration = 0 skr_arms name = "Skrell Arms" icon_state = "skrell_arms" - body_parts = list("l_arm","r_arm","l_hand","r_hand") + body_parts = list(BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND) species_allowed = list("Skrell") diona_leaves name = "Diona Leaves" icon = 'icons/mob/human_races/markings_diona.dmi' icon_state = "diona_leaves" - body_parts = list("l_foot","r_foot","l_leg","r_leg","l_arm","r_arm","chest","groin","head") + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_CHEST,BP_GROIN,BP_HEAD) species_allowed = list("Diona") @@ -2837,7 +2837,7 @@ Follow by example and make good judgement based on length which list to include icon_state = "face_lights" icon_blend_mode = ICON_MULTIPLY name = "Face Color" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Bishop Accessory Frame") is_painted = TRUE @@ -2848,57 +2848,57 @@ Follow by example and make good judgement based on length which list to include plating name = "Plating (Full)" icon_state = "plating" - body_parts = list("chest", "l_arm", "r_arm", "l_leg", "r_leg") + body_parts = list(BP_CHEST, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG) l_arm name = "Plating (Left arm)" - body_parts = list("l_arm") + body_parts = list(BP_L_ARM) r_arm name = "Plating (Right arm)" - body_parts = list("r_arm") + body_parts = list(BP_R_ARM) l_leg name = "Plating (Left leg)" - body_parts = list("l_leg") + body_parts = list(BP_L_LEG) r_leg name = "Plating (Right leg)" - body_parts = list("r_leg") + body_parts = list(BP_R_LEG) chest name = "Plating (Chest)" - body_parts = list("chest") + body_parts = list(BP_CHEST) zenghu icon = 'icons/mob/human_races/markings_zenghu.dmi' icon_state = "outer" icon_blend_mode = ICON_MULTIPLY name = "Outer Finish" - body_parts = list("head") + body_parts = list(BP_HEAD) species_allowed = list("Zeng-Hu Mobility Frame") is_painted = TRUE inner name = "Inner Finish" icon_state = "inner" - body_parts = list("l_foot", "r_foot", "l_hand", "r_hand", "l_leg", "r_leg") + body_parts = list(BP_L_FOOT, BP_R_FOOT, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG) l_foot name = "Inner Finish (Left Leg)" - body_parts = list("l_foot", "l_leg") + body_parts = list(BP_L_FOOT, BP_L_LEG) r_foot name = "Inner Finish (Right Leg)" - body_parts = list("r_foot", "r_leg") + body_parts = list(BP_R_FOOT, BP_R_LEG) l_hand name = "Inner Finish (Left Arm)" - body_parts = list("l_hand", "l_arm") + body_parts = list(BP_L_HAND, BP_L_ARM) r_hand name = "Inner Finish (Right Arm)" - body_parts = list("r_hand", "r_arm") + body_parts = list(BP_R_HAND, BP_R_ARM) crest_leser name = "Head Coloration (Lesser)" diff --git a/code/modules/mob/living/carbon/alien/diona/progression.dm b/code/modules/mob/living/carbon/alien/diona/progression.dm index 5ec14925fb4..5d9473d848c 100644 --- a/code/modules/mob/living/carbon/alien/diona/progression.dm +++ b/code/modules/mob/living/carbon/alien/diona/progression.dm @@ -85,7 +85,7 @@ src.gestalt = adult //What do you call a person with no arms or no legs? - var/list/organ_removal_priorities = list("l_arm","r_arm","l_leg","r_leg") + var/list/organ_removal_priorities = list(BP_L_ARM,BP_R_ARM,BP_L_LEG,BP_R_LEG) var/limbs_to_remove = (6 - limbs_can_grow) for(var/organ_name in organ_removal_priorities) if(limbs_to_remove <= 0) diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 2212d912066..adca863f24c 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -29,12 +29,12 @@ var/locked = 0 var/mob/living/carbon/brain/brainmob = null//The current occupant. - var/obj/item/organ/brain/brainobj = null //The current brain organ. + var/obj/item/organ/internal/brain/brainobj = null //The current brain organ. var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm. attackby(var/obj/item/O as obj, var/mob/user as mob) - if(istype(O,/obj/item/organ/brain) && !brainmob) //Time to stick a brain in it --NEO - var/obj/item/organ/brain/B = O + if(istype(O,/obj/item/organ/internal/brain) && !brainmob) //Time to stick a brain in it --NEO + var/obj/item/organ/internal/brain/B = O if(!B.can_lobotomize) to_chat(user, "\The [B] is incompatible with [src]!") return @@ -91,7 +91,7 @@ to_chat(user, "You upend the MMI, but the brain is clamped into place.") else to_chat(user, "You upend the MMI, spilling the brain onto the floor.") - var/obj/item/organ/brain/brain + var/obj/item/organ/internal/brain/brain if (brainobj) //Pull brain organ out of MMI. brainobj.forceMove(user.loc) brain = brainobj diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 7463e293793..2a3520e519a 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -1,9 +1,9 @@ -/obj/item/organ/brain +/obj/item/organ/internal/brain name = "brain" health = 400 //They need to live awhile longer than other organs. Is this even used by organ code anymore? desc = "A piece of juicy meat found in a person's head." - organ_tag = "brain" - parent_organ = "head" + organ_tag = BP_BRAIN + parent_organ = BP_HEAD vital = 1 icon_state = "brain" force = 1.0 @@ -22,37 +22,37 @@ name = "brain remnants" desc = "Did someone tread on this? It looks useless for cloning or cyborgification." organ_tag = "brain" - parent_organ = "head" + parent_organ = BP_HEAD icon = 'icons/mob/npc/alien.dmi' icon_state = "chitin" vital = 1 -/obj/item/organ/brain/xeno +/obj/item/organ/internal/brain/xeno name = "thinkpan" desc = "It looks kind of like an enormous wad of purple bubblegum." icon = 'icons/mob/npc/alien.dmi' icon_state = "chitin" -/obj/item/organ/brain/xeno/gain_trauma() +/obj/item/organ/internal/brain/xeno/gain_trauma() return -/obj/item/organ/brain/Initialize(mapload) +/obj/item/organ/internal/brain/Initialize(mapload) . = ..() health = config.default_brain_health if (!mapload) addtimer(CALLBACK(src, .proc/clear_screen), 5) -/obj/item/organ/brain/proc/clear_screen() +/obj/item/organ/internal/brain/proc/clear_screen() if (brainmob && brainmob.client) brainmob.client.screen.Cut() -/obj/item/organ/brain/Destroy() +/obj/item/organ/internal/brain/Destroy() if(brainmob) qdel(brainmob) brainmob = null return ..() -/obj/item/organ/brain/proc/transfer_identity(var/mob/living/carbon/H) +/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H) brainmob = new(src) brainmob.name = H.real_name brainmob.real_name = H.real_name @@ -64,14 +64,14 @@ to_chat(brainmob, "You feel slightly disoriented. That's normal when you're just a [initial(src.name)].") callHook("debrain", list(brainmob)) -/obj/item/organ/brain/examine(mob/user) // -- TLE +/obj/item/organ/internal/brain/examine(mob/user) // -- TLE ..(user) if(brainmob && brainmob.client)//if thar be a brain inside... the brain. to_chat(user, "You can feel the small spark of life still left in this one.") else to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later..") -/obj/item/organ/brain/removed(var/mob/living/user) +/obj/item/organ/internal/brain/removed(var/mob/living/user) for(var/X in traumas) var/datum/brain_trauma/BT = X @@ -83,13 +83,13 @@ if(borer) borer.detatch() //Should remove borer if the brain is removed - RR - var/obj/item/organ/brain/B = src + var/obj/item/organ/internal/brain/B = src if(istype(B) && istype(owner)) B.transfer_identity(owner) ..() -/obj/item/organ/brain/replaced(var/mob/living/target) +/obj/item/organ/internal/brain/replaced(var/mob/living/target) if(target.key) target.ghostize() @@ -107,7 +107,7 @@ ..() -/obj/item/organ/brain/proc/lobotomize(mob/user as mob) +/obj/item/organ/internal/brain/proc/lobotomize(mob/user as mob) lobotomized = 1 if(owner) @@ -120,7 +120,7 @@ return -/obj/item/organ/brain/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/organ/internal/brain/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/surgicaldrill)) if(!can_lobotomize) return @@ -131,7 +131,7 @@ to_chat(user, "The brain has already been operated on!") ..() -/obj/item/organ/brain/process() +/obj/item/organ/internal/brain/process() ..() if(!owner) @@ -140,7 +140,7 @@ if(lobotomized && (owner.getBrainLoss() < 40)) //lobotomized brains cannot be healed with chemistry. Part of the brain is irrevocably missing. Can be fixed magically with cloning, ofc. owner.setBrainLoss(40) -/obj/item/organ/brain/slime +/obj/item/organ/internal/brain/slime name = "slime core" desc = "A complex, organic knot of jelly and crystalline particles." robotic = 2 @@ -148,7 +148,7 @@ icon_state = "green slime extract" can_lobotomize = 0 -/obj/item/organ/brain/golem +/obj/item/organ/internal/brain/golem name = "chelm" desc = "A tightly furled roll of paper, covered with indecipherable runes." robotic = 2 @@ -159,7 +159,7 @@ ////////////////////////////////////TRAUMAS//////////////////////////////////////// -/obj/item/organ/brain/proc/has_trauma_type(brain_trauma_type, consider_permanent = FALSE) +/obj/item/organ/internal/brain/proc/has_trauma_type(brain_trauma_type, consider_permanent = FALSE) for(var/X in traumas) var/datum/brain_trauma/BT = X if(istype(BT, brain_trauma_type) && (consider_permanent || !BT.permanent)) @@ -167,7 +167,7 @@ //Add a specific trauma -/obj/item/organ/brain/proc/gain_trauma(datum/brain_trauma/trauma, permanent = FALSE, list/arguments) +/obj/item/organ/internal/brain/proc/gain_trauma(datum/brain_trauma/trauma, permanent = FALSE, list/arguments) var/trauma_type if(ispath(trauma)) trauma_type = trauma @@ -177,7 +177,7 @@ trauma.permanent = permanent //Add a random trauma of a certain subtype -/obj/item/organ/brain/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, permanent = FALSE) +/obj/item/organ/internal/brain/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, permanent = FALSE) var/list/datum/brain_trauma/possible_traumas = list() for(var/T in subtypesof(brain_trauma_type)) var/datum/brain_trauma/BT = T @@ -188,12 +188,12 @@ traumas += new trauma_type(src, permanent) //Cure a random trauma of a certain subtype -/obj/item/organ/brain/proc/cure_trauma_type(brain_trauma_type, cure_permanent = FALSE) +/obj/item/organ/internal/brain/proc/cure_trauma_type(brain_trauma_type, cure_permanent = FALSE) var/datum/brain_trauma/trauma = has_trauma_type(brain_trauma_type) if(trauma && (cure_permanent || !trauma.permanent)) qdel(trauma) -/obj/item/organ/brain/proc/cure_all_traumas(cure_permanent = FALSE, cure_type = "") +/obj/item/organ/internal/brain/proc/cure_all_traumas(cure_permanent = FALSE, cure_type = "") for(var/X in traumas) var/datum/brain_trauma/trauma = X if(trauma.cure_type == cure_type || cure_type == CURE_ADMIN) diff --git a/code/modules/mob/living/carbon/brain/death.dm b/code/modules/mob/living/carbon/brain/death.dm index 43918f5288f..8b6e7f71756 100644 --- a/code/modules/mob/living/carbon/brain/death.dm +++ b/code/modules/mob/living/carbon/brain/death.dm @@ -9,6 +9,6 @@ if(istype(container, /obj/item/device/mmi)) qdel(container)//Gets rid of the MMI if there is one if(loc) - if(istype(loc,/obj/item/organ/brain)) + if(istype(loc,/obj/item/organ/internal/brain)) qdel(loc)//Gets rid of the brain item ..(null,1) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 9934e2ed53e..87050a02a44 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -59,7 +59,7 @@ var/d = rand(round(I.force / 4), I.force) if(istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/H = src - var/obj/item/organ/external/organ = H.get_organ("chest") + var/obj/item/organ/external/organ = H.get_organ(BP_CHEST) if (istype(organ)) if(organ.take_damage(d, 0)) H.UpdateDamageIcon() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 8776582b57c..04866253287 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -156,7 +156,7 @@ var/total_damage = 0 for(var/i in 1 to 3) var/damage = min(W.force*1.5, 20)*damage_mod - apply_damage(damage, W.damtype, "head", 0, sharp=W.sharp, edge=W.edge) + apply_damage(damage, W.damtype, BP_HEAD, 0, sharp=W.sharp, edge=W.edge) total_damage += damage var/oxyloss = total_damage diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 8f0c4e48cba..d3eccd0840c 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -36,7 +36,7 @@ animate_tail_stop() //Handle brain slugs. - var/obj/item/organ/external/head = get_organ("head") + var/obj/item/organ/external/head = get_organ(BP_HEAD) var/mob/living/simple_animal/borer/B if (head) diff --git a/code/modules/mob/living/carbon/human/diona_gestalt.dm b/code/modules/mob/living/carbon/human/diona_gestalt.dm index c058a2a5ae5..6be477cd60d 100644 --- a/code/modules/mob/living/carbon/human/diona_gestalt.dm +++ b/code/modules/mob/living/carbon/human/diona_gestalt.dm @@ -44,7 +44,7 @@ /mob/living/carbon/human/proc/topup_nymphs() var/added = 0 - var/list/exclude = list("groin", "l_hand", "r_hand", "l_foot", "r_foot") // becase these are supposed to be whole as their join parts + var/list/exclude = list(BP_GROIN, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT) // becase these are supposed to be whole as their join parts for(var/thing in organs_by_name) if(thing in exclude) continue @@ -230,7 +230,7 @@ to_chat(src, span("warning", "You lack energy to perform this action!")) return // Choose our limb to detach - var/list/exclude = organs_by_name - list("groin", "chest", "l_arm", "r_arm", "l_leg", "r_leg") + var/list/exclude = organs_by_name - list(BP_GROIN, BP_CHEST, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG) var/choice = input(src, "Choose a limb to detach?", "Limb detach") as null|anything in exclude if(!choice) return @@ -246,7 +246,7 @@ stump.update_damages() O.post_droplimb(src) // If we got parent organ - drop it too - if(O.parent_organ && O.parent_organ != "chest") + if(O.parent_organ && O.parent_organ != BP_CHEST) var/obj/item/organ/external/parent = organs_by_name[O.parent_organ] var/obj/item/organ/external/stump/parent_stump = new (src, 0, parent) parent.removed(null, TRUE) @@ -315,7 +315,7 @@ sleep(20) var/list/nymphos = list() - var/list/organ_removal_priorities = list("l_arm","r_arm","l_leg","r_leg") + var/list/organ_removal_priorities = list(BP_L_ARM,BP_R_ARM,BP_L_LEG,BP_R_LEG) for(var/organ_name in organ_removal_priorities) var/obj/item/organ/external/O = organs_by_name[organ_name] if(!O || O.is_stump()) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 53700c29c26..9b69b09f94a 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -340,8 +340,8 @@ if("snap", "snaps") m_type = 2 var/mob/living/carbon/human/H = src - var/obj/item/organ/external/L = H.get_organ("l_hand") - var/obj/item/organ/external/R = H.get_organ("r_hand") + var/obj/item/organ/external/L = H.get_organ(BP_L_HAND) + var/obj/item/organ/external/R = H.get_organ(BP_R_HAND) var/left_hand_good = 0 var/right_hand_good = 0 if(L && (!(L.status & ORGAN_DESTROYED)) && (!(L.status & ORGAN_BROKEN))) @@ -743,13 +743,13 @@ HTML += TextPreview(flavor_texts["general"]) HTML += "
" HTML += "Head: " - HTML += TextPreview(flavor_texts["head"]) + HTML += TextPreview(flavor_texts[BP_HEAD]) HTML += "
" HTML += "Face: " HTML += TextPreview(flavor_texts["face"]) HTML += "
" HTML += "Eyes: " - HTML += TextPreview(flavor_texts["eyes"]) + HTML += TextPreview(flavor_texts[BP_EYES]) HTML += "
" HTML += "Body: " HTML += TextPreview(flavor_texts["torso"]) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 7d58be6775e..ad1f6f01129 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -59,7 +59,7 @@ msg += ", a [species.name]" msg += "!\n" - if (species && species.has_organ["ipc tag"] && internal_organs_by_name["ipc tag"]) + if (species && species.has_organ[BP_IPCTAG] && internal_organs_by_name[BP_IPCTAG]) msg += "[T.He] [T.is] wearing a tag designating them as Integrated Positronic Chassis [src.real_name].\n" //uniform @@ -206,7 +206,7 @@ msg += "[T.He] [T.is] twitching ever so slightly.\n" //splints - for(var/organ in list("l_leg","r_leg","l_arm","r_arm","l_hand","r_hand","r_foot","l_foot")) + for(var/organ in list(BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_R_FOOT,BP_L_FOOT)) var/obj/item/organ/external/o = get_organ(organ) if(o && o.status & ORGAN_SPLINTED) msg += "[T.He] [T.has] a splint on [T.his] [o.name]!\n" @@ -253,7 +253,7 @@ inactivity = have_client ? bg.client.inactivity : null - if(species.show_ssd && (!species.has_organ["brain"] || has_brain()) && stat != DEAD) + if(species.show_ssd && (!species.has_organ[BP_BRAIN] || has_brain()) && stat != DEAD) if(!key) msg += "[T.He] [T.is] [species.show_ssd]. It doesn't look like [T.he] [T.is] waking up anytime soon.\n" else if(!client && !bg) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a864e41dcd3..4bda81a2a1c 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -205,25 +205,25 @@ for(var/obj/item/organ/external/temp in organs) switch(temp.name) - if("head") + if(BP_HEAD) update |= temp.take_damage(b_loss * 0.2, f_loss * 0.2, used_weapon = weapon_message) - if("chest") + if(BP_CHEST) update |= temp.take_damage(b_loss * 0.4, f_loss * 0.4, used_weapon = weapon_message) - if("l_arm") + if(BP_L_ARM) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if("r_arm") + if(BP_R_ARM) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if("l_leg") + if(BP_L_LEG) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if("r_leg") + if(BP_R_LEG) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if("r_foot") + if(BP_R_FOOT) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if("l_foot") + if(BP_L_FOOT) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if("r_arm") + if(BP_R_ARM) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) - if("l_arm") + if(BP_L_ARM) update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) if(update) UpdateDamageIcon() @@ -237,7 +237,7 @@ L = new/obj/item/implant/loyalty(M) L.imp_in = M L.implanted = 1 - var/obj/item/organ/external/affected = M.organs_by_name["head"] + var/obj/item/organ/external/affected = M.organs_by_name[BP_HEAD] affected.implants += L L.part = affected L.implanted(src) @@ -382,7 +382,7 @@ //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable /mob/living/carbon/human/proc/get_face_name() - var/obj/item/organ/external/head = get_organ("head") + var/obj/item/organ/external/head = get_organ(BP_HEAD) if(!head || head.disfigured || head.is_stump() || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible return "Unknown" return real_name @@ -418,19 +418,19 @@ //The way this works is by damaging multiple areas in an "Arc" if no def_zone is provided. should be pretty easy to add more arcs if it's needed. though I can't imangine a situation that can apply. switch ((h_style == "Floorlength Braid" || h_style == "Very Long Hair") ? rand(1, 7) : rand(1, 6)) if(1) - damage_areas = list("l_hand", "l_arm", "chest", "r_arm", "r_hand") + damage_areas = list(BP_L_HAND, BP_L_ARM, BP_CHEST, BP_R_ARM, BP_R_HAND) if(2) - damage_areas = list("r_hand", "r_arm", "chest", "l_arm", "l_hand") + damage_areas = list(BP_R_HAND, BP_R_ARM, BP_CHEST, BP_L_ARM, BP_L_HAND) if(3) - damage_areas = list("l_hand", "l_arm", "chest", "groin", "l_leg", "l_foot") + damage_areas = list(BP_L_HAND, BP_L_ARM, BP_CHEST, BP_GROIN, BP_L_LEG, BP_L_FOOT) if(4) - damage_areas = list("l_hand", "l_arm", "chest", "groin", "r_leg", "r_foot") + damage_areas = list(BP_L_HAND, BP_L_ARM, BP_CHEST, BP_GROIN, BP_R_LEG, BP_R_FOOT) if(5) - damage_areas = list("r_hand", "r_arm", "chest", "groin", "r_leg", "r_foot") + damage_areas = list(BP_R_HAND, BP_R_ARM, BP_CHEST, BP_GROIN, BP_R_LEG, BP_R_FOOT) if(6) - damage_areas = list("r_hand", "r_arm", "chest", "groin", "l_leg", "l_foot") + damage_areas = list(BP_R_HAND, BP_R_ARM, BP_CHEST, BP_GROIN, BP_L_LEG, BP_L_FOOT) if(7)//snowflake arc - only happens when they have long hair. - damage_areas = list("r_hand", "r_arm", "chest", "head") + damage_areas = list(BP_R_HAND, BP_R_ARM, BP_CHEST, BP_HEAD) h_style = "skinhead" visible_message("[src]'s hair gets a burst of electricty through it, burning and turning to dust!", "your hair burns as the current flows through it, turning to dust!", "You hear a crackling sound, and smell burned hair!.") update_hair() @@ -774,8 +774,8 @@ return species.inherent_eye_protection ? max(species.inherent_eye_protection, flash_protection) : flash_protection //Used by various things that knock people out by applying blunt trauma to the head. -//Checks that the species has a "head" (brain containing organ) and that hit_zone refers to it. -/mob/living/carbon/human/proc/headcheck(var/target_zone, var/brain_tag = "brain") +//Checks that the species has a BP_HEAD (brain containing organ) and that hit_zone refers to it. +/mob/living/carbon/human/proc/headcheck(var/target_zone, var/brain_tag = BP_BRAIN) if(!species.has_organ[brain_tag]) return 0 @@ -848,7 +848,7 @@ /mob/living/carbon/human/proc/check_has_mouth() // Todo, check stomach organ when implemented. - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BP_HEAD) if(!H || !H.can_intake_reagents) return 0 return 1 @@ -1039,7 +1039,7 @@ sync_organ_prefs_to_mob(prefs, reset_to_roundstart) // Don't apply prosthetics if we're a ling rejuving. if(!client || !key) //Don't boot out anyone already in the mob. - for (var/obj/item/organ/brain/H in world) + for (var/obj/item/organ/internal/brain/H in world) if(H.brainmob) if(H.brainmob.real_name == src.real_name) if(H.brainmob.mind) @@ -1065,11 +1065,11 @@ ..() /mob/living/carbon/human/proc/is_lung_ruptured() - var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"] + var/obj/item/organ/internal/lungs/L = internal_organs_by_name[BP_LUNGS] return L && L.is_bruised() /mob/living/carbon/human/proc/rupture_lung() - var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"] + var/obj/item/organ/internal/lungs/L = internal_organs_by_name[BP_LUNGS] if(L && !L.is_bruised()) src.custom_pain("You feel a stabbing pain in your chest!", 1) @@ -1331,7 +1331,7 @@ if(!target_zone) if(!user) - target_zone = pick("chest","chest","chest","left leg","right leg","left arm", "right arm", "head") + target_zone = pick(BP_CHEST,BP_CHEST,BP_CHEST,"left leg","right leg","left arm", "right arm", BP_HEAD) else target_zone = user.zone_sel.selecting @@ -1345,7 +1345,7 @@ fail_msg = "That limb is robotic." else switch(target_zone) - if("head") + if(BP_HEAD) if(head && head.item_flags & THICKMATERIAL) . = 0 else @@ -1353,7 +1353,7 @@ . = 0 if(!. && error_msg && user) if(!fail_msg) - fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into." + fail_msg = "There is no exposed flesh or thin material [target_zone == BP_HEAD ? "on their head" : "on their body"] to inject into." to_chat(user, "[fail_msg]") /mob/living/carbon/human/print_flavor_text(var/shrink = 1) @@ -1388,7 +1388,7 @@ flavor_text = "" for (var/T in flavor_texts) if(flavor_texts[T] && flavor_texts[T] != "") - if((T == "general") || (T == "head" && head_exposed) || (T == "face" && face_exposed) || (T == "eyes" && eyes_exposed) || (T == "torso" && torso_exposed) || (T == "arms" && arms_exposed) || (T == "hands" && hands_exposed) || (T == "legs" && legs_exposed) || (T == "feet" && feet_exposed)) + if((T == "general") || (T == BP_HEAD && head_exposed) || (T == "face" && face_exposed) || (T == BP_EYES && eyes_exposed) || (T == "torso" && torso_exposed) || (T == "arms" && arms_exposed) || (T == "hands" && hands_exposed) || (T == "legs" && legs_exposed) || (T == "feet" && feet_exposed)) flavor_text += flavor_texts[T] flavor_text += "\n\n" if(!shrink) @@ -1407,14 +1407,14 @@ ..() /mob/living/carbon/human/has_brain() - if(internal_organs_by_name["brain"]) - var/obj/item/organ/brain = internal_organs_by_name["brain"] + if(internal_organs_by_name[BP_BRAIN]) + var/obj/item/organ/internal/brain = internal_organs_by_name[BP_BRAIN] if(brain && istype(brain)) return 1 return 0 /mob/living/carbon/human/has_eyes() - var/obj/item/organ/eyes = get_eyes() + var/obj/item/organ/internal/eyes = get_eyes() if(istype(eyes) && !(eyes.status & ORGAN_CUT_AWAY)) return 1 return 0 @@ -1495,7 +1495,7 @@ /mob/living/carbon/human/can_stand_overridden() if(wearing_rig && wearing_rig.ai_can_move_suit(check_for_ai = 1)) // Actually missing a leg will screw you up. Everything else can be compensated for. - for(var/limbcheck in list("l_leg","r_leg")) + for(var/limbcheck in list(BP_L_LEG,BP_R_LEG)) var/obj/item/organ/affecting = get_organ(limbcheck) if(!affecting) return 0 @@ -1532,33 +1532,33 @@ /mob/living/carbon/human/proc/get_traumas() . = list() - var/obj/item/organ/brain/B = internal_organs_by_name["brain"] - if(B && species && species.has_organ["brain"] && !isipc(src)) + var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN] + if(B && species && species.has_organ[BP_BRAIN] && !isipc(src)) . = B.traumas /mob/living/carbon/human/proc/has_trauma_type(brain_trauma_type, consider_permanent = FALSE) - var/obj/item/organ/brain/B = internal_organs_by_name["brain"] - if(B && species && species.has_organ["brain"] && !isipc(src)) + var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN] + if(B && species && species.has_organ[BP_BRAIN] && !isipc(src)) . = B.has_trauma_type(brain_trauma_type, consider_permanent) /mob/living/carbon/human/proc/gain_trauma(datum/brain_trauma/trauma, permanent = FALSE, list/arguments) - var/obj/item/organ/brain/B = internal_organs_by_name["brain"] - if(B && species && species.has_organ["brain"] && !isipc(src)) + var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN] + if(B && species && species.has_organ[BP_BRAIN] && !isipc(src)) . = B.gain_trauma(trauma, permanent, arguments) /mob/living/carbon/human/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, permanent = FALSE) - var/obj/item/organ/brain/B = internal_organs_by_name["brain"] - if(B && species && species.has_organ["brain"] && !isipc(src)) + var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN] + if(B && species && species.has_organ[BP_BRAIN] && !isipc(src)) . = B.gain_trauma_type(brain_trauma_type, permanent) /mob/living/carbon/human/proc/cure_trauma_type(brain_trauma_type, cure_permanent = FALSE) - var/obj/item/organ/brain/B = internal_organs_by_name["brain"] - if(B && species && species.has_organ["brain"] && !isipc(src)) + var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN] + if(B && species && species.has_organ[BP_BRAIN] && !isipc(src)) . = B.cure_trauma_type(brain_trauma_type, cure_permanent) /mob/living/carbon/human/proc/cure_all_traumas(cure_permanent = FALSE, cure_type = "") - var/obj/item/organ/brain/B = internal_organs_by_name["brain"] - if(B && species && species.has_organ["brain"] && !isipc(src)) + var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN] + if(B && species && species.has_organ[BP_BRAIN] && !isipc(src)) . = B.cure_all_traumas(cure_permanent, cure_type) /mob/living/carbon/human/get_metabolism(metabolism) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index b19d2cb130e..9418b156f1c 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -255,7 +255,7 @@ */ if(prob(80)) hit_zone = ran_zone(hit_zone) - if(prob(15) && hit_zone != "chest") // Missed! + if(prob(15) && hit_zone != BP_CHEST) // Missed! if(!src.lying) attack_message = "[H] attempted to strike [src], but missed!" else diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 0b232c34f4b..5bc0ed974b8 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -30,8 +30,8 @@ if(status_flags & GODMODE) return 0 //godmode - if(species && species.has_organ["brain"]) - var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"] + if(species && species.has_organ[BP_BRAIN]) + var/obj/item/organ/internal/brain/sponge = internal_organs_by_name[BP_BRAIN] if(sponge) if(amount + sponge.damage > maximum) if(sponge.damage < maximum) @@ -59,8 +59,8 @@ if(status_flags & GODMODE) return 0 //godmode - if(species && species.has_organ["brain"]) - var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"] + if(species && species.has_organ[BP_BRAIN]) + var/obj/item/organ/internal/brain/sponge = internal_organs_by_name[BP_BRAIN] if(sponge) sponge.damage = min(max(amount, 0),(maxHealth*2)) brainloss = sponge.damage @@ -73,8 +73,8 @@ if(status_flags & GODMODE) return 0 //godmode - if(species && species.has_organ["brain"]) - var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"] + if(species && species.has_organ[BP_BRAIN]) + var/obj/item/organ/internal/brain/sponge = internal_organs_by_name[BP_BRAIN] if(sponge) brainloss = min(sponge.damage,maxHealth*2) else @@ -383,9 +383,9 @@ This function restores all organs. /mob/living/carbon/human/proc/get_organ(var/zone) - if(!zone) zone = "chest" - if (zone in list( "eyes", "mouth" )) - zone = "head" + if(!zone) zone = BP_CHEST + if (zone in list( BP_EYES, "mouth" )) + zone = BP_HEAD return organs_by_name[zone] /mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/edge = 0, var/obj/used_weapon = null) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 8e441fc5b97..eea1aac6def 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -60,12 +60,12 @@ emp_act agony_amount *= siemens_coeff switch (def_zone) - if("head") + if(BP_HEAD) eye_blurry += min((rand(1,3) * (agony_amount/40)), 12) confused = min(max(confused, 2 * (agony_amount/40)), 8) - if("l_hand", "r_hand") + if(BP_L_HAND, BP_R_HAND) var/c_hand - if (def_zone == "l_hand") + if (def_zone == BP_L_HAND) c_hand = l_hand else c_hand = r_hand @@ -300,7 +300,7 @@ emp_act H.bloody_hands(src) switch(hit_zone) - if("head") + if(BP_HEAD) if(wear_mask) wear_mask.add_blood(src) update_inv_wear_mask(0) @@ -310,7 +310,7 @@ emp_act if(glasses && prob(33)) glasses.add_blood(src) update_inv_glasses(0) - if("chest") + if(BP_CHEST) bloody_body(src) return 1 @@ -357,7 +357,7 @@ emp_act var/mob/living/L = O.thrower zone = check_zone(L.zone_sel.selecting) else - zone = ran_zone("chest",75) //Hits a random part of the body, geared towards the chest + zone = ran_zone(BP_CHEST,75) //Hits a random part of the body, geared towards the chest //check if we hit var/miss_chance = 15 @@ -487,7 +487,7 @@ emp_act var/perm = 0 var/list/perm_by_part = list( - "head" = THERMAL_PROTECTION_HEAD, + BP_HEAD = THERMAL_PROTECTION_HEAD, "upper_torso" = THERMAL_PROTECTION_UPPER_TORSO, "lower_torso" = THERMAL_PROTECTION_LOWER_TORSO, "legs" = THERMAL_PROTECTION_LEG_LEFT + THERMAL_PROTECTION_LEG_RIGHT, @@ -500,7 +500,7 @@ emp_act if(C.permeability_coefficient == 1 || !C.body_parts_covered) continue if(C.body_parts_covered & HEAD) - perm_by_part["head"] *= C.permeability_coefficient + perm_by_part[BP_HEAD] *= C.permeability_coefficient if(C.body_parts_covered & UPPER_TORSO) perm_by_part["upper_torso"] *= C.permeability_coefficient if(C.body_parts_covered & LOWER_TORSO) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index e3af00fb5e5..4b7478fe0b3 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -149,7 +149,7 @@ return null var/obj/item/organ/O = internal_organs_by_name[species.vision_organ] - if (!istype(O, /obj/item/organ/eyes) || (no_synthetic && (O.status & ORGAN_ROBOT))) + if (!istype(O, /obj/item/organ/internal/eyes) || (no_synthetic && (O.status & ORGAN_ROBOT))) return null return O diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index b455884c865..9e3e49570f5 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -36,7 +36,7 @@ tally++ if(istype(buckled, /obj/structure/bed/chair/wheelchair)) - for(var/organ_name in list("l_hand","r_hand","l_arm","r_arm")) + for(var/organ_name in list(BP_L_HAND,BP_R_HAND,BP_L_ARM,BP_R_ARM)) var/obj/item/organ/external/E = get_organ(organ_name) if(!E || E.is_stump()) tally += 4 @@ -48,7 +48,7 @@ if(shoes) tally += shoes.slowdown - for(var/organ_name in list("l_foot","r_foot","l_leg","r_leg")) + for(var/organ_name in list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG)) var/obj/item/organ/external/E = get_organ(organ_name) if(!E || E.is_stump()) tally += 4 diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 2df48c97fa0..ddaacf2ac01 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -1,5 +1,5 @@ /mob/living/carbon/human/proc/update_eyes() - var/obj/item/organ/eyes/eyes = internal_organs_by_name[species.vision_organ || "eyes"] + var/obj/item/organ/internal/eyes/eyes = internal_organs_by_name[species.vision_organ || BP_EYES] if(eyes) eyes.update_colour() regenerate_icons() @@ -73,7 +73,7 @@ if (istype(buckled, /obj/structure/bed)) return - for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot")) + for(var/limb_tag in list(BP_L_LEG,BP_R_LEG,BP_L_FOOT,BP_R_FOOT)) var/obj/item/organ/external/E = organs_by_name[limb_tag] if(!E || (E.status & (ORGAN_MUTATED|ORGAN_DEAD)) || E.is_stump()) //should just be !E.is_usable() here but dislocation screws that up. stance_damage += 2 // let it fail even if just foot&leg @@ -110,7 +110,7 @@ // You should not be able to pick anything up, but stranger things have happened. if(l_hand) - for(var/limb_tag in list("l_hand","l_arm")) + for(var/limb_tag in list(BP_L_HAND,BP_L_ARM)) var/obj/item/organ/external/E = get_organ(limb_tag) if(!E) visible_message("Lacking a functioning left hand, \the [src] drops \the [l_hand].") @@ -118,7 +118,7 @@ break if(r_hand) - for(var/limb_tag in list("r_hand","r_arm")) + for(var/limb_tag in list(BP_R_HAND,BP_R_ARM)) var/obj/item/organ/external/E = get_organ(limb_tag) if(!E) visible_message("Lacking a functioning right hand, \the [src] drops \the [r_hand].") diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index b5bfe11a4f2..718a4a37f50 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -233,8 +233,8 @@ mob/living/carbon/human/proc/change_monitor() set name = "Commune with creature" set desc = "Send a telepathic message to a recipient." - var/obj/item/organ/external/rhand = src.get_organ("r_hand") - var/obj/item/organ/external/lhand = src.get_organ("l_hand") + var/obj/item/organ/external/rhand = src.get_organ(BP_R_HAND) + var/obj/item/organ/external/lhand = src.get_organ(BP_L_HAND) if((!rhand || !rhand.is_usable()) && (!lhand || !lhand.is_usable())) to_chat(src,"You can't communicate without the ability to use your hands!") return @@ -475,11 +475,11 @@ mob/living/carbon/human/proc/change_monitor() if(istype(G.affecting,/mob/living/carbon/human)) var/mob/living/carbon/human/H = G.affecting - if(!H.species.has_limbs["head"]) + if(!H.species.has_limbs[BP_HEAD]) to_chat(src, "\The [H] does not have a head!") return - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) if(!istype(affecting) || affecting.is_stump()) to_chat(src, "\The [H] does not have a head!") return @@ -918,7 +918,7 @@ mob/living/carbon/human/proc/change_monitor() to_chat(src,"You cannot do that in your current state!") return - var/obj/item/organ/brain/golem/O = src.get_active_hand() + var/obj/item/organ/internal/brain/golem/O = src.get_active_hand() if(istype(O)) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 48a7ad14ce8..debadb48483 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -38,44 +38,44 @@ This saves us from having to call add_fingerprint() any time something is put in /mob/living/carbon/human/proc/has_organ_for_slot(slot) switch(slot) if(slot_back) - return has_organ("chest") + return has_organ(BP_CHEST) if(slot_wear_mask) - return has_organ("head") + return has_organ(BP_HEAD) if(slot_handcuffed) - return has_organ("l_hand") && has_organ("r_hand") + return has_organ(BP_L_HAND) && has_organ(BP_R_HAND) if(slot_legcuffed) - return has_organ("l_leg") && has_organ("r_leg") + return has_organ(BP_L_LEG) && has_organ(BP_R_LEG) if(slot_l_hand) - return has_organ("l_hand") + return has_organ(BP_L_HAND) if(slot_r_hand) - return has_organ("r_hand") + return has_organ(BP_R_HAND) if(slot_belt) - return has_organ("chest") + return has_organ(BP_CHEST) if(slot_wear_id) // the only relevant check for this is the uniform check return 1 if(slot_l_ear) - return has_organ("head") + return has_organ(BP_HEAD) if(slot_r_ear) - return has_organ("head") + return has_organ(BP_HEAD) if(slot_glasses) - return has_organ("head") + return has_organ(BP_HEAD) if(slot_gloves) - return has_organ("l_hand") || has_organ("r_hand") + return has_organ(BP_L_HAND) || has_organ(BP_R_HAND) if(slot_head) - return has_organ("head") + return has_organ(BP_HEAD) if(slot_shoes) - return has_organ("r_foot") || has_organ("l_foot") + return has_organ(BP_R_FOOT) || has_organ(BP_L_FOOT) if(slot_wear_suit) - return has_organ("chest") + return has_organ(BP_CHEST) if(slot_w_uniform) - return has_organ("chest") + return has_organ(BP_CHEST) if(slot_l_store) - return has_organ("chest") + return has_organ(BP_CHEST) if(slot_r_store) - return has_organ("chest") + return has_organ(BP_CHEST) if(slot_s_store) - return has_organ("chest") + return has_organ(BP_CHEST) if(slot_in_backpack) return 1 if(slot_tie) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 1ea724bebe2..4c4e3285c10 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -574,24 +574,24 @@ if(breath.temperature >= species.heat_level_1) if(breath.temperature < species.heat_level_2) - apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Heat") + apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat") fire_alert = max(fire_alert, 2) else if(breath.temperature < species.heat_level_3) - apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Heat") + apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat") fire_alert = max(fire_alert, 2) else - apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat") + apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Heat") fire_alert = max(fire_alert, 2) else if(breath.temperature <= species.cold_level_1) if(breath.temperature > species.cold_level_2) - apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Cold") + apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold") fire_alert = max(fire_alert, 1) else if(breath.temperature > species.cold_level_3) - apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Cold") + apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold") fire_alert = max(fire_alert, 1) else - apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Cold") + apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Cold") fire_alert = max(fire_alert, 1) //breathing in hot/cold air also heats/cools you a bit @@ -983,7 +983,7 @@ else //ALIVE. LIGHTS ARE ON updatehealth() //TODO - if(health <= config.health_threshold_dead || (species.has_organ["brain"] && !has_brain() && !isonlifesupport())) + if(health <= config.health_threshold_dead || (species.has_organ[BP_BRAIN] && !has_brain() && !isonlifesupport())) death() blinded = 1 silent = 0 @@ -1410,22 +1410,22 @@ if(temp <= PULSE_FAST && temp >= PULSE_NONE) temp++ if(R.id in heartstopper) //To avoid using fakedeath - var/obj/item/organ/heart/H = internal_organs_by_name["heart"] + var/obj/item/organ/internal/heart/H = internal_organs_by_name[BP_HEART] if(rand(0,6) == 3) H.take_damage(5) if(R.id in cheartstopper) //Conditional heart-stoppage if(R.volume >= R.overdose) - var/obj/item/organ/heart/H = internal_organs_by_name["heart"] + var/obj/item/organ/internal/heart/H = internal_organs_by_name[BP_HEART] if(rand(0,6) == 3) H.take_damage(5) return temp /mob/living/carbon/human/proc/handle_heartbeat() - if(pulse == PULSE_NONE || !species.has_organ["heart"]) + if(pulse == PULSE_NONE || !species.has_organ[BP_HEART]) return - var/obj/item/organ/heart/H = internal_organs_by_name["heart"] + var/obj/item/organ/internal/heart/H = internal_organs_by_name[BP_HEART] if(!H || H.robotic >=2 ) return diff --git a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm index 9a7f3ac0f4e..c6ac7ab1ed2 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm @@ -63,17 +63,17 @@ vision_flags = DEFAULT_SIGHT | SEE_MOBS has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/unbreakable), - "groin" = list("path" = /obj/item/organ/external/groin/unbreakable), - "head" = list("path" = /obj/item/organ/external/head/unbreakable), - "l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable), - "l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable), - "l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable), - "l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable) + BP_CHEST = list("path" = /obj/item/organ/external/chest/unbreakable), + BP_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable), + BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbreakable), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/unbreakable), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbreakable), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/unbreakable), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbreakable) ) stamina = 500 //Tireless automatons diff --git a/code/modules/mob/living/carbon/human/species/outsider/undead.dm b/code/modules/mob/living/carbon/human/species/outsider/undead.dm index af77284d704..75450f0e81b 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/undead.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/undead.dm @@ -56,17 +56,17 @@ spawn_flags = IS_RESTRICTED has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/skeleton), - "groin" = list("path" = /obj/item/organ/external/groin/skeleton), - "head" = list("path" = /obj/item/organ/external/head/skeleton), - "l_arm" = list("path" = /obj/item/organ/external/arm/skeleton), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/skeleton), - "l_leg" = list("path" = /obj/item/organ/external/leg/skeleton), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/skeleton), - "l_hand" = list("path" = /obj/item/organ/external/hand/skeleton), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/skeleton), - "l_foot" = list("path" = /obj/item/organ/external/foot/skeleton), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/skeleton) + BP_CHEST = list("path" = /obj/item/organ/external/chest/skeleton), + BP_GROIN = list("path" = /obj/item/organ/external/groin/skeleton), + BP_HEAD = list("path" = /obj/item/organ/external/head/skeleton), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/skeleton), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/skeleton), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/skeleton), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/skeleton), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/skeleton), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/skeleton), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/skeleton), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/skeleton) ) stamina = 500 //Tireless automatons @@ -160,8 +160,8 @@ breakcuffs = list(MALE,FEMALE,NEUTER) has_organ = list( - "zombie" = /obj/item/organ/parasite/zombie, - "brain" = /obj/item/organ/brain + "zombie" = /obj/item/organ/internal/parasite/zombie, + BP_BRAIN = /obj/item/organ/internal/brain ) virus_immune = 1 @@ -272,8 +272,8 @@ remains_type = /obj/effect/decal/remains/xeno has_organ = list( - "zombie" = /obj/item/organ/parasite/zombie, - /obj/item/organ/brain/skrell + "zombie" = /obj/item/organ/internal/parasite/zombie, + /obj/item/organ/internal/brain/skrell ) default_h_style = "Skrell Short Tentacles" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index b67ba4f59ef..7d5ec0c69f2 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -57,12 +57,12 @@ ) has_organ = list( - "heart" = /obj/item/organ/heart/vox, - "lungs" = /obj/item/organ/lungs/vox, - "liver" = /obj/item/organ/liver/vox, - "kidneys" = /obj/item/organ/kidneys/vox, - "brain" = /obj/item/organ/brain, - "eyes" = /obj/item/organ/eyes, + BP_HEART = /obj/item/organ/internal/heart/vox, + BP_LUNGS = /obj/item/organ/internal/lungs/vox, + BP_LIVER = /obj/item/organ/internal/liver/vox, + BP_KIDNEYS = /obj/item/organ/internal/kidneys/vox, + BP_BRAIN = /obj/item/organ/internal/brain, + BP_EYES = /obj/item/organ/internal/eyes, "stack" = /obj/item/organ/stack/vox ) @@ -105,12 +105,12 @@ // Pariahs have no stack. has_organ = list( - "heart" = /obj/item/organ/heart/vox, - "lungs" = /obj/item/organ/lungs/vox, - "liver" = /obj/item/organ/liver/vox, - "kidneys" = /obj/item/organ/kidneys/vox, - "brain" = /obj/item/organ/pariah_brain, - "eyes" = /obj/item/organ/eyes + BP_HEART = /obj/item/organ/internal/heart/vox, + BP_LUNGS = /obj/item/organ/internal/lungs/vox, + BP_LIVER = /obj/item/organ/internal/liver/vox, + BP_KIDNEYS = /obj/item/organ/internal/kidneys/vox, + BP_BRAIN = /obj/item/organ/pariah_brain, + BP_EYES = /obj/item/organ/internal/eyes ) spawn_flags = IS_RESTRICTED diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index b84771ebd12..90ac51b07b4 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -171,29 +171,29 @@ // Determines the organs that the species spawns with and var/list/has_organ = list( // which required-organ checks are conducted. - "heart" = /obj/item/organ/heart, - "lungs" = /obj/item/organ/lungs, - "liver" = /obj/item/organ/liver, - "kidneys" = /obj/item/organ/kidneys, - "brain" = /obj/item/organ/brain, + BP_HEART = /obj/item/organ/internal/heart, + BP_LUNGS = /obj/item/organ/internal/lungs, + BP_LIVER = /obj/item/organ/internal/liver, + BP_KIDNEYS = /obj/item/organ/internal/kidneys, + BP_BRAIN = /obj/item/organ/internal/brain, "appendix" = /obj/item/organ/appendix, - "eyes" = /obj/item/organ/eyes + BP_EYES = /obj/item/organ/internal/eyes ) - var/vision_organ // If set, this organ is required for vision. Defaults to "eyes" if the species has them. - var/breathing_organ // If set, this organ is required to breathe. Defaults to "lungs" if the species has them. + var/vision_organ // If set, this organ is required for vision. Defaults to BP_EYES if the species has them. + var/breathing_organ // If set, this organ is required to breathe. Defaults to BP_LUNGS if the species has them. var/list/has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right) + BP_CHEST = list("path" = /obj/item/organ/external/chest), + BP_GROIN = list("path" = /obj/item/organ/external/groin), + BP_HEAD = list("path" = /obj/item/organ/external/head), + BP_L_ARM = list("path" = /obj/item/organ/external/arm), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BP_L_LEG = list("path" = /obj/item/organ/external/leg), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BP_L_HAND = list("path" = /obj/item/organ/external/hand), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right) ) // Bump vars @@ -224,12 +224,12 @@ hud = new() //If the species has eyes, they are the default vision organ - if(!vision_organ && has_organ["eyes"]) - vision_organ = "eyes" + if(!vision_organ && has_organ[BP_EYES]) + vision_organ = BP_EYES // Same, but for lungs. - if (!breathing_organ && has_organ["lungs"]) - breathing_organ = "lungs" + if (!breathing_organ && has_organ[BP_LUNGS]) + breathing_organ = BP_LUNGS unarmed_attacks = list() for(var/u_type in unarmed_types) diff --git a/code/modules/mob/living/carbon/human/species/species_attack.dm b/code/modules/mob/living/carbon/human/species/species_attack.dm index a1583f5e09d..38ed0b80f63 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack.dm @@ -38,13 +38,13 @@ return 0 switch(zone) - if("head", "mouth", "eyes") + if(BP_HEAD, "mouth", BP_EYES) // ----- HEAD ----- // switch(attack_damage) if(1 to 2) user.visible_message("[user] scratched [target] across \his cheek!") if(3 to 4) - user.visible_message("[user] [pick(attack_verb)] [target]'s [pick("head", "neck")]!") //'with spread claws' sounds a little bit odd, just enough that conciseness is better here I think + user.visible_message("[user] [pick(attack_verb)] [target]'s [pick(BP_HEAD, "neck")]!") //'with spread claws' sounds a little bit odd, just enough that conciseness is better here I think if(5) user.visible_message(pick( "[user] rakes \his [pick(attack_noun)] across [target]'s face!", diff --git a/code/modules/mob/living/carbon/human/species/species_hud.dm b/code/modules/mob/living/carbon/human/species/species_hud.dm index ec0001d2a73..2749a864eed 100644 --- a/code/modules/mob/living/carbon/human/species/species_hud.dm +++ b/code/modules/mob/living/carbon/human/species/species_hud.dm @@ -23,10 +23,10 @@ "o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "suit", "toggle" = 1), "mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "mask", "toggle" = 1), "gloves" = list("loc" = ui_gloves, "name" = "Gloves", "slot" = slot_gloves, "state" = "gloves", "toggle" = 1), - "eyes" = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1), + BP_EYES = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1), "l_ear" = list("loc" = ui_l_ear, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1), "r_ear" = list("loc" = ui_r_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1), - "head" = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1), + BP_HEAD = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1), "shoes" = list("loc" = ui_shoes, "name" = "Shoes", "slot" = slot_shoes, "state" = "shoes", "toggle" = 1), "suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "suitstore"), "back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back"), @@ -66,7 +66,7 @@ "o_clothing" = list("loc" = ui_shoes, "name" = "Suit", "slot" = slot_wear_suit, "state" = "suit", "toggle" = 1), "l_ear" = list("loc" = ui_glasses, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1), "r_ear" = list("loc" = ui_l_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1), - "head" = list("loc" = ui_mask, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1), + BP_HEAD = list("loc" = ui_mask, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1), "suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "suitstore"), "back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back"), "id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id"), @@ -74,7 +74,7 @@ "storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"), "belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt"), "mask" = list("loc" = ui_oclothing, "name" = "Mask", "slot" = slot_wear_mask, "state" = "mask", "toggle" = 1), - "eyes" = list("loc" = ui_gloves, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1) + BP_EYES = list("loc" = ui_gloves, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1) ) /datum/hud_data/monkey diff --git a/code/modules/mob/living/carbon/human/species/station/diona/diona.dm b/code/modules/mob/living/carbon/human/species/station/diona/diona.dm index 557b1747078..73da8a98ea5 100644 --- a/code/modules/mob/living/carbon/human/species/station/diona/diona.dm +++ b/code/modules/mob/living/carbon/human/species/station/diona/diona.dm @@ -50,17 +50,17 @@ ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/diona), - "groin" = list("path" = /obj/item/organ/external/groin/diona), - "head" = list("path" = /obj/item/organ/external/head/diona), - "l_arm" = list("path" = /obj/item/organ/external/arm/diona), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/diona), - "l_leg" = list("path" = /obj/item/organ/external/leg/diona), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/diona), - "l_hand" = list("path" = /obj/item/organ/external/hand/diona), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/diona), - "l_foot" = list("path" = /obj/item/organ/external/foot/diona), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/diona) + BP_CHEST = list("path" = /obj/item/organ/external/chest/diona), + BP_GROIN = list("path" = /obj/item/organ/external/groin/diona), + BP_HEAD = list("path" = /obj/item/organ/external/head/diona), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/diona), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/diona), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/diona), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/diona), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/diona), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/diona), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/diona), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/diona) ) warning_low_pressure = 50 @@ -89,7 +89,7 @@ sprint_speed_factor = 0.5 //Speed gained is minor sprint_cost_factor = 0.8 climb_coeff = 1.3 - vision_organ = "head" + vision_organ = BP_HEAD max_hydration_factor = -1 @@ -154,12 +154,12 @@ /datum/species/diona/handle_speech_problems(mob/living/carbon/human/H, list/current_flags, message, message_verb, message_mode) // Diona without head can live, but they cannot talk as loud anymore. - var/obj/item/organ/external/O = H.organs_by_name["head"] + var/obj/item/organ/external/O = H.organs_by_name[BP_HEAD] current_flags[4] = O.is_stump() ? 3 : world.view return current_flags /datum/species/diona/handle_speech_sound(mob/living/carbon/human/H, list/current_flags) current_flags = ..() - var/obj/item/organ/external/O = H.organs_by_name["head"] + var/obj/item/organ/external/O = H.organs_by_name[BP_HEAD] current_flags[3] = O.is_stump() return current_flags diff --git a/code/modules/mob/living/carbon/human/species/station/golem.dm b/code/modules/mob/living/carbon/human/species/station/golem.dm index 757f1baf5e2..f41376b44ed 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -43,21 +43,21 @@ flesh_color = "#5C5B5D" has_organ = list( - "brain" = /obj/item/organ/brain/golem + BP_BRAIN = /obj/item/organ/internal/brain/golem ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/unbreakable), - "groin" = list("path" = /obj/item/organ/external/groin/unbreakable), - "head" = list("path" = /obj/item/organ/external/head/unbreakable), - "l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable), - "l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable), - "l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable), - "l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable) + BP_CHEST = list("path" = /obj/item/organ/external/chest/unbreakable), + BP_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable), + BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbreakable), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/unbreakable), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbreakable), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/unbreakable), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbreakable) ) death_message = "becomes completely motionless..." diff --git a/code/modules/mob/living/carbon/human/species/station/human/human_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/human/human_subspecies.dm index a2a5044d435..96e4bc0cc6d 100644 --- a/code/modules/mob/living/carbon/human/species/station/human/human_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/human/human_subspecies.dm @@ -35,8 +35,8 @@ else return 3 - var/obj/item/organ/external/l_leg = H.get_organ("l_leg") - var/obj/item/organ/external/r_leg = H.get_organ("r_leg") + var/obj/item/organ/external/l_leg = H.get_organ(BP_L_LEG) + var/obj/item/organ/external/r_leg = H.get_organ(BP_R_LEG) if((l_leg.status & ORGAN_ROBOT) && (r_leg.status & ORGAN_ROBOT)) return @@ -61,8 +61,8 @@ if(A && !A.has_gravity()) return - var/obj/item/organ/external/l_leg = H.get_organ("l_leg") - var/obj/item/organ/external/r_leg = H.get_organ("r_leg") + var/obj/item/organ/external/l_leg = H.get_organ(BP_L_LEG) + var/obj/item/organ/external/r_leg = H.get_organ(BP_R_LEG) if((l_leg.status & ORGAN_ROBOT) && (r_leg.status & ORGAN_ROBOT)) return diff --git a/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm b/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm index 635e74cbabe..24a8440fa0f 100644 --- a/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm +++ b/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm @@ -75,26 +75,26 @@ reagent_tag = IS_MACHINE has_organ = list( - "brain" = /obj/item/organ/mmi_holder/posibrain, - "cell" = /obj/item/organ/cell, - "optics" = /obj/item/organ/eyes/optical_sensor, - "ipc tag" = /obj/item/organ/ipc_tag + BP_BRAIN = /obj/item/organ/mmi_holder/posibrain, + BP_CELL = /obj/item/organ/cell, + BP_OPTICS = /obj/item/organ/internal/eyes/optical_sensor, + BP_IPCTAG = /obj/item/organ/internal/ipc_tag ) - vision_organ = "optics" + vision_organ = BP_OPTICS has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/ipc), - "groin" = list("path" = /obj/item/organ/external/groin/ipc), - "head" = list("path" = /obj/item/organ/external/head/ipc), - "l_arm" = list("path" = /obj/item/organ/external/arm/ipc), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/ipc), - "l_leg" = list("path" = /obj/item/organ/external/leg/ipc), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/ipc), - "l_hand" = list("path" = /obj/item/organ/external/hand/ipc), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/ipc), - "l_foot" = list("path" = /obj/item/organ/external/foot/ipc), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc) + BP_CHEST = list("path" = /obj/item/organ/external/chest/ipc), + BP_GROIN = list("path" = /obj/item/organ/external/groin/ipc), + BP_HEAD = list("path" = /obj/item/organ/external/head/ipc), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/ipc), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/ipc), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/ipc), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/ipc), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/ipc), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/ipc), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/ipc), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/ipc) ) @@ -148,7 +148,7 @@ datum/species/machine/handle_post_spawn(var/mob/living/carbon/human/H) if (establish_db_connection(dbcon)) - var/obj/item/organ/ipc_tag/tag = new_machine.internal_organs_by_name["ipc tag"] + var/obj/item/organ/internal/ipc_tag/tag = new_machine.internal_organs_by_name[BP_IPCTAG] var/status = TRUE var/list/query_details = list("ckey" = player.ckey, "character_name" = player.prefs.real_name) @@ -162,7 +162,7 @@ datum/species/machine/handle_post_spawn(var/mob/living/carbon/human/H) log_query.Execute(query_details) if (!status) - new_machine.internal_organs_by_name -= "ipc tag" + new_machine.internal_organs_by_name -= BP_IPCTAG new_machine.internal_organs -= tag qdel(tag) @@ -173,7 +173,7 @@ datum/species/machine/handle_post_spawn(var/mob/living/carbon/human/H) if (establish_db_connection(dbcon)) var/status = FALSE var/sql_status = FALSE - if (target.internal_organs_by_name["ipc tag"]) + if (target.internal_organs_by_name[BP_IPCTAG]) status = TRUE var/list/query_details = list("ckey" = player.ckey, "character_name" = target.real_name) diff --git a/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm index b2d3143fcc3..ec852fe587c 100644 --- a/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm @@ -46,17 +46,17 @@ appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_TONE | HAS_EYE_COLOR | HAS_FBP | HAS_UNDERWEAR | HAS_SOCKS | HAS_SKIN_PRESET has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/shell), - "groin" = list("path" = /obj/item/organ/external/groin/shell), - "head" = list("path" = /obj/item/organ/external/head/shell), - "l_arm" = list("path" = /obj/item/organ/external/arm/shell), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/shell), - "l_leg" = list("path" = /obj/item/organ/external/leg/shell), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/shell), - "l_hand" = list("path" = /obj/item/organ/external/hand/shell), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/shell), - "l_foot" = list("path" = /obj/item/organ/external/foot/shell), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/shell) + BP_CHEST = list("path" = /obj/item/organ/external/chest/shell), + BP_GROIN = list("path" = /obj/item/organ/external/groin/shell), + BP_HEAD = list("path" = /obj/item/organ/external/head/shell), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/shell), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/shell), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/shell), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/shell), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/shell), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/shell), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/shell), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/shell) ) base_color = "#25032" @@ -86,9 +86,9 @@ breakcuffs = list(MALE, FEMALE) has_organ = list( - "brain" = /obj/item/organ/mmi_holder/posibrain, - "cell" = /obj/item/organ/cell, - "optics" = /obj/item/organ/eyes/optical_sensor, + BP_BRAIN = /obj/item/organ/mmi_holder/posibrain, + BP_CELL = /obj/item/organ/cell, + BP_OPTICS = /obj/item/organ/internal/eyes/optical_sensor, "surge" = /obj/item/organ/surge/advanced ) @@ -123,17 +123,17 @@ show_ssd = "completely quiescent" has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/industrial), - "groin" = list("path" = /obj/item/organ/external/groin/industrial), - "head" = list("path" = /obj/item/organ/external/head/industrial), - "l_arm" = list("path" = /obj/item/organ/external/arm/industrial), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/industrial), - "l_leg" = list("path" = /obj/item/organ/external/leg/industrial), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/industrial), - "l_hand" = list("path" = /obj/item/organ/external/hand/industrial), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/industrial), - "l_foot" = list("path" = /obj/item/organ/external/foot/industrial), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/industrial) + BP_CHEST = list("path" = /obj/item/organ/external/chest/industrial), + BP_GROIN = list("path" = /obj/item/organ/external/groin/industrial), + BP_HEAD = list("path" = /obj/item/organ/external/head/industrial), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/industrial), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/industrial), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/industrial), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/industrial), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/industrial), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/industrial), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/industrial), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/industrial) ) flags = IS_IPC | ACCEPTS_COOLER @@ -224,25 +224,25 @@ ) has_organ = list( - "brain" = /obj/item/organ/mmi_holder/posibrain/terminator, + BP_BRAIN = /obj/item/organ/mmi_holder/posibrain/terminator, "shielded cell" = /obj/item/organ/cell/terminator, - "optics" = /obj/item/organ/eyes/optical_sensor/terminator, + BP_OPTICS = /obj/item/organ/internal/eyes/optical_sensor/terminator, "data core" = /obj/item/organ/data, "surge" = /obj/item/organ/surge/advanced ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/terminator), - "groin" = list("path" = /obj/item/organ/external/groin/terminator), - "head" = list("path" = /obj/item/organ/external/head/terminator), - "l_arm" = list("path" = /obj/item/organ/external/arm/terminator), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/terminator), - "l_leg" = list("path" = /obj/item/organ/external/leg/terminator), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/terminator), - "l_hand" = list("path" = /obj/item/organ/external/hand/terminator), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/terminator), - "l_foot" = list("path" = /obj/item/organ/external/foot/terminator), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/terminator) + BP_CHEST = list("path" = /obj/item/organ/external/chest/terminator), + BP_GROIN = list("path" = /obj/item/organ/external/groin/terminator), + BP_HEAD = list("path" = /obj/item/organ/external/head/terminator), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/terminator), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/terminator), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/terminator), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/terminator), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/terminator), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/terminator), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/terminator), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/terminator) ) @@ -287,17 +287,17 @@ blurb = "An extremely durable and heavy Industrial model branded by Hephaestus Industries. It is their improved Industrial model, with thicker plating and improved power cell. Its actuators struggle to carry the immense weight, however, making the unit quite slow. This chassis would be seen in roles where it would be dangerous or inefficient to use a less durable unit, such as engineering, security, and mining. While this unit still possesses built-in cooling conduits, the increased plating and thickness of said plating proved a difficult challenge for the engineers to develop good cooling, so the unit suffers somewhat from increased heat loads. Overtaxing its hardware will quickly lead to overheating." has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/industrial/hephaestus), - "groin" = list("path" = /obj/item/organ/external/groin/industrial/hephaestus), - "head" = list("path" = /obj/item/organ/external/head/industrial/hephaestus), - "l_arm" = list("path" = /obj/item/organ/external/arm/industrial/hephaestus), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/industrial/hephaestus), - "l_leg" = list("path" = /obj/item/organ/external/leg/industrial/hephaestus), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/industrial/hephaestus), - "l_hand" = list("path" = /obj/item/organ/external/hand/industrial/hephaestus), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/industrial/hephaestus), - "l_foot" = list("path" = /obj/item/organ/external/foot/industrial/hephaestus), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/industrial/hephaestus) + BP_CHEST = list("path" = /obj/item/organ/external/chest/industrial/hephaestus), + BP_GROIN = list("path" = /obj/item/organ/external/groin/industrial/hephaestus), + BP_HEAD = list("path" = /obj/item/organ/external/head/industrial/hephaestus), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/industrial/hephaestus), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/industrial/hephaestus), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/industrial/hephaestus), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/industrial/hephaestus), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/industrial/hephaestus), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/industrial/hephaestus), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/industrial/hephaestus), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/industrial/hephaestus) ) /datum/species/machine/industrial/hephaestus/get_light_color(mob/living/carbon/human/H) @@ -322,17 +322,17 @@ blurb = "The Xion Manufacturing Group, being a subsidiary of Hephaestus Industries, saw the original Industrial models and wanted to develop their own chassis based off of the original design. The result is the Xion Industrial model. Sturdy and strong, this chassis is quite powerful and equally durable, with an ample power cell and improved actuators for carrying the increased weight of the body. The Xion model also retains sturdiness without covering the chassis in plating, allowing for the cooling systems to vent heat much easier than the Hephaestus-brand model. This unit cannot perform EVA without a suit." has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/industrial/xion), - "groin" = list("path" = /obj/item/organ/external/groin/industrial/xion), - "head" = list("path" = /obj/item/organ/external/head/industrial/xion), - "l_arm" = list("path" = /obj/item/organ/external/arm/industrial/xion), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/industrial/xion), - "l_leg" = list("path" = /obj/item/organ/external/leg/industrial/xion), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/industrial/xion), - "l_hand" = list("path" = /obj/item/organ/external/hand/industrial/xion), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/industrial/xion), - "l_foot" = list("path" = /obj/item/organ/external/foot/industrial/xion), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/industrial/xion) + BP_CHEST = list("path" = /obj/item/organ/external/chest/industrial/xion), + BP_GROIN = list("path" = /obj/item/organ/external/groin/industrial/xion), + BP_HEAD = list("path" = /obj/item/organ/external/head/industrial/xion), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/industrial/xion), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/industrial/xion), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/industrial/xion), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/industrial/xion), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/industrial/xion), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/industrial/xion), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/industrial/xion), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/industrial/xion) ) /datum/species/machine/industrial/xion/get_light_color(mob/living/carbon/human/H) @@ -359,17 +359,17 @@ blurb = "Being a corporation focused primarily on medical sciences and treatments, Zeng-Hu Pharmaceuticals had little interest in the market of synthetics in the beginning (especially considering a good portion of Zeng-Hu employees are Skrellian). However, after seeing the advances in almost all fields of the galactic market after the advent of synthetics, Zeng-Hu set aside some funds for their own robotics department, focused mainly on medical service and even science related operations. Having taken some inspiration from biological life, the chassis has an interesting leg design: digitigrade legs provide the chassis with enhanced speed. A downside to this development was the reduction of metals on the chassis. Most plates covering the sensitive interior electronics are polymer casts to reduce the weight of the unit, resulting in a not-so-durable android." has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/industrial/zenghu), - "groin" = list("path" = /obj/item/organ/external/groin/industrial/zenghu), - "head" = list("path" = /obj/item/organ/external/head/industrial/zenghu), - "l_arm" = list("path" = /obj/item/organ/external/arm/industrial/zenghu), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/industrial/zenghu), - "l_leg" = list("path" = /obj/item/organ/external/leg/industrial/zenghu), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/industrial/zenghu), - "l_hand" = list("path" = /obj/item/organ/external/hand/industrial/zenghu), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/industrial/zenghu), - "l_foot" = list("path" = /obj/item/organ/external/foot/industrial/zenghu), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/industrial/zenghu) + BP_CHEST = list("path" = /obj/item/organ/external/chest/industrial/zenghu), + BP_GROIN = list("path" = /obj/item/organ/external/groin/industrial/zenghu), + BP_HEAD = list("path" = /obj/item/organ/external/head/industrial/zenghu), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/industrial/zenghu), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/industrial/zenghu), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/industrial/zenghu), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/industrial/zenghu), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/industrial/zenghu), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/industrial/zenghu), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/industrial/zenghu), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/industrial/zenghu) ) inherent_verbs = list( @@ -403,17 +403,17 @@ blurb = "Bishop Cybernetics frames are among the sleeker, flashier frames widely produced for IPCs. This brand-new, high end design has a focus on pioneering energy efficiency without sacrifice, fitting to Bishop's company vision. Cutting-edge technology in power management means this frame can operate longer while running more demanding processing algorithms than most. This extreme push to minimize power draw means this frame can be equipped with all sorts of extra equipment: a hologram for a face, flashing status displays and embedded lights solely meant for show. The one thing holding this frame back from perfection is the same common criticism leveled against almost all Bishop products: the shiny chrome and glass meant to put all of this tech on display means it's exposed and fragile. It's because of Bishop's unrelenting pursuit of vanity in their designs that these frames often suffer from issues with reliability and struggle to safely perform the same work as cheaper, more rugged frames." has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/industrial/bishop), - "groin" = list("path" = /obj/item/organ/external/groin/industrial/bishop), - "head" = list("path" = /obj/item/organ/external/head/industrial/bishop), - "l_arm" = list("path" = /obj/item/organ/external/arm/industrial/bishop), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/industrial/bishop), - "l_leg" = list("path" = /obj/item/organ/external/leg/industrial/bishop), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/industrial/bishop), - "l_hand" = list("path" = /obj/item/organ/external/hand/industrial/bishop), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/industrial/bishop), - "l_foot" = list("path" = /obj/item/organ/external/foot/industrial/bishop), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/industrial/bishop) + BP_CHEST = list("path" = /obj/item/organ/external/chest/industrial/bishop), + BP_GROIN = list("path" = /obj/item/organ/external/groin/industrial/bishop), + BP_HEAD = list("path" = /obj/item/organ/external/head/industrial/bishop), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/industrial/bishop), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/industrial/bishop), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/industrial/bishop), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/industrial/bishop), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/industrial/bishop), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/industrial/bishop), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/industrial/bishop), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/industrial/bishop) ) inherent_verbs = list( @@ -441,17 +441,17 @@ spawn_flags = IS_RESTRICTED has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/unbranded), - "groin" = list("path" = /obj/item/organ/external/groin/unbranded), - "head" = list("path" = /obj/item/organ/external/head/unbranded), - "l_arm" = list("path" = /obj/item/organ/external/arm/unbranded), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/unbranded), - "l_leg" = list("path" = /obj/item/organ/external/leg/unbranded), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/unbranded), - "l_hand" = list("path" = /obj/item/organ/external/hand/unbranded), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/unbranded), - "l_foot" = list("path" = /obj/item/organ/external/foot/unbranded), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/unbranded) + BP_CHEST = list("path" = /obj/item/organ/external/chest/unbranded), + BP_GROIN = list("path" = /obj/item/organ/external/groin/unbranded), + BP_HEAD = list("path" = /obj/item/organ/external/head/unbranded), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbranded), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbranded), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbranded), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbranded), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/unbranded), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbranded), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/unbranded), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbranded) ) inherent_verbs = list( diff --git a/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm b/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm index bff2e2e6afa..cf6dc9daa6b 100644 --- a/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm +++ b/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm @@ -31,13 +31,13 @@ flags = NO_SLIP has_organ = list( - "heart" = /obj/item/organ/heart/skrell, - "lungs" = /obj/item/organ/lungs/skrell, - "liver" = /obj/item/organ/liver/skrell, - "kidneys" = /obj/item/organ/kidneys/skrell, - "brain" = /obj/item/organ/brain/skrell, + BP_HEART = /obj/item/organ/internal/heart/skrell, + BP_LUNGS = /obj/item/organ/internal/lungs/skrell, + BP_LIVER = /obj/item/organ/internal/liver/skrell, + BP_KIDNEYS = /obj/item/organ/internal/kidneys/skrell, + BP_BRAIN = /obj/item/organ/internal/brain/skrell, "appendix" = /obj/item/organ/appendix, - "eyes" = /obj/item/organ/eyes/skrell + BP_EYES = /obj/item/organ/internal/eyes/skrell ) flesh_color = "#8CD7A3" diff --git a/code/modules/mob/living/carbon/human/species/station/slime.dm b/code/modules/mob/living/carbon/human/species/station/slime.dm index 96ed90c1447..01d186660fb 100644 --- a/code/modules/mob/living/carbon/human/species/station/slime.dm +++ b/code/modules/mob/living/carbon/human/species/station/slime.dm @@ -25,7 +25,7 @@ death_message_range = 7 has_organ = list( - "brain" = /obj/item/organ/brain/slime + BP_BRAIN = /obj/item/organ/internal/brain/slime ) breath_type = null @@ -36,17 +36,17 @@ push_flags = MONKEY|SLIME|SIMPLE_ANIMAL has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/unbreakable), - "groin" = list("path" = /obj/item/organ/external/groin/unbreakable), - "head" = list("path" = /obj/item/organ/external/head/unbreakable), - "l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable), - "l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable), - "l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable), - "l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable) + BP_CHEST = list("path" = /obj/item/organ/external/chest/unbreakable), + BP_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable), + BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbreakable), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/unbreakable), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbreakable), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/unbreakable), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbreakable) ) /datum/species/slime/handle_death(var/mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/station/unathi/unathi_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/unathi/unathi_subspecies.dm index 3cf8ffca43a..68d75168dcc 100644 --- a/code/modules/mob/living/carbon/human/species/station/unathi/unathi_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/unathi/unathi_subspecies.dm @@ -61,29 +61,29 @@ ) has_organ = list( - "heart" = /obj/item/organ/heart, - "lungs" = /obj/item/organ/lungs, - "liver" = /obj/item/organ/liver, - "kidneys" = /obj/item/organ/kidneys/autakh, - "brain" = /obj/item/organ/brain, - "eyes" = /obj/item/organ/eyes/autakh, - "anchor" = /obj/item/organ/anchor, - "haemodynamic" = /obj/item/organ/haemodynamic, - "adrenal" = /obj/item/organ/adrenal + BP_HEART = /obj/item/organ/internal/heart, + BP_LUNGS = /obj/item/organ/internal/lungs, + BP_LIVER = /obj/item/organ/internal/liver, + BP_KIDNEYS = /obj/item/organ/internal/kidneys/autakh, + BP_BRAIN = /obj/item/organ/internal/brain, + BP_EYES = /obj/item/organ/internal/eyes/autakh, + BP_ANCHOR = /obj/item/organ/internal/anchor, + BP_HAEMO = /obj/item/organ/internal/haemodynamic, + BP_ADRENAL = /obj/item/organ/internal/adrenal ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/autakh), - "groin" = list("path" = /obj/item/organ/external/groin/autakh), - "head" = list("path" = /obj/item/organ/external/head/autakh), - "l_arm" = list("path" = /obj/item/organ/external/arm/autakh), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/autakh), - "l_leg" = list("path" = /obj/item/organ/external/leg/autakh), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/autakh), - "l_hand" = list("path" = /obj/item/organ/external/hand/autakh), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/autakh), - "l_foot" = list("path" = /obj/item/organ/external/foot/autakh), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/autakh) + BP_CHEST = list("path" = /obj/item/organ/external/chest/autakh), + BP_GROIN = list("path" = /obj/item/organ/external/groin/autakh), + BP_HEAD = list("path" = /obj/item/organ/external/head/autakh), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/autakh), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/autakh), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/autakh), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/autakh), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/autakh), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/autakh), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/autakh), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/autakh) ) appearance_flags = HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR @@ -119,7 +119,7 @@ if (!istype(H)) return null - var/obj/item/organ/eyes/eyes = H.get_eyes() + var/obj/item/organ/internal/eyes/eyes = H.get_eyes() if (eyes) var/eyegb = rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]) return eyegb diff --git a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm index 2dc3baa8f3b..a339e4bc107 100644 --- a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm +++ b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm @@ -87,29 +87,29 @@ has_organ = list( "neural socket" = /obj/item/organ/vaurca/neuralsocket, - "lungs" = /obj/item/organ/lungs/vaurca, + BP_LUNGS = /obj/item/organ/internal/lungs/vaurca, "filtration bit" = /obj/item/organ/vaurca/filtrationbit, - "right heart" = /obj/item/organ/heart/right, - "left heart" = /obj/item/organ/heart/left, + "right heart" = /obj/item/organ/internal/heart/right, + "left heart" = /obj/item/organ/internal/heart/left, "phoron reserve tank" = /obj/item/organ/vaurca/preserve, - "liver" = /obj/item/organ/liver/vaurca, - "kidneys" = /obj/item/organ/kidneys/vaurca, - "brain" = /obj/item/organ/brain/vaurca, - "eyes" = /obj/item/organ/eyes/vaurca + BP_LIVER = /obj/item/organ/internal/liver/vaurca, + BP_KIDNEYS = /obj/item/organ/internal/kidneys/vaurca, + BP_BRAIN = /obj/item/organ/internal/brain/vaurca, + BP_EYES = /obj/item/organ/internal/eyes/vaurca ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/vaurca), - "groin" = list("path" = /obj/item/organ/external/groin/vaurca), - "head" = list("path" = /obj/item/organ/external/head/vaurca), - "l_arm" = list("path" = /obj/item/organ/external/arm/vaurca), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/vaurca), - "l_leg" = list("path" = /obj/item/organ/external/leg/vaurca), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/vaurca), - "l_hand" = list("path" = /obj/item/organ/external/hand/vaurca), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/vaurca), - "l_foot" = list("path" = /obj/item/organ/external/foot/vaurca), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/vaurca) + BP_CHEST = list("path" = /obj/item/organ/external/chest/vaurca), + BP_GROIN = list("path" = /obj/item/organ/external/groin/vaurca), + BP_HEAD = list("path" = /obj/item/organ/external/head/vaurca), + BP_L_ARM = list("path" = /obj/item/organ/external/arm/vaurca), + BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/vaurca), + BP_L_LEG = list("path" = /obj/item/organ/external/leg/vaurca), + BP_R_LEG = list("path" = /obj/item/organ/external/leg/right/vaurca), + BP_L_HAND = list("path" = /obj/item/organ/external/hand/vaurca), + BP_R_HAND = list("path" = /obj/item/organ/external/hand/right/vaurca), + BP_L_FOOT = list("path" = /obj/item/organ/external/foot/vaurca), + BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right/vaurca) ) default_h_style = "Classic Antennae" diff --git a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm index 0a61007ee02..a96dd2beda8 100644 --- a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm @@ -142,14 +142,14 @@ has_organ = list( "neural socket" = /obj/item/organ/vaurca/neuralsocket, - "lungs" = /obj/item/organ/lungs/vaurca, - "right heart" = /obj/item/organ/heart/right, - "left heart" = /obj/item/organ/heart/left, + BP_LUNGS = /obj/item/organ/internal/lungs/vaurca, + "right heart" = /obj/item/organ/internal/heart/right, + "left heart" = /obj/item/organ/internal/heart/left, "phoron reservoir" = /obj/item/organ/vaurca/reservoir, - "mechanical liver" = /obj/item/organ/liver/vaurca/robo, - "mechanical kidneys" = /obj/item/organ/kidneys/vaurca/robo, - "brain" = /obj/item/organ/brain/vaurca, - "eyes" = /obj/item/organ/eyes/vaurca, + "mechanical liver" = /obj/item/organ/internal/liver/vaurca/robo, + "mechanical kidneys" = /obj/item/organ/internal/kidneys/vaurca/robo, + BP_BRAIN = /obj/item/organ/internal/brain/vaurca, + BP_EYES = /obj/item/organ/internal/eyes/vaurca, "filtration bit" = /obj/item/organ/vaurca/filtrationbit ) diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index d185333d4a7..92de9b057e2 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -119,7 +119,7 @@ if(can_reach_splints) var/removed_splint - for(var/organ in list("l_leg","r_leg","l_arm","r_arm","l_hand","r_hand","r_foot","l_foot")) + for(var/organ in list(BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_R_FOOT,BP_L_FOOT)) var/obj/item/organ/external/o = get_organ(organ) if (o && o.status & ORGAN_SPLINTED) var/obj/item/W = new /obj/item/stack/medical/splint(get_turf(src), 1) diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm index 9b4f3ec43ec..9a602c1baec 100644 --- a/code/modules/mob/living/carbon/human/unarmed_attack.dm +++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm @@ -30,11 +30,11 @@ var/global/list/sparring_attack_cache = list() return 0 // Check if they have a functioning hand. - var/obj/item/organ/external/E = user.organs_by_name["l_hand"] + var/obj/item/organ/external/E = user.organs_by_name[BP_L_HAND] if(E && !E.is_stump()) return 1 - E = user.organs_by_name["r_hand"] + E = user.organs_by_name[BP_R_HAND] if(E && !E.is_stump()) return 1 @@ -56,23 +56,23 @@ var/global/list/sparring_attack_cache = list() if(attack_damage >= 5 && armour < 100 && !(target == user) && stun_chance <= attack_damage * 5) // 25% standard chance switch(zone) // strong punches can have effects depending on where they hit - if("head", "mouth", "eyes") + if(BP_HEAD, "mouth", BP_EYES) // Induce blurriness if(pain_message) target.visible_message("[target] looks momentarily disoriented.", "You see stars.") target.apply_effect(attack_damage*2, EYE_BLUR, armour) - if("l_arm", "l_hand") + if(BP_L_ARM, BP_L_HAND) if (target.l_hand) // Disarm left hand //Urist McAssistant dropped the macguffin with a scream just sounds odd. Plus it doesn't work with NO_PAIN target.visible_message("\The [target.l_hand] was knocked right out of [target]'s grasp!") target.drop_l_hand() - if("r_arm", "r_hand") + if(BP_R_ARM, BP_R_HAND) if (target.r_hand) // Disarm right hand target.visible_message("\The [target.r_hand] was knocked right out of [target]'s grasp!") target.drop_r_hand() - if("chest") + if(BP_CHEST) if(!target.lying) var/turf/T = get_step(get_turf(target), get_dir(get_turf(user), get_turf(target))) if(!T.density) @@ -83,11 +83,11 @@ var/global/list/sparring_attack_cache = list() if(prob(50)) target.set_dir(reverse_dir[target.dir]) target.apply_effect(attack_damage * 0.4, WEAKEN, armour) - if("groin") + if(BP_GROIN) if(pain_message) target.visible_message("[target] looks like \he is in pain!", "[(target.gender=="female") ? "Oh god that hurt!" : "Oh no, not your [pick("testicles", "crown jewels", "clockweights", "family jewels", "marbles", "bean bags", "teabags", "sweetmeats", "goolies")]!"]") target.apply_effects(stutter = attack_damage * 2, agony = attack_damage* 3, blocked = armour) - if("l_leg", "l_foot", "r_leg", "r_foot") + if(BP_L_LEG, BP_L_FOOT, BP_R_LEG, BP_R_FOOT) if(!target.lying) if(pain_message) target.visible_message("[target] gives way slightly.") @@ -109,7 +109,7 @@ var/global/list/sparring_attack_cache = list() playsound(user.loc, attack_sound, 25, 1, -1) /datum/unarmed_attack/proc/handle_eye_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target) - var/obj/item/organ/eyes/eyes = target.get_eyes() + var/obj/item/organ/internal/eyes/eyes = target.get_eyes() eyes.take_damage(rand(3,4), 1) user.visible_message("[user] presses \his [eye_attack_text] into [target]'s [eyes.name]!") @@ -128,7 +128,7 @@ var/global/list/sparring_attack_cache = list() if (user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/muzzle)) return 0 - if (user == target && (zone == "head" || zone == "eyes" || zone == "mouth")) + if (user == target && (zone == BP_HEAD || zone == BP_EYES || zone == "mouth")) return 0 return 1 @@ -156,7 +156,7 @@ var/global/list/sparring_attack_cache = list() if(!target.lying) switch(zone) - if("head", "mouth", "eyes") + if(BP_HEAD, "mouth", BP_EYES) // ----- HEAD ----- // switch(attack_damage) if(1 to 2) @@ -197,14 +197,14 @@ var/global/list/sparring_attack_cache = list() if (user.legcuffed) return 0 - if(!(zone in list("l_leg", "r_leg", "l_foot", "r_foot", "groin"))) + if(!(zone in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_GROIN))) return 0 - var/obj/item/organ/external/E = user.organs_by_name["l_foot"] + var/obj/item/organ/external/E = user.organs_by_name[BP_L_FOOT] if(E && !E.is_stump()) return 1 - E = user.organs_by_name["r_foot"] + E = user.organs_by_name[BP_R_FOOT] if(E && !E.is_stump()) return 1 @@ -246,14 +246,14 @@ var/global/list/sparring_attack_cache = list() if(!istype(target)) return 0 - if (!user.lying && (target.lying || (zone in list("l_foot", "r_foot")))) + if (!user.lying && (target.lying || (zone in list(BP_L_FOOT, BP_R_FOOT)))) if(target.grabbed_by == user && target.lying) return 0 - var/obj/item/organ/external/E = user.organs_by_name["l_foot"] + var/obj/item/organ/external/E = user.organs_by_name[BP_L_FOOT] if(E && !E.is_stump()) return 1 - E = user.organs_by_name["r_foot"] + E = user.organs_by_name[BP_R_FOOT] if(E && !E.is_stump()) return 1 diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 4abbd16d2a8..86f1075902d 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -239,7 +239,7 @@ There are several things that need to be remembered: stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank") var/icon_key = "[species.race_key][g][s_tone][r_skin][g_skin][b_skin][lip_style || "nolips"][!!husk][!!fat][!!hulk][!!skeleton]" - var/obj/item/organ/eyes/eyes = get_eyes() + var/obj/item/organ/internal/eyes/eyes = get_eyes() if(eyes) icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]" else @@ -255,7 +255,7 @@ There are several things that need to be remembered: var/icon/base_icon = SSicon_cache.human_icon_cache[icon_key] if (!base_icon) // Icon ain't in the cache, so generate it. //BEGIN CACHED ICON GENERATION. - var/obj/item/organ/external/chest = get_organ("chest") + var/obj/item/organ/external/chest = get_organ(BP_CHEST) base_icon = chest.get_icon() for(var/obj/item/organ/external/part in organs) @@ -365,7 +365,7 @@ There are several things that need to be remembered: //Reset our hair overlays_raw[HAIR_LAYER] = null - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BP_HEAD) if(!head_organ || head_organ.is_stump() ) if(update_icons) update_icons() return diff --git a/code/modules/mob/living/carbon/resist.dm b/code/modules/mob/living/carbon/resist.dm index ff1642ce3b3..63cd7908c05 100644 --- a/code/modules/mob/living/carbon/resist.dm +++ b/code/modules/mob/living/carbon/resist.dm @@ -119,7 +119,7 @@ buckled.user_unbuckle_mob(src) if(violent_removal) - var/obj/item/organ/external/E = H.get_organ(pick("l_arm","r_arm")) + var/obj/item/organ/external/E = H.get_organ(pick(BP_L_ARM,BP_R_ARM)) var/dislocate_message = "" if(E && !E.is_dislocated()) E.dislocate(1) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 85901a0ef3f..2633eba69ce 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -398,8 +398,8 @@ default behaviour is: /mob/living/proc/get_organ_target() var/mob/shooter = src var/t = shooter:zone_sel.selecting - if ((t in list( "eyes", "mouth" ))) - t = "head" + if ((t in list( BP_EYES, "mouth" ))) + t = BP_HEAD var/obj/item/organ/external/def_zone = ran_zone(t) return def_zone diff --git a/code/modules/mob/living/parasite/meme.dm b/code/modules/mob/living/parasite/meme.dm index c6c2f4a88de..421935f0228 100644 --- a/code/modules/mob/living/parasite/meme.dm +++ b/code/modules/mob/living/parasite/meme.dm @@ -607,7 +607,7 @@ var/controlling if(istype(host,/mob/living/carbon/human)) var/mob/living/carbon/human/H = host - var/obj/item/organ/external/head = H.get_organ("head") + var/obj/item/organ/external/head = H.get_organ(BP_HEAD) head.implants -= src controlling = 0 diff --git a/code/modules/mob/living/silicon/robot/gripper.dm b/code/modules/mob/living/silicon/robot/gripper.dm index bc6f2db4cd3..b6efc737ec4 100644 --- a/code/modules/mob/living/silicon/robot/gripper.dm +++ b/code/modules/mob/living/silicon/robot/gripper.dm @@ -223,7 +223,7 @@ /obj/item/robot_parts, /obj/item/borg/upgrade, /obj/item/device/flash, //to build borgs, - /obj/item/organ/brain, //to insert into MMIs, + /obj/item/organ/internal/brain, //to insert into MMIs, /obj/item/stack/cable_coil, //again, for borg building, /obj/item/circuitboard, /obj/item/slime_extract, diff --git a/code/modules/mob/living/simple_animal/borer/borer.dm b/code/modules/mob/living/simple_animal/borer/borer.dm index 2104b451cc1..f10bd4216cc 100644 --- a/code/modules/mob/living/simple_animal/borer/borer.dm +++ b/code/modules/mob/living/simple_animal/borer/borer.dm @@ -109,7 +109,7 @@ if(istype(host,/mob/living/carbon/human)) var/mob/living/carbon/human/H = host - var/obj/item/organ/external/head = H.get_organ("head") + var/obj/item/organ/external/head = H.get_organ(BP_HEAD) head.implants -= src controlling = 0 diff --git a/code/modules/mob/living/simple_animal/borer/borer_powers.dm b/code/modules/mob/living/simple_animal/borer/borer_powers.dm index a7260a71bdb..3812163a408 100644 --- a/code/modules/mob/living/simple_animal/borer/borer_powers.dm +++ b/code/modules/mob/living/simple_animal/borer/borer_powers.dm @@ -72,12 +72,12 @@ if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/E = H.organs_by_name["head"] + var/obj/item/organ/external/E = H.organs_by_name[BP_HEAD] if(!E || E.is_stump()) to_chat(src, "\The [H] does not have a head!") return - if(!H.species.has_organ["brain"]) + if(!H.species.has_organ[BP_BRAIN]) to_chat(src, "\The [H] does not seem to have an ear canal to breach.") return @@ -117,12 +117,12 @@ if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/obj/item/organ/I = H.internal_organs_by_name["brain"] + var/obj/item/organ/I = H.internal_organs_by_name[BP_BRAIN] if(!I) // No brain organ, so the borer moves in and replaces it permanently. replace_brain() else // If they're in normally, implant removal can get them out. - var/obj/item/organ/external/head = H.get_organ("head") + var/obj/item/organ/external/head = H.get_organ(BP_HEAD) head.implants += src return @@ -185,10 +185,10 @@ H.ChangeToHusk() var/obj/item/organ/borer/B = new(H) - H.internal_organs_by_name["brain"] = B + H.internal_organs_by_name[BP_BRAIN] = B H.internal_organs |= B - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) affecting.implants -= src var/s2h_id = src.computer_id diff --git a/code/modules/mob/living/simple_animal/hostile/sarlacc.dm b/code/modules/mob/living/simple_animal/hostile/sarlacc.dm index 921b07ceccb..1e8a5516d0a 100644 --- a/code/modules/mob/living/simple_animal/hostile/sarlacc.dm +++ b/code/modules/mob/living/simple_animal/hostile/sarlacc.dm @@ -58,7 +58,7 @@ "You feel a searing pain as \the [src] severs your lower body and sends you careening into its grotesque gullet!", "You hear a sick crunch!" ) - var/obj/item/organ/external/G = H.get_organ("groin") + var/obj/item/organ/external/G = H.get_organ(BP_GROIN) G.droplimb(0,DROPLIMB_EDGE) if(SSmob.greatasses.len) var/obj/structure/greatworm/S = pick(SSmob.greatasses) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index f82159cb629..72c1ff41019 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -55,7 +55,7 @@ var/parrot_state = PARROT_WANDER //Hunt for a perch when created var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in life() being run every single tick. var/parrot_sleep_dur = 25 //Same as above, this is the var that physically counts down - var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack + var/parrot_dam_zone = list(BP_CHEST, BP_HEAD, BP_L_ARM, BP_L_LEG, BP_R_ARM, BP_R_LEG) //For humans, select a bodypart to attack var/parrot_speed = 5 //"Delay in world ticks between movement." according to byond. Yeah, that's BS but it does directly affect movement. Higher number = slower. var/parrot_been_shot = 0 //Parrots get a speed bonus after being shot. This will deincrement every Life() and at 0 the parrot will return to regular speed. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c6e837bcc76..25ba7217feb 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1299,37 +1299,37 @@ mob/proc/yank_out_object() /client/verb/body_toggle_head() set name = "body-toggle-head" set hidden = 1 - toggle_zone_sel(list("head","eyes","mouth")) + toggle_zone_sel(list(BP_HEAD,BP_EYES,"mouth")) /client/verb/body_r_arm() set name = "body-r-arm" set hidden = 1 - toggle_zone_sel(list("r_arm","r_hand")) + toggle_zone_sel(list(BP_R_ARM,BP_R_HAND)) /client/verb/body_l_arm() set name = "body-l-arm" set hidden = 1 - toggle_zone_sel(list("l_arm","l_hand")) + toggle_zone_sel(list(BP_L_ARM,BP_L_HAND)) /client/verb/body_chest() set name = "body-chest" set hidden = 1 - toggle_zone_sel(list("chest")) + toggle_zone_sel(list(BP_CHEST)) /client/verb/body_groin() set name = "body-groin" set hidden = 1 - toggle_zone_sel(list("groin")) + toggle_zone_sel(list(BP_GROIN)) /client/verb/body_r_leg() set name = "body-r-leg" set hidden = 1 - toggle_zone_sel(list("r_leg","r_foot")) + toggle_zone_sel(list(BP_R_LEG,BP_R_FOOT)) /client/verb/body_l_leg() set name = "body-l-leg" set hidden = 1 - toggle_zone_sel(list("l_leg","l_foot")) + toggle_zone_sel(list(BP_L_LEG,BP_L_FOOT)) /client/proc/toggle_zone_sel(list/zones) if(!check_has_body_select()) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 20dd5079df6..83f60c82693 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -175,7 +175,7 @@ user.visible_message("\The [user] covers [target]'s face!") if(target.silent < 3) target.silent = 3 - if("eyes") + if(BP_EYES) if(announce) assailant.visible_message("[assailant] covers [affecting]'s eyes!") if(affecting.eye_blind < 3) @@ -337,17 +337,17 @@ jointlock(affecting, assailant, hit_zone) if(I_HURT) - if(hit_zone == "eyes") + if(hit_zone == BP_EYES) attack_eye(affecting, assailant) - else if(hit_zone == "head") + else if(hit_zone == BP_HEAD) headbut(affecting, assailant) else dislocate(affecting, assailant, hit_zone) if(I_DISARM) - if(hit_zone != "head") + if(hit_zone != BP_HEAD) pin_down(affecting, assailant) - if(hit_zone == "head") + if(hit_zone == BP_HEAD) hair_pull(affecting, assailant) //clicking on yourself while grabbing them diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm index 5f1e61f593d..31766a4c675 100644 --- a/code/modules/mob/mob_grab_specials.dm +++ b/code/modules/mob/mob_grab_specials.dm @@ -60,7 +60,7 @@ if(!istype(attacker)) return - var/datum/unarmed_attack/attack = attacker.get_unarmed_attack(target, "eyes") + var/datum/unarmed_attack/attack = attacker.get_unarmed_attack(target, BP_EYES) if(!attack) return @@ -100,11 +100,11 @@ if(istype(hat)) damage += hat.force * 3 - var/armor = target.run_armor_check("head", "melee") - target.apply_damage(damage, BRUTE, "head", armor) - attacker.apply_damage(10, BRUTE, "head", attacker.run_armor_check("head", "melee")) + var/armor = target.run_armor_check(BP_HEAD, "melee") + target.apply_damage(damage, BRUTE, BP_HEAD, armor) + attacker.apply_damage(10, BRUTE, BP_HEAD, attacker.run_armor_check(BP_HEAD, "melee")) - if(armor < 25 && target.headcheck("head") && prob(damage)) + if(armor < 25 && target.headcheck(BP_HEAD) && prob(damage)) target.apply_effect(20, PARALYZE) target.visible_message("[target] [target.species.knockout_message]") diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 3cd6213be18..8f3a5e0051c 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -213,42 +213,42 @@ proc/getsensorlevel(A) //The base miss chance for the different defence zones var/list/global/base_miss_chance = list( - "head" = 40, - "chest" = 10, - "groin" = 20, - "l_leg" = 20, - "r_leg" = 20, - "l_arm" = 20, - "r_arm" = 20, - "l_hand" = 50, - "r_hand" = 50, - "l_foot" = 50, - "r_foot" = 50 + BP_HEAD = 40, + BP_CHEST = 10, + BP_GROIN = 20, + BP_L_LEG = 20, + BP_R_LEG = 20, + BP_L_ARM = 20, + BP_R_ARM = 20, + BP_L_HAND = 50, + BP_R_HAND = 50, + BP_L_FOOT = 50, + BP_R_FOOT = 50 ) //Used to weight organs when an organ is hit randomly (i.e. not a directed, aimed attack). //Also used to weight the protection value that armour provides for covering that body part when calculating protection from full-body effects. var/list/global/organ_rel_size = list( - "head" = 25, - "chest" = 70, - "groin" = 30, - "l_leg" = 25, - "r_leg" = 25, - "l_arm" = 25, - "r_arm" = 25, - "l_hand" = 10, - "r_hand" = 10, - "l_foot" = 10, - "r_foot" = 10 + BP_HEAD = 25, + BP_CHEST = 70, + BP_GROIN = 30, + BP_L_LEG = 25, + BP_R_LEG = 25, + BP_L_ARM = 25, + BP_R_ARM = 25, + BP_L_HAND = 10, + BP_R_HAND = 10, + BP_L_FOOT = 10, + BP_R_FOOT = 10 ) /proc/check_zone(zone) - if(!zone) return "chest" + if(!zone) return BP_CHEST switch(zone) - if("eyes") - zone = "head" + if(BP_EYES) + zone = BP_HEAD if("mouth") - zone = "head" + zone = BP_HEAD return zone // Returns zone with a certain probability. If the probability fails, or no zone is specified, then a random body part is chosen. @@ -263,17 +263,17 @@ var/list/global/organ_rel_size = list( var/ran_zone = zone while (ran_zone == zone) ran_zone = pick ( - organ_rel_size["head"]; "head", - organ_rel_size["chest"]; "chest", - organ_rel_size["groin"]; "groin", - organ_rel_size["l_arm"]; "l_arm", - organ_rel_size["r_arm"]; "r_arm", - organ_rel_size["l_leg"]; "l_leg", - organ_rel_size["r_leg"]; "r_leg", - organ_rel_size["l_hand"]; "l_hand", - organ_rel_size["r_hand"]; "r_hand", - organ_rel_size["l_foot"]; "l_foot", - organ_rel_size["r_foot"]; "r_foot" + organ_rel_size[BP_HEAD]; BP_HEAD, + organ_rel_size[BP_CHEST]; BP_CHEST, + organ_rel_size[BP_GROIN]; BP_GROIN, + organ_rel_size[BP_L_ARM]; BP_L_ARM, + organ_rel_size[BP_R_ARM]; BP_R_ARM, + organ_rel_size[BP_L_LEG]; BP_L_LEG, + organ_rel_size[BP_R_LEG]; BP_R_LEG, + organ_rel_size[BP_L_HAND]; BP_L_HAND, + organ_rel_size[BP_R_HAND]; BP_R_HAND, + organ_rel_size[BP_L_FOOT]; BP_L_FOOT, + organ_rel_size[BP_R_FOOT]; BP_R_FOOT ) return ran_zone diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index a200674b695..760b329e64c 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -279,8 +279,8 @@ var/min_move_delay = 0 if(ishuman(mob.buckled)) var/mob/living/carbon/human/driver = mob.buckled - var/obj/item/organ/external/l_hand = driver.get_organ("l_hand") - var/obj/item/organ/external/r_hand = driver.get_organ("r_hand") + var/obj/item/organ/external/l_hand = driver.get_organ(BP_L_HAND) + var/obj/item/organ/external/r_hand = driver.get_organ(BP_R_HAND) if((!l_hand || l_hand.is_stump()) && (!r_hand || r_hand.is_stump())) return // No hands to drive your chair? Tough luck! min_move_delay = driver.min_walk_delay diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index a3f515521e2..ccad67b6e69 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -463,15 +463,15 @@ var/groin_damage = rand(0,damage/4) - apply_damage(left_damage, BRUTE, "l_leg") - apply_damage(right_damage, BRUTE, "r_leg") + apply_damage(left_damage, BRUTE, BP_L_LEG) + apply_damage(right_damage, BRUTE, BP_R_LEG) if(prob(50)) - apply_damage(leftf_damage, BRUTE, "r_foot") + apply_damage(leftf_damage, BRUTE, BP_R_FOOT) if(prob(50)) - apply_damage(leftf_damage, BRUTE, "l_foot") + apply_damage(leftf_damage, BRUTE, BP_L_FOOT) if(prob(50)) - apply_damage(groin_damage, BRUTE, "groin") + apply_damage(groin_damage, BRUTE, BP_GROIN) visible_message("\The [src] falls and lands directly on their legs!", "You land on your feet, and the impact brings you to your knees.") @@ -484,13 +484,13 @@ var/lefth_damage = rand(0,damage/4) var/righth_damage = rand(0,damage/4) - apply_damage(left_damage, BRUTE, "l_arm") - apply_damage(right_damage, BRUTE, "r_arm") + apply_damage(left_damage, BRUTE, BP_L_ARM) + apply_damage(right_damage, BRUTE, BP_R_ARM) if(prob(50)) - apply_damage(lefth_damage, BRUTE, "r_hand") + apply_damage(lefth_damage, BRUTE, BP_R_HAND) if(prob(50)) - apply_damage(righth_damage, BRUTE, "l_hand") + apply_damage(righth_damage, BRUTE, BP_L_HAND) limb_damage = left_damage + right_damage + lefth_damage + righth_damage @@ -498,7 +498,7 @@ "You brace your fall with your arms, hitting \the [loc] with a loud thud.", "You hear a thud!") else if(prob(30) && combat_roll >= 1)//landed on their head - apply_damage(limb_damage, BRUTE, "head") + apply_damage(limb_damage, BRUTE, BP_HEAD) visible_message("\The [src] falls and lands on their face!", "With a loud thud, you land on your head. Hard.", "You hear a thud!") @@ -509,7 +509,7 @@ "With a loud thud, you land on \the [loc]!", "You hear a thud!") if(!limb_damage) - apply_damage(damage, BRUTE, "chest") + apply_damage(damage, BRUTE, BP_CHEST) Weaken(rand(damage/4, damage/2)) @@ -626,8 +626,8 @@ if (ishuman(L)) var/mob/living/carbon/human/H = L var/cranial_damage = rand(0,damage/2) - H.apply_damage(cranial_damage, BRUTE, "head") - H.apply_damage((damage - cranial_damage), BRUTE, "chest") + H.apply_damage(cranial_damage, BRUTE, BP_HEAD) + H.apply_damage((damage - cranial_damage), BRUTE, BP_CHEST) if (damage >= THROWNOBJ_KNOCKBACK_DIVISOR) H.Weaken(rand(damage / 4, damage / 2)) diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 5210073b679..ad6bcb75fb0 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -72,8 +72,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 B.volume += chem_effects[CE_BLOODRESTORE] //The heartfix to end all heartfixes - if(species && species.has_organ["heart"]) - var/obj/item/organ/heart/heart = internal_organs_by_name["heart"] + if(species && species.has_organ[BP_HEART]) + var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART] // Before we do that, we check for lifesupport. var/onlifesupport = 0 if (buckled && istype(buckled, /obj/machinery/optable/lifesupport)) diff --git a/code/modules/organs/internal/_internal.dm b/code/modules/organs/internal/_internal.dm new file mode 100644 index 00000000000..eca56b60e5e --- /dev/null +++ b/code/modules/organs/internal/_internal.dm @@ -0,0 +1,108 @@ +/**************************************************** + INTERNAL ORGANS DEFINES +****************************************************/ +/obj/item/organ/internal + var/dead_icon // Icon to use when the organ has died. + var/damage_reduction = 0.5 //modifier for internal organ injury + + min_broken_damage = 10 //Internal organs are frail, man. + +/obj/item/organ/internal/Destroy() + if(owner) + owner.internal_organs.Remove(src) + owner.internal_organs_by_name[organ_tag] = null + owner.internal_organs_by_name -= organ_tag + while(null in owner.internal_organs) + owner.internal_organs -= null + var/obj/item/organ/external/E = owner.organs_by_name[parent_organ] + if(istype(E)) E.internal_organs -= src + return ..() + +/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target, var/obj/item/organ/external/affected) + if(!istype(target)) + return 0 + + if(status & ORGAN_CUT_AWAY) + return 0 //organs don't work very well in the body when they aren't properly attached + + // robotic organs emulate behavior of the equivalent flesh organ of the species + if(BP_IS_ROBOTIC(src) || !species) + species = target.species + + ..() + + STOP_PROCESSING(SSprocessing, src) + target.internal_organs |= src + affected.internal_organs |= src + target.internal_organs_by_name[organ_tag] = src + return 1 + +/obj/item/organ/internal/die() + ..() + if((status & ORGAN_DEAD) && dead_icon) + icon_state = dead_icon + +/obj/item/organ/internal/proc/is_usable() + return ..() && !is_broken() + +/obj/item/organ/internal/robotize() + ..() + min_bruised_damage += 5 + min_broken_damage += 10 + +/obj/item/organ/internal/proc/getToxLoss() + if(BP_IS_ROBOTIC(src)) + return damage * 0.5 + return damage + +/obj/item/organ/internal/proc/set_max_damage(var/ndamage) + max_damage = Floor(ndamage) + min_broken_damage = Floor(0.75 * max_damage) + min_bruised_damage = Floor(0.25 * max_damage) + +/obj/item/organ/internal/proc/take_internal_damage(amount, var/silent=0) + if(BP_IS_ROBOTIC(src)) + damage = between(0, src.damage + (amount * 0.8), max_damage) + else + damage = between(0, src.damage + amount, max_damage) + + //only show this if the organ is not robotic + if(owner && can_feel_pain() && parent_organ && (amount > 5 || prob(10))) + var/obj/item/organ/external/parent = owner.get_organ(parent_organ) + if(parent && !silent) + var/degree = "" + if(is_bruised()) + degree = " a lot" + if(damage < 5) + degree = " a bit" + owner.custom_pain("Something inside your [parent.name] hurts[degree].", amount, affecting = parent) + +/obj/item/organ/internal/proc/get_visible_state() + if(damage > max_damage) + . = "bits and pieces of a destroyed " + else if(is_broken()) + . = "broken " + else if(is_bruised()) + . = "badly damaged " + else if(damage > 5) + . = "damaged " + if(status & ORGAN_DEAD) + if(can_recover()) + . = "decaying [.]" + else + . = "necrotic [.]" + . = "[.][name]" + +/obj/item/organ/internal/process() + ..() + handle_regeneration() + +/obj/item/organ/internal/proc/heal_damage(amount) + if (can_recover()) + damage = between(0, damage - round(amount, 0.1), max_damage) + +/obj/item/organ/internal/proc/handle_regeneration() + if(!damage || BP_IS_ROBOTIC(src) || !owner || owner.chem_effects[CE_TOXIN]) + return + if(damage < 0.1*max_damage) + heal_damage(0.02) \ No newline at end of file diff --git a/code/modules/organs/internal/appendix.dm b/code/modules/organs/internal/appendix.dm new file mode 100644 index 00000000000..3f325afe643 --- /dev/null +++ b/code/modules/organs/internal/appendix.dm @@ -0,0 +1,17 @@ +/obj/item/organ/appendix + name = "appendix" + icon_state = "appendix" + parent_organ = BP_GROIN + organ_tag = "appendix" + +/obj/item/organ/appendix/removed() + if(owner) + var/inflamed = 0 + for(var/datum/disease/appendicitis/appendicitis in owner.viruses) + inflamed = 1 + appendicitis.cure() + owner.resistances += appendicitis + if(inflamed) + icon_state = "appendixinflamed" + name = "inflamed appendix" + ..() \ No newline at end of file diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/modules/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm new file mode 100644 index 00000000000..d6602edd6ad --- /dev/null +++ b/code/modules/organs/internal/eyes.dm @@ -0,0 +1,37 @@ +/obj/item/organ/internal/eyes + name = "eyeballs" + icon_state = "eyes" + gender = PLURAL + organ_tag = BP_EYES + parent_organ = BP_HEAD + robotic_name = "visual prosthesis" + robotic_sprite = "eyes-prosthetic" + var/list/eye_colour = list(0,0,0) + var/singular_name = "eye" + +/obj/item/organ/internal/eyes/proc/update_colour() + if(!owner) + return + eye_colour = list( + owner.r_eyes ? owner.r_eyes : 0, + owner.g_eyes ? owner.g_eyes : 0, + owner.b_eyes ? owner.b_eyes : 0 + ) + +/obj/item/organ/internal/eyes/take_damage(amount, var/silent=0) + var/oldbroken = is_broken() + ..() + if(is_broken() && !oldbroken && owner && !owner.stat) + to_chat(owner, "You go blind!") + +/obj/item/organ/internal/eyes/proc/flash_act() + return + +/obj/item/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var. + ..() + if(!owner) + return + if(is_bruised()) + owner.eye_blurry = 20 + if(is_broken()) + owner.eye_blind = 20 \ No newline at end of file diff --git a/code/modules/organs/internal/heart.dm b/code/modules/organs/internal/heart.dm new file mode 100644 index 00000000000..0ab28e6d085 --- /dev/null +++ b/code/modules/organs/internal/heart.dm @@ -0,0 +1,15 @@ +/obj/item/organ/internal/heart + name = "heart" + icon_state = "heart-on" + organ_tag = BP_HEART + parent_organ = BP_CHEST + dead_icon = "heart-off" + robotic_name = "circulatory pump" + robotic_sprite = "heart-prosthetic" + +/obj/item/organ/internal/heart/process() + //Check if we're on lifesupport, and whether or not organs should be processing. + if(owner && owner.isonlifesupport()) + return 1 + else + return 0 \ No newline at end of file diff --git a/code/modules/organs/internal/kidneys.dm b/code/modules/organs/internal/kidneys.dm new file mode 100644 index 00000000000..d63027f8afd --- /dev/null +++ b/code/modules/organs/internal/kidneys.dm @@ -0,0 +1,25 @@ +/obj/item/organ/internal/kidneys + name = "kidneys" + icon_state = "kidneys" + gender = PLURAL + organ_tag = BP_KIDNEYS + parent_organ = BP_GROIN + robotic_name = "prosthetic kidneys" + robotic_sprite = "kidneys-prosthetic" + +/obj/item/organ/internal/kidneys/process() + + ..() + + if(!owner) + return + + // Coffee is really bad for you with busted kidneys. + // This should probably be expanded in some way, but fucked if I know + // what else kidneys can process in our reagent list. + var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list + if(coffee) + if(is_bruised()) + owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) + else if(is_broken()) + owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) \ No newline at end of file diff --git a/code/modules/organs/internal/liver.dm b/code/modules/organs/internal/liver.dm new file mode 100644 index 00000000000..5aaf767c93a --- /dev/null +++ b/code/modules/organs/internal/liver.dm @@ -0,0 +1,78 @@ +/obj/item/organ/internal/liver + name = "liver" + icon_state = "liver" + organ_tag = BP_LIVER + parent_organ = BP_GROIN + robotic_name = "toxin filter" + robotic_sprite = "liver-prosthetic" + var/tolerance = 5 + +/obj/item/organ/internal/liver/process() + + ..() + + if(!owner) + return + + if (germ_level > INFECTION_LEVEL_ONE) + if(prob(1)) + to_chat(owner, "Your skin itches.") + if (germ_level > INFECTION_LEVEL_TWO) + if(prob(1)) + spawn owner.delayed_vomit() + + if(owner.life_tick % PROCESS_ACCURACY == 0) + + //A liver's duty is to get rid of toxins + if(owner.getToxLoss() > 0 && owner.getToxLoss() <= tolerance) + owner.adjustToxLoss(-0.2) //there isn't a lot of toxin damage, so we're going to be chill and slowly filter it out + else if(owner.getToxLoss() > tolerance) + if(is_bruised()) + //damaged liver works less efficiently + owner.adjustToxLoss(-0.5) + if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present + src.damage += 0.1 * PROCESS_ACCURACY + else if(is_broken()) + //non-functioning liver ADDS toxins + owner.adjustToxLoss(-0.1) //roughly 33 minutes to kill someone straight out, stacks with 60+ tox proc tho + else + //functioning liver removes toxins at a cost + owner.adjustToxLoss(-1) + if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present + src.damage += 0.05 * PROCESS_ACCURACY + + + //High toxins levels are super dangerous + if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("anti_toxin")) + //Healthy liver suffers on its own + if (src.damage < min_broken_damage) + src.damage += 0.2 * PROCESS_ACCURACY + //Damaged one shares the fun + else + var/obj/item/organ/O = pick(owner.internal_organs) + if(O) + O.damage += 0.2 * PROCESS_ACCURACY + + //Detox can heal small amounts of damage + if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin")) + src.damage -= 0.2 * PROCESS_ACCURACY + + if(src.damage < 0) + src.damage = 0 + + var/filter_strength = INTOX_FILTER_HEALTHY + if(is_bruised()) + filter_strength = INTOX_FILTER_BRUISED + if(is_broken()) + filter_strength = INTOX_FILTER_DAMAGED + + if (owner.intoxication > 0) + owner.intoxication -= filter_strength*PROCESS_ACCURACY + owner.intoxication = max(owner.intoxication, 0) + if (!owner.intoxication) + owner.handle_intoxication() + + if(owner.chem_effects[CE_ALCOHOL_TOXIC]) + take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) + if(is_damaged()) + owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY) \ No newline at end of file diff --git a/code/modules/organs/internal/lungs.dm b/code/modules/organs/internal/lungs.dm new file mode 100644 index 00000000000..7629f998c5f --- /dev/null +++ b/code/modules/organs/internal/lungs.dm @@ -0,0 +1,33 @@ +/obj/item/organ/internal/lungs + name = "lungs" + icon_state = "lungs" + gender = PLURAL + organ_tag = BP_LUNGS + parent_organ = BP_CHEST + robotic_name = "gas exchange system" + robotic_sprite = "lungs-prosthetic" + var/rescued = FALSE // whether or not a collapsed lung has been rescued with a syringe + +/obj/item/organ/internal/lungs/process() + ..() + + if(!owner) + return + + if (germ_level > INFECTION_LEVEL_ONE) + if(prob(5)) + owner.emote("cough") //Respiratory tract infection + + if(is_broken() || (is_bruised() && !rescued)) // a thoracostomy can only help with a collapsed lung, not a mangled one + if(prob(2)) + spawn owner.emote("me", 1, "coughs up blood!") + owner.drip(10) + if(prob(4)) + spawn owner.emote("me", 1, "gasps for air!") + owner.losebreath += 15 + + if(is_bruised() && rescued) + if(prob(4)) + to_chat(owner, span("warning", "It feels hard to breathe...")) + if (owner.losebreath < 5) + owner.losebreath = min(owner.losebreath + 1, 5) // it's still not good, but it's much better than an untreated collapsed lung \ No newline at end of file diff --git a/code/modules/organs/misc.dm b/code/modules/organs/misc.dm index e5a1eabddad..97c01233a19 100644 --- a/code/modules/organs/misc.dm +++ b/code/modules/organs/misc.dm @@ -25,9 +25,9 @@ name = "cortical borer" icon = 'icons/obj/objects.dmi' icon_state = "borer" - organ_tag = "brain" + organ_tag = BP_BRAIN desc = "A disgusting space slug." - parent_organ = "head" + parent_organ = BP_HEAD vital = 1 /obj/item/organ/borer/removed(var/mob/living/user) @@ -47,7 +47,7 @@ name = "cortical stack" icon_state = "brain-prosthetic" organ_tag = "stack" - parent_organ = "head" + parent_organ = BP_HEAD robotic = 2 vital = 1 var/backup_time = 0 diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 619247f8d1c..3d08d05e052 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -3,38 +3,43 @@ icon = 'icons/obj/surgery.dmi' drop_sound = 'sound/items/drop/flesh.ogg' default_action_type = /datum/action/item_action/organ - var/dead_icon + germ_level = 0 + var/mob/living/carbon/human/owner = null + + //Organ stats. var/status = 0 var/vital //Lose a vital limb, die immediately. - var/damage = 0 // amount of damage to the organ - - var/min_bruised_damage = 10 - var/min_broken_damage = 30 - var/max_damage - var/organ_tag = "organ" - - var/parent_organ = "chest" - var/robotic = 0 //For being a robot var/rejecting // Is this organ already being rejected? - var/list/transplant_data - var/list/datum/autopsy_data/autopsy_data = list() - var/list/trace_chemicals = list() // traces of chemicals in the organ, - // links chemical IDs to number of ticks for which they'll stay in the blood - germ_level = 0 - var/datum/dna/dna - var/datum/species/species - var/emp_coeff = 1 //coefficient for damages taken by EMP, if the organ is robotic. + //Organ damage stats. + var/damage = 0 // amount of damage to the organ + var/min_broken_damage = 30 + var/min_bruised_damage = 10 // Damage before considered bruised + var/max_damage - var/force_skintone = FALSE // If true, icon generation will skip is-robotic checks. Used for synthskin limbs. - - var/list/organ_verbs //verb that are added when you gain the organ + //Strings. + var/organ_tag = "organ" + var/parent_organ = BP_CHEST + //Robot organ stuff. + var/robotic = 0 //For being a robot + var/robotize_type // If set, this organ type will automatically be roboticized with this manufacturer. var/robotic_name var/robotic_sprite - - var/robotize_type // If set, this organ type will automatically be roboticized with this manufacturer. + var/emp_coeff = 1 //coefficient for damages taken by EMP, if the organ is robotic. + + //Lists. + var/list/transplant_data + var/list/datum/autopsy_data/autopsy_data = list() + var/list/organ_verbs //verb that are added when you gain the organ + var/list/trace_chemicals = list() // traces of chemicals in the organ, + // links chemical IDs to number of ticks for which they'll stay in the blood + + //DNA stuff. + var/datum/dna/dna + var/datum/species/species + var/force_skintone = FALSE // If true, icon generation will skip is-robotic checks. Used for synthskin limbs. /obj/item/organ/New(loc, ...) ..() @@ -113,11 +118,24 @@ damage = max_damage status |= ORGAN_DEAD STOP_PROCESSING(SSprocessing, src) - if(dead_icon && !robotic) - icon_state = dead_icon if(owner && vital) owner.death() +/obj/item/organ/proc/is_damaged() + return damage > 1 + +/obj/item/organ/proc/is_bruised() + return damage >= min_bruised_damage + +/obj/item/organ/proc/bruise() + damage = max(damage, min_bruised_damage) + +/obj/item/organ/proc/can_feel_pain() + return (!BP_IS_ROBOTIC(src) && (!species || !(species.flags & NO_PAIN))) + +/obj/item/organ/proc/can_recover() + return (max_damage > 0) && !(status & ORGAN_DEAD) + /obj/item/organ/process() if(loc != owner) @@ -228,12 +246,6 @@ /obj/item/organ/proc/rejuvenate() damage = 0 -/obj/item/organ/proc/is_damaged() - return damage >= 1 // Not zero because honestly who gives a shit about 0.01 organ damage - -/obj/item/organ/proc/is_bruised() - return damage >= min_bruised_damage - /obj/item/organ/proc/is_broken() return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN)) @@ -276,9 +288,6 @@ if(parent && !silent) owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1) -/obj/item/organ/proc/bruise() - damage = max(damage, min_bruised_damage) - /obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc robotic = 2 src.status &= ~ORGAN_BROKEN @@ -383,7 +392,7 @@ robotize() owner.update_action_buttons() -/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target) +/obj/item/organ/internal/eyes/replaced(var/mob/living/carbon/human/target) // Apply our eye colour to the target. if(istype(target) && eye_colour) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index b2c36b70d9a..e1c2f89aa64 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -1153,6 +1153,19 @@ Note that amputating the affected organ does in fact remove the infection from t wound_descriptors[this_wound_desc] += W.amount else wound_descriptors[this_wound_desc] = W.amount + + if(open > 1) + var/bone = encased ? encased : "bone" + if(status & ORGAN_BROKEN) + bone = "broken [bone]" + wound_descriptors["[bone] exposed"] = 1 + + if(!encased || open > 1) + var/list/bits = list() + for(var/obj/item/organ/internal/organ in internal_organs) + bits += organ.get_visible_state() + if(bits.len) + wound_descriptors["[english_list(bits)] visible in the wounds"] = 1 if(wound_descriptors.len) var/list/flavor_text = list() diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 46f028e602c..51c5a4e4464 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -39,7 +39,7 @@ /obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human) ..() - var/obj/item/organ/eyes/eyes = owner.get_eyes() + var/obj/item/organ/internal/eyes/eyes = owner.get_eyes() if(eyes) eyes.update_colour() @@ -53,7 +53,7 @@ if(!owner || !owner.species) return if(owner.species.has_organ[owner.species.vision_organ]) - var/obj/item/organ/eyes/eyes = owner.get_eyes() + var/obj/item/organ/internal/eyes/eyes = owner.get_eyes() if(eyes && species.eyes) var/eyecolor if (eyes.eye_colour) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm deleted file mode 100644 index 82fda9a1607..00000000000 --- a/code/modules/organs/organ_internal.dm +++ /dev/null @@ -1,219 +0,0 @@ -#define PROCESS_ACCURACY 10 - -/**************************************************** - INTERNAL ORGANS DEFINES -****************************************************/ - - -// Brain is defined in brain_item.dm. -/obj/item/organ/heart - name = "heart" - icon_state = "heart-on" - organ_tag = "heart" - parent_organ = "chest" - dead_icon = "heart-off" - robotic_name = "circulatory pump" - robotic_sprite = "heart-prosthetic" - -/obj/item/organ/heart/process() - //Check if we're on lifesupport, and whether or not organs should be processing. - if(owner && owner.isonlifesupport()) - return 1 - else - return 0 - - -/obj/item/organ/lungs - name = "lungs" - icon_state = "lungs" - gender = PLURAL - organ_tag = "lungs" - parent_organ = "chest" - robotic_name = "gas exchange system" - robotic_sprite = "lungs-prosthetic" - var/rescued = FALSE // whether or not a collapsed lung has been rescued with a syringe - -/obj/item/organ/lungs/process() - ..() - - if(!owner) - return - - if (germ_level > INFECTION_LEVEL_ONE) - if(prob(5)) - owner.emote("cough") //Respiratory tract infection - - if(is_broken() || (is_bruised() && !rescued)) // a thoracostomy can only help with a collapsed lung, not a mangled one - if(prob(2)) - spawn owner.emote("me", 1, "coughs up blood!") - owner.drip(10) - if(prob(4)) - spawn owner.emote("me", 1, "gasps for air!") - owner.losebreath += 15 - - if(is_bruised() && rescued) - if(prob(4)) - to_chat(owner, span("warning", "It feels hard to breathe...")) - if (owner.losebreath < 5) - owner.losebreath = min(owner.losebreath + 1, 5) // it's still not good, but it's much better than an untreated collapsed lung - -/obj/item/organ/kidneys - name = "kidneys" - icon_state = "kidneys" - gender = PLURAL - organ_tag = "kidneys" - parent_organ = "groin" - robotic_name = "prosthetic kidneys" - robotic_sprite = "kidneys-prosthetic" - -/obj/item/organ/kidneys/process() - - ..() - - if(!owner) - return - - // Coffee is really bad for you with busted kidneys. - // This should probably be expanded in some way, but fucked if I know - // what else kidneys can process in our reagent list. - var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list - if(coffee) - if(is_bruised()) - owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) - else if(is_broken()) - owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) - -/obj/item/organ/eyes - name = "eyeballs" - icon_state = "eyes" - gender = PLURAL - organ_tag = "eyes" - parent_organ = "head" - robotic_name = "visual prosthesis" - robotic_sprite = "eyes-prosthetic" - var/list/eye_colour = list(0,0,0) - var/singular_name = "eye" - -/obj/item/organ/eyes/proc/update_colour() - if(!owner) - return - eye_colour = list( - owner.r_eyes ? owner.r_eyes : 0, - owner.g_eyes ? owner.g_eyes : 0, - owner.b_eyes ? owner.b_eyes : 0 - ) - -/obj/item/organ/eyes/take_damage(amount, var/silent=0) - var/oldbroken = is_broken() - ..() - if(is_broken() && !oldbroken && owner && !owner.stat) - to_chat(owner, "You go blind!") - -/obj/item/organ/eyes/proc/flash_act() - return - -/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var. - ..() - if(!owner) - return - if(is_bruised()) - owner.eye_blurry = 20 - if(is_broken()) - owner.eye_blind = 20 - -/obj/item/organ/liver - name = "liver" - icon_state = "liver" - organ_tag = "liver" - parent_organ = "groin" - robotic_name = "toxin filter" - robotic_sprite = "liver-prosthetic" - var/tolerance = 5 - -/obj/item/organ/liver/process() - - ..() - - if(!owner) - return - - if (germ_level > INFECTION_LEVEL_ONE) - if(prob(1)) - to_chat(owner, "Your skin itches.") - if (germ_level > INFECTION_LEVEL_TWO) - if(prob(1)) - spawn owner.delayed_vomit() - - if(owner.life_tick % PROCESS_ACCURACY == 0) - - //A liver's duty is to get rid of toxins - if(owner.getToxLoss() > 0 && owner.getToxLoss() <= tolerance) - owner.adjustToxLoss(-0.2) //there isn't a lot of toxin damage, so we're going to be chill and slowly filter it out - else if(owner.getToxLoss() > tolerance) - if(is_bruised()) - //damaged liver works less efficiently - owner.adjustToxLoss(-0.5) - if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present - src.damage += 0.1 * PROCESS_ACCURACY - else if(is_broken()) - //non-functioning liver ADDS toxins - owner.adjustToxLoss(-0.1) //roughly 33 minutes to kill someone straight out, stacks with 60+ tox proc tho - else - //functioning liver removes toxins at a cost - owner.adjustToxLoss(-1) - if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present - src.damage += 0.05 * PROCESS_ACCURACY - - - //High toxins levels are super dangerous - if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("anti_toxin")) - //Healthy liver suffers on its own - if (src.damage < min_broken_damage) - src.damage += 0.2 * PROCESS_ACCURACY - //Damaged one shares the fun - else - var/obj/item/organ/O = pick(owner.internal_organs) - if(O) - O.damage += 0.2 * PROCESS_ACCURACY - - //Detox can heal small amounts of damage - if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin")) - src.damage -= 0.2 * PROCESS_ACCURACY - - if(src.damage < 0) - src.damage = 0 - - var/filter_strength = INTOX_FILTER_HEALTHY - if(is_bruised()) - filter_strength = INTOX_FILTER_BRUISED - if(is_broken()) - filter_strength = INTOX_FILTER_DAMAGED - - if (owner.intoxication > 0) - owner.intoxication -= filter_strength*PROCESS_ACCURACY - owner.intoxication = max(owner.intoxication, 0) - if (!owner.intoxication) - owner.handle_intoxication() - - if(owner.chem_effects[CE_ALCOHOL_TOXIC]) - take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) - if(is_damaged()) - owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY) - -/obj/item/organ/appendix - name = "appendix" - icon_state = "appendix" - parent_organ = "groin" - organ_tag = "appendix" - -/obj/item/organ/appendix/removed() - if(owner) - var/inflamed = 0 - for(var/datum/disease/appendicitis/appendicitis in owner.viruses) - inflamed = 1 - appendicitis.cure() - owner.resistances += appendicitis - if(inflamed) - icon_state = "appendixinflamed" - name = "inflamed appendix" - ..() \ No newline at end of file diff --git a/code/modules/organs/subtypes/autakh.dm b/code/modules/organs/subtypes/autakh.dm index 57b057dcc07..fa275319b68 100644 --- a/code/modules/organs/subtypes/autakh.dm +++ b/code/modules/organs/subtypes/autakh.dm @@ -67,29 +67,29 @@ //internal organs -/obj/item/organ/kidneys/autakh +/obj/item/organ/internal/kidneys/autakh name = "toxin screen" icon_state = "screen" robotic = 1 robotic_name = null robotic_sprite = null -/obj/item/organ/kidneys/autakh/Initialize() +/obj/item/organ/internal/kidneys/autakh/Initialize() mechassist() . = ..() -/obj/item/organ/anchor +/obj/item/organ/internal/anchor name = "soul anchor" icon_state = "anchor" organ_tag = "anchor" - parent_organ = "head" + parent_organ = BP_HEAD robotic = 2 -/obj/item/organ/anchor/Initialize() +/obj/item/organ/internal/anchor/Initialize() robotize() . = ..() -/obj/item/organ/eyes/autakh +/obj/item/organ/internal/eyes/autakh name = "bionic eyeballs" icon_state = "mk1eyes" singular_name = "bionic eye" @@ -106,18 +106,18 @@ var/selected_hud = "Disabled" var/disabled = FALSE -/obj/item/organ/eyes/autakh/Initialize() +/obj/item/organ/internal/eyes/autakh/Initialize() robotize() . = ..() -/obj/item/organ/eyes/autakh/refresh_action_button() +/obj/item/organ/internal/eyes/autakh/refresh_action_button() . = ..() if(.) action.button_icon_state = "mk1eyes" if(action.button) action.button.UpdateIcon() -/obj/item/organ/eyes/autakh/attack_self(var/mob/user) +/obj/item/organ/internal/eyes/autakh/attack_self(var/mob/user) . = ..() if(.) @@ -140,7 +140,7 @@ selected_hud = choice -/obj/item/organ/eyes/autakh/process() +/obj/item/organ/internal/eyes/autakh/process() ..() if(!owner) @@ -160,7 +160,7 @@ if(allowed(owner)) process_med_hud(owner, 1) -/obj/item/organ/eyes/autakh/flash_act() +/obj/item/organ/internal/eyes/autakh/flash_act() if(owner) to_chat(owner, "Your [singular_name]'s retinal overlays are overloaded by the strong light!") owner.eye_blind = 5 @@ -171,13 +171,13 @@ addtimer(CALLBACK(src, .proc/rearm), 40 SECONDS) return -/obj/item/organ/eyes/autakh/emp_act(severity) +/obj/item/organ/internal/eyes/autakh/emp_act(severity) ..() disabled = TRUE selected_hud = "Disabled" addtimer(CALLBACK(src, .proc/rearm), 40 SECONDS) -/obj/item/organ/eyes/autakh/proc/rearm() +/obj/item/organ/internal/eyes/autakh/proc/rearm() if(!disabled) return disabled = FALSE @@ -185,26 +185,26 @@ if(owner) to_chat(owner, "\The [singular_name]'s retinal overlays clicks and shifts!") -/obj/item/organ/adrenal +/obj/item/organ/internal/adrenal name = "adrenal management system" icon_state = "ams" organ_tag = "adrenal" - parent_organ = "chest" + parent_organ = BP_CHEST robotic = 2 action_button_name = "Activate Adrenal Management System" -/obj/item/organ/adrenal/Initialize() +/obj/item/organ/internal/adrenal/Initialize() robotize() . = ..() -/obj/item/organ/adrenal/refresh_action_button() +/obj/item/organ/internal/adrenal/refresh_action_button() . = ..() if(.) action.button_icon_state = "ams" if(action.button) action.button.UpdateIcon() -/obj/item/organ/adrenal/attack_self(var/mob/user) +/obj/item/organ/internal/adrenal/attack_self(var/mob/user) . = ..() if(.) @@ -233,30 +233,30 @@ owner.reagents.add_reagent("paracetamol", 5) owner.reagents.add_reagent("inaprovaline", 5) -/obj/item/organ/haemodynamic +/obj/item/organ/internal/haemodynamic name = "haemodynamic control system" icon_state = "stabilizer" organ_tag = "haemodynamic" - parent_organ = "chest" + parent_organ = BP_CHEST robotic = 1 action_button_name = "Activate Haemodynamic Control System" -/obj/item/organ/haemodynamic/Initialize() +/obj/item/organ/internal/haemodynamic/Initialize() mechassist() . = ..() -/obj/item/organ/haemodynamic/Initialize() +/obj/item/organ/internal/haemodynamic/Initialize() robotize() . = ..() -/obj/item/organ/haemodynamic/refresh_action_button() +/obj/item/organ/internal/haemodynamic/refresh_action_button() . = ..() if(.) action.button_icon_state = "stabilizer" if(action.button) action.button.UpdateIcon() -/obj/item/organ/haemodynamic/attack_self(var/mob/user) +/obj/item/organ/internal/haemodynamic/attack_self(var/mob/user) . = ..() if(.) diff --git a/code/modules/organs/subtypes/diona.dm b/code/modules/organs/subtypes/diona.dm index 83fbe21383a..8423707955d 100644 --- a/code/modules/organs/subtypes/diona.dm +++ b/code/modules/organs/subtypes/diona.dm @@ -49,7 +49,7 @@ min_broken_damage = 50 w_class = 4 body_part = LOWER_TORSO - parent_organ = "chest" + parent_organ = BP_CHEST cannot_break = 1 dislocated = -1 joint = "structural ligament" @@ -63,7 +63,7 @@ min_broken_damage = 20 w_class = 3 body_part = ARM_LEFT - parent_organ = "chest" + parent_organ = BP_CHEST can_grasp = 1 cannot_break = 1 dislocated = -1 @@ -89,7 +89,7 @@ w_class = 3 body_part = LEG_LEFT icon_position = LEFT - parent_organ = "groin" + parent_organ = BP_GROIN can_stand = 1 cannot_break = 1 dislocated = -1 @@ -116,7 +116,7 @@ w_class = 2 body_part = FOOT_LEFT icon_position = LEFT - parent_organ = "l_leg" + parent_organ = BP_L_LEG can_stand = 1 cannot_break = 1 dislocated = -1 @@ -129,7 +129,7 @@ icon_name = "r_foot" body_part = FOOT_RIGHT icon_position = RIGHT - parent_organ = "r_leg" + parent_organ = BP_R_LEG joint = "right ankle" amputation_point = "right ankle" cannot_break = 1 @@ -145,7 +145,7 @@ min_broken_damage = 15 w_class = 2 body_part = HAND_LEFT - parent_organ = "l_arm" + parent_organ = BP_L_ARM can_grasp = 1 cannot_break = 1 dislocated = -1 @@ -157,7 +157,7 @@ limb_name = "r_hand" icon_name = "r_hand" body_part = HAND_RIGHT - parent_organ = "r_arm" + parent_organ = BP_R_ARM cannot_break = 1 dislocated = -1 joint = "structural ligament" @@ -166,12 +166,12 @@ /obj/item/organ/external/head/diona limb_name = "head" icon_name = "head" - name = "head" + name = BP_HEAD max_damage = 50 min_broken_damage = 25 w_class = 3 body_part = HEAD - parent_organ = "chest" + parent_organ = BP_CHEST cannot_break = 1 dislocated = -1 joint = "structural ligament" @@ -183,23 +183,23 @@ /obj/item/organ/diona/strata name = "neural strata" - parent_organ = "chest" + parent_organ = BP_CHEST organ_tag = "neural strata" /obj/item/organ/diona/bladder name = "gas bladder" - parent_organ = "head" + parent_organ = BP_HEAD organ_tag = "gas bladder" /obj/item/organ/diona/polyp name = "polyp segment" - parent_organ = "groin" + parent_organ = BP_GROIN organ_tag = "polyp segment" /obj/item/organ/diona/ligament name = "anchoring ligament" - parent_organ = "groin" + parent_organ = BP_GROIN organ_tag = "anchoring ligament" /obj/item/organ/diona @@ -223,7 +223,7 @@ // species (absorbing radiation and light respectively) /obj/item/organ/diona/nutrients name = "nutrient channel" - parent_organ = "chest" + parent_organ = BP_CHEST organ_tag = "nutrient channel" icon = 'icons/mob/npc/alien.dmi' icon_state = "claw" @@ -233,7 +233,7 @@ /obj/item/organ/diona/node name = "response node" - parent_organ = "head" + parent_organ = BP_HEAD organ_tag = "response node" icon = 'icons/mob/npc/alien.dmi' icon_state = "claw" diff --git a/code/modules/organs/subtypes/machine.dm b/code/modules/organs/subtypes/machine.dm index 48a144c7575..b61db9424a8 100644 --- a/code/modules/organs/subtypes/machine.dm +++ b/code/modules/organs/subtypes/machine.dm @@ -63,7 +63,7 @@ icon = 'icons/obj/power.dmi' icon_state = "scell" organ_tag = "cell" - parent_organ = "chest" + parent_organ = BP_CHEST vital = 1 var/emp_counter = 0 @@ -89,7 +89,7 @@ icon = 'icons/obj/robot_component.dmi' icon_state = "surge_ipc" organ_tag = "surge" - parent_organ = "chest" + parent_organ = BP_CHEST vital = 0 var/surge_left = 0 var/broken = 0 @@ -122,7 +122,7 @@ surge_left += 1 stage_interval += 250 -/obj/item/organ/eyes/optical_sensor +/obj/item/organ/internal/eyes/optical_sensor name = "optical sensor" singular_name = "optical sensor" organ_tag = "optics" @@ -130,27 +130,27 @@ icon_state = "camera" dead_icon = "camera_broken" -/obj/item/organ/eyes/optical_sensor/Initialize() +/obj/item/organ/internal/eyes/optical_sensor/Initialize() robotize() . = ..() -/obj/item/organ/ipc_tag +/obj/item/organ/internal/ipc_tag name = "identification tag" organ_tag = "ipc tag" - parent_organ = "head" + parent_organ = BP_HEAD icon = 'icons/obj/telescience.dmi' icon_state = "gps-c" dead_icon = "gps-c" -/obj/item/organ/ipc_tag/Initialize() +/obj/item/organ/internal/ipc_tag/Initialize() robotize() . = ..() // Used for an MMI or posibrain being installed into a human. /obj/item/organ/mmi_holder name = "brain" - organ_tag = "brain" - parent_organ = "head" + organ_tag = BP_BRAIN + parent_organ = BP_HEAD vital = 1 var/obj/item/device/mmi/stored_mmi @@ -197,16 +197,16 @@ ////////////// /obj/item/organ/mmi_holder/posibrain/terminator - name = "brain" - organ_tag = "brain" - parent_organ = "chest" + name = BP_BRAIN + organ_tag = BP_BRAIN + parent_organ = BP_CHEST vital = 1 emp_coeff = 0.1 /obj/item/organ/data name = "data core" organ_tag = "data core" - parent_organ = "groin" + parent_organ = BP_GROIN icon = 'icons/obj/cloning.dmi' icon_state = "harddisk" vital = 0 @@ -222,7 +222,7 @@ icon = 'icons/obj/power.dmi' icon_state = "scell" organ_tag = "shielded cell" - parent_organ = "chest" + parent_organ = BP_CHEST vital = 1 emp_coeff = 0.1 @@ -237,7 +237,7 @@ emp_coeff = 0.5 robotize_type = PROSTHETIC_HK -/obj/item/organ/eyes/optical_sensor/terminator +/obj/item/organ/internal/eyes/optical_sensor/terminator emp_coeff = 0.5 /obj/item/organ/external/chest/terminator diff --git a/code/modules/organs/subtypes/parasite.dm b/code/modules/organs/subtypes/parasite.dm index 7fdbe5222a0..bc2b2135f22 100644 --- a/code/modules/organs/subtypes/parasite.dm +++ b/code/modules/organs/subtypes/parasite.dm @@ -1,4 +1,4 @@ -/obj/item/organ/parasite +/obj/item/organ/internal/parasite name = "parasite" icon = 'icons/mob/npc/alien.dmi' icon_state = "burst_lie" @@ -11,7 +11,7 @@ var/stage_interval = 600 //time between stages, in seconds var/subtle = 0 //will the body reject the parasite naturally? -/obj/item/organ/parasite/process() +/obj/item/organ/internal/parasite/process() ..() if(!owner) @@ -24,7 +24,7 @@ stage = min(stage+1,max_stage) stage_effect() -/obj/item/organ/parasite/handle_rejection() +/obj/item/organ/internal/parasite/handle_rejection() if(subtle) return ..() else @@ -32,14 +32,14 @@ rejecting = 0 return -/obj/item/organ/parasite/proc/stage_effect() +/obj/item/organ/internal/parasite/proc/stage_effect() return /////////////////// ///K'ois Mycosis/// /////////////////// -/obj/item/organ/parasite/kois +/obj/item/organ/internal/parasite/kois name = "k'ois mycosis" icon = 'icons/obj/surgery.dmi' icon_state = "kois-on" @@ -47,12 +47,12 @@ organ_tag = "kois" - parent_organ = "chest" + parent_organ = BP_CHEST stage_interval = 150 origin_tech = list(TECH_BIO = 3) -/obj/item/organ/parasite/kois/process() +/obj/item/organ/internal/parasite/kois/process() ..() if (!owner) @@ -108,7 +108,7 @@ ///Black Mycosis/// /////////////////// -/obj/item/organ/parasite/blackkois +/obj/item/organ/internal/parasite/blackkois name = "k'ois mycosis" icon = 'icons/obj/surgery.dmi' icon_state = "black-on" @@ -117,12 +117,12 @@ organ_tag = "blackkois" - parent_organ = "head" + parent_organ = BP_HEAD var/removed_langs = 0 stage_interval = 150 origin_tech = list(TECH_BIO = 7) -/obj/item/organ/parasite/blackkois/process() +/obj/item/organ/internal/parasite/blackkois/process() ..() if(prob(10) && (owner.can_feel_pain())) @@ -161,7 +161,7 @@ if(stage >= 4) - var/obj/item/organ/brain/B = owner.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/B = owner.internal_organs_by_name[BP_BRAIN] if(B && !B.lobotomized) to_chat(owner, "As the K'ois consumes your mind, you feel your past self, your memories, your very being slip away... only slavery to the swarm remains...") @@ -202,14 +202,14 @@ owner.drip(15) owner.delayed_vomit() -/obj/item/organ/parasite/blackkois/removed(var/mob/living/carbon/human/target) +/obj/item/organ/internal/parasite/blackkois/removed(var/mob/living/carbon/human/target) if(all_languages[LANGUAGE_VAURCA] in target.languages && stage >= 3 && !isvaurca(target)) target.remove_language(LANGUAGE_VAURCA) to_chat(target, "Your mind suddenly grows dark as the unity of the Hive is torn from you.") removed_langs = 0 ..() -/obj/item/organ/parasite/zombie +/obj/item/organ/internal/parasite/zombie name = "black tumor" icon = 'icons/obj/surgery.dmi' icon_state = "blacktumor" @@ -217,10 +217,10 @@ organ_tag = "zombie" - parent_organ = "chest" + parent_organ = BP_CHEST stage_interval = 150 -/obj/item/organ/parasite/zombie/process() +/obj/item/organ/internal/parasite/zombie/process() ..() if (!owner) diff --git a/code/modules/organs/subtypes/skrell.dm b/code/modules/organs/subtypes/skrell.dm index ef3dd8b9c81..e2edca8c0cb 100644 --- a/code/modules/organs/subtypes/skrell.dm +++ b/code/modules/organs/subtypes/skrell.dm @@ -1,18 +1,18 @@ -/obj/item/organ/heart/skrell +/obj/item/organ/internal/heart/skrell icon_state = "skrell_heart-on" dead_icon = "skrell_heart-off" -/obj/item/organ/lungs/skrell +/obj/item/organ/internal/lungs/skrell icon_state = "lungs_skrell" -/obj/item/organ/kidneys/skrell +/obj/item/organ/internal/kidneys/skrell icon_state = "kidney_skrell" -/obj/item/organ/eyes/skrell +/obj/item/organ/internal/eyes/skrell icon_state = "eyes_skrell" -/obj/item/organ/liver/skrell +/obj/item/organ/internal/liver/skrell icon_state = "liver_skrell" -/obj/item/organ/brain/skrell +/obj/item/organ/internal/brain/skrell icon_state = "brain_skrell" diff --git a/code/modules/organs/subtypes/standard.dm b/code/modules/organs/subtypes/standard.dm index 6fafc42a175..99a98bdbffa 100644 --- a/code/modules/organs/subtypes/standard.dm +++ b/code/modules/organs/subtypes/standard.dm @@ -29,7 +29,7 @@ w_class = 4 body_part = LOWER_TORSO vital = 1 - parent_organ = "chest" + parent_organ = BP_CHEST amputation_point = "lumbar" joint = "hip" dislocated = -1 @@ -44,7 +44,7 @@ min_broken_damage = 30 w_class = 3 body_part = ARM_LEFT - parent_organ = "chest" + parent_organ = BP_CHEST joint = "left elbow" amputation_point = "left shoulder" can_grasp = 1 @@ -66,7 +66,7 @@ w_class = 3 body_part = LEG_LEFT icon_position = LEFT - parent_organ = "groin" + parent_organ = BP_GROIN joint = "left knee" amputation_point = "left hip" can_stand = 1 @@ -89,7 +89,7 @@ w_class = 2 body_part = FOOT_LEFT icon_position = LEFT - parent_organ = "l_leg" + parent_organ = BP_L_LEG joint = "left ankle" amputation_point = "left ankle" can_stand = 1 @@ -106,7 +106,7 @@ icon_name = "r_foot" body_part = FOOT_RIGHT icon_position = RIGHT - parent_organ = "r_leg" + parent_organ = BP_R_LEG joint = "right ankle" amputation_point = "right ankle" @@ -118,7 +118,7 @@ min_broken_damage = 15 w_class = 2 body_part = HAND_LEFT - parent_organ = "l_arm" + parent_organ = BP_L_ARM joint = "left wrist" amputation_point = "left wrist" can_grasp = 1 @@ -137,20 +137,20 @@ name = "right hand" icon_name = "r_hand" body_part = HAND_RIGHT - parent_organ = "r_arm" + parent_organ = BP_R_ARM joint = "right wrist" amputation_point = "right wrist" /obj/item/organ/external/head limb_name = "head" icon_name = "head" - name = "head" + name = BP_HEAD max_damage = 75 min_broken_damage = 35 w_class = 3 body_part = HEAD | FACE vital = 1 - parent_organ = "chest" + parent_organ = BP_CHEST joint = "jaw" amputation_point = "neck" gendered_icon = 1 diff --git a/code/modules/organs/subtypes/vaurca.dm b/code/modules/organs/subtypes/vaurca.dm index 4539228b4bd..57927155ad7 100644 --- a/code/modules/organs/subtypes/vaurca.dm +++ b/code/modules/organs/subtypes/vaurca.dm @@ -1,27 +1,27 @@ -/obj/item/organ/heart/left +/obj/item/organ/internal/heart/left name = "heart" icon_state = "vaurca_heart_l-on" organ_tag = "left heart" - parent_organ = "chest" + parent_organ = BP_CHEST dead_icon = "vaurca_heart_l-off" -/obj/item/organ/heart/right +/obj/item/organ/internal/heart/right name = "heart" icon_state = "vaurca_heart_r-on" organ_tag = "right heart" - parent_organ = "chest" + parent_organ = BP_CHEST dead_icon = "vaurca_heart_r-off" -/obj/item/organ/lungs/vaurca +/obj/item/organ/internal/lungs/vaurca icon_state = "lungs_vaurca" -/obj/item/organ/kidneys/vaurca +/obj/item/organ/internal/kidneys/vaurca icon_state = "kidney_vaurca" -/obj/item/organ/eyes/vaurca +/obj/item/organ/internal/eyes/vaurca icon_state = "eyes_vaurca" -/obj/item/organ/eyes/vaurca/flash_act() +/obj/item/organ/internal/eyes/vaurca/flash_act() if(!owner) return @@ -41,14 +41,14 @@ owner.disabilities |= NEARSIGHTED addtimer(CALLBACK(owner, /mob/.proc/reset_nearsighted), 100) -/obj/item/organ/kidneys/vaurca/robo +/obj/item/organ/internal/kidneys/vaurca/robo icon_state = "kidney_vaurca" organ_tag = "mechanical kidneys" robotic = 2 robotic_name = null robotic_sprite = null -/obj/item/organ/liver/vaurca/robo +/obj/item/organ/internal/liver/vaurca/robo icon_state = "liver_vaurca" organ_tag = "mechanical liver" robotic = 2 @@ -56,24 +56,24 @@ robotic_sprite = null tolerance = 20 -/obj/item/organ/liver/vaurca +/obj/item/organ/internal/liver/vaurca icon_state = "liver_vaurca" tolerance = 20 -/obj/item/organ/brain/vaurca +/obj/item/organ/internal/brain/vaurca icon_state = "brain_vaurca" /obj/item/organ/vaurca/reservoir name = "phoron reservoir" organ_tag = "phoron reservoir" - parent_organ = "chest" + parent_organ = BP_CHEST icon_state = "phoron_reservoir" robotic = 1 /obj/item/organ/vaurca/filtrationbit name = "filtration bit" organ_tag = "filtration bit" - parent_organ = "head" + parent_organ = BP_HEAD icon_state = "filter" robotic = 2 @@ -81,7 +81,7 @@ name = "neural socket" organ_tag = "neural socket" icon_state = "neural_socket" - parent_organ = "head" + parent_organ = BP_HEAD robotic = 2 obj/item/organ/vaurca/neuralsocket/process() @@ -110,7 +110,7 @@ obj/item/organ/vaurca/neuralsocket/process() /obj/item/organ/vaurca/preserve name = "phoron reserve tank" organ_tag = "phoron reserve tank" - parent_organ = "chest" + parent_organ = BP_CHEST icon_state = "breathing_app" robotic = 1 var/datum/gas_mixture/air_contents = null diff --git a/code/modules/organs/subtypes/xenos.dm b/code/modules/organs/subtypes/xenos.dm index 9e65c22cfdb..e88510dde54 100644 --- a/code/modules/organs/subtypes/xenos.dm +++ b/code/modules/organs/subtypes/xenos.dm @@ -37,22 +37,22 @@ //vox organs -/obj/item/organ/heart/vox +/obj/item/organ/internal/heart/vox icon_state = "vox_heart" dead_icon = "vox_heart" -/obj/item/organ/lungs/vox +/obj/item/organ/internal/lungs/vox name = "air capillary sack" icon_state = "vox_lung" -/obj/item/organ/kidneys/vox +/obj/item/organ/internal/kidneys/vox name = "filtration bladder" icon_state = "lungs" color = "#99ccff" - parent_organ = "chest" + parent_organ = BP_CHEST -/obj/item/organ/liver/vox +/obj/item/organ/internal/liver/vox name = "waste tract" - parent_organ = "chest" + parent_organ = BP_CHEST color = "#0033cc" tolerance = 20 diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index a8e1960eb25..4a677d9e538 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -25,10 +25,10 @@ if(!M.restrained() && !M.stat) switch(over_object.name) - if("r_hand") + if(BP_R_HAND) M.u_equip(src) M.put_in_r_hand(src) - if("l_hand") + if(BP_L_HAND) M.u_equip(src) M.put_in_l_hand(src) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 42e55d26e58..c06dfddc4a7 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -171,7 +171,7 @@ show_content(user) /obj/item/paper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob, var/target_zone) - if(target_zone == "eyes") + if(target_zone == BP_EYES) user.visible_message("You show the paper to [M]. ", \ " [user] holds up a paper and shows it to [M]. ") M.examinate(src) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 997a1bcfbfa..5e1b15de828 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -17,10 +17,10 @@ if(!istype(usr, /mob/living/carbon/slime) && !istype(usr, /mob/living/simple_animal)) if( !usr.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] + var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND] if (H.hand) - temp = H.organs_by_name["l_hand"] + temp = H.organs_by_name[BP_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return @@ -33,9 +33,9 @@ /obj/item/paper_bin/attack_hand(mob/user as mob) if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] + var/obj/item/organ/external/temp = H.organs_by_name[BP_R_HAND] if (H.hand) - temp = H.organs_by_name["l_hand"] + temp = H.organs_by_name[BP_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 784b13733da..b99332810d6 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -194,9 +194,9 @@ var/chem_volume = 10 //crayon dust var/dust = "crayon_dust" - New() - name = "[colourName] crayon" - ..() +/obj/item/pen/crayon/New() + name = "[colourName] crayon" + ..() /obj/item/pen/crayon/Initialize() . = ..() diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 14fbc15431a..0e3cbdb57b2 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -93,10 +93,10 @@ var/global/photo_count = 0 playsound(loc, "rustle", 50, 1, -5) if((!( M.restrained() ) && !( M.stat ) && M.back == src)) switch(over_object.name) - if("r_hand") + if(BP_R_HAND) M.u_equip(src) M.put_in_r_hand(src) - if("l_hand") + if(BP_L_HAND) M.u_equip(src) M.put_in_l_hand(src) add_fingerprint(usr) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 7b3f7ff5e98..fb457949cc4 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -1064,7 +1064,7 @@ obj/structure/cable/proc/cableColor(var/colorC) if (ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) if(!affecting) to_chat(user, "They don't have a head.") return diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 36aae5079ea..214cba92d90 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -387,9 +387,9 @@ var/touchy_hand if(contact_zone == "hand") if(M.hand) - touchy_hand = "r_hand" + touchy_hand = BP_R_HAND else - touchy_hand = "l_hand" + touchy_hand = BP_L_HAND if(!touchy_hand) drained_hp = M.electrocute_act(shock_damage, source, siemens_coeff, ground_zero = contact_zone) //zzzzzzap! else diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index bba6566d1f3..0b40dc75582 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -150,7 +150,7 @@ if((M.is_clumsy()) && prob(40)) //Clumsy handling var/obj/P = consume_next_projectile() if(P) - if(process_projectile(P, user, user, pick("l_foot", "r_foot"))) + if(process_projectile(P, user, user, pick(BP_L_FOOT, BP_R_FOOT))) handle_post_fire(user, user) user.visible_message( "\The [user] shoots \himself in the foot with \the [src]!", @@ -503,7 +503,7 @@ user.apply_effect(110,AGONY,0) else log_and_message_admins("[key_name(user)] commited suicide using \a [src]") - user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) + user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, BP_HEAD, used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) user.death() qdel(in_chamber) mouthshoot = 0 diff --git a/code/modules/projectiles/guns/energy/lawgiver.dm b/code/modules/projectiles/guns/energy/lawgiver.dm index 2361ebef235..3c9d626b3e2 100644 --- a/code/modules/projectiles/guns/energy/lawgiver.dm +++ b/code/modules/projectiles/guns/energy/lawgiver.dm @@ -137,8 +137,8 @@ if(istype(user, /mob/living/carbon/human)) //Save the users active hand var/mob/living/carbon/human/H = user - var/obj/item/organ/external/LA = H.get_organ("l_arm") - var/obj/item/organ/external/RA = H.get_organ("r_arm") + var/obj/item/organ/external/LA = H.get_organ(BP_L_ARM) + var/obj/item/organ/external/RA = H.get_organ(BP_R_ARM) var/active_hand = H.hand playsound(user, 'sound/weapons/lawgiver_idfail.ogg', 40, 1) to_chat(user, "You hear a soft beep from the gun and 'ID FAIL' flashes across the screen.") diff --git a/code/modules/projectiles/guns/energy/magic.dm b/code/modules/projectiles/guns/energy/magic.dm index 78e551f1cbf..e18ea3fdcf6 100644 --- a/code/modules/projectiles/guns/energy/magic.dm +++ b/code/modules/projectiles/guns/energy/magic.dm @@ -37,10 +37,10 @@ obj/item/gun/energy/staff/special_check(var/mob/living/user) continue H.drop_from_inventory(W) playsound(user, 'sound/weapons/emitter.ogg', 40, 1) - var/obj/item/organ/external/LA = H.get_organ("l_arm") - var/obj/item/organ/external/RA = H.get_organ("r_arm") - var/obj/item/organ/external/LL = H.get_organ("l_leg") - var/obj/item/organ/external/RL = H.get_organ("r_leg") + var/obj/item/organ/external/LA = H.get_organ(BP_L_ARM) + var/obj/item/organ/external/RA = H.get_organ(BP_R_ARM) + var/obj/item/organ/external/LL = H.get_organ(BP_L_LEG) + var/obj/item/organ/external/RL = H.get_organ(BP_R_LEG) LA.droplimb(0,DROPLIMB_BLUNT) RA.droplimb(0,DROPLIMB_BLUNT) LL.droplimb(0,DROPLIMB_BLUNT) @@ -80,8 +80,8 @@ obj/item/gun/energy/staff/animate/special_check(var/mob/living/user) if(istype(user, /mob/living/carbon/human)) //Save the users active hand var/mob/living/carbon/human/H = user - var/obj/item/organ/external/LA = H.get_organ("l_hand") - var/obj/item/organ/external/RA = H.get_organ("r_hand") + var/obj/item/organ/external/LA = H.get_organ(BP_L_HAND) + var/obj/item/organ/external/RA = H.get_organ(BP_R_HAND) var/active_hand = H.hand playsound(user, 'sound/effects/blobattack.ogg', 40, 1) user.visible_message(" With a sickening crunch, [user]'s hand rips itself off, and begins crawling away!") @@ -116,8 +116,8 @@ obj/item/gun/energy/staff/focus/special_check(var/mob/living/user) if(istype(user, /mob/living/carbon/human)) //Save the users active hand var/mob/living/carbon/human/H = user - var/obj/item/organ/external/LA = H.get_organ("l_arm") - var/obj/item/organ/external/RA = H.get_organ("r_arm") + var/obj/item/organ/external/LA = H.get_organ(BP_L_ARM) + var/obj/item/organ/external/RA = H.get_organ(BP_R_ARM) var/active_hand = H.hand playsound(user, 'sound/magic/lightningbolt.ogg', 40, 1) to_chat(user, "Coruscating waves of energy wreathe around your arm...hot...so hot!") @@ -168,7 +168,7 @@ obj/item/gun/energy/staff/focus/attack_self(mob/living/user as mob) if(istype(user, /mob/living/carbon/human)) var/obj/P = consume_next_projectile() if(P) - if(process_projectile(P, user, user, pick("head", "chest"))) + if(process_projectile(P, user, user, pick(BP_HEAD, BP_CHEST))) handle_post_fire(user, user) user.visible_message("\The [src] backfires!") user.drop_item() @@ -284,7 +284,7 @@ obj/item/gun/energy/staff/focus/attack_self(mob/living/user as mob) if(!user.is_wizard()) if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user - var/obj/item/organ/O = H.internal_organs_by_name[pick(H.species.vision_organ || "eyes","appendix","kidneys","liver", "heart", "lungs", "brain")] + var/obj/item/organ/O = H.internal_organs_by_name[pick(H.species.vision_organ || BP_EYES,"appendix",BP_KIDNEYS,BP_LIVER, BP_HEART, BP_LUNGS, BP_BRAIN)] if(O == null) to_chat(user, "You can't make any sense of the arcane glyphs... maybe you should try again.") else @@ -321,7 +321,7 @@ obj/item/gun/energy/staff/focus/attack_self(mob/living/user as mob) if(istype(user, /mob/living/carbon/human)) var/mob/living/carbon/human/H = user H.visible_message("\The [src] escapes from [H]'s hand, hitting their face and shattering into pieces!") - H.apply_damage(35, BRUTE, "head", 0, sharp=0, edge=0) + H.apply_damage(35, BRUTE, BP_HEAD, 0, sharp=0, edge=0) H.adjustBrainLoss(50, 55) H.sdisabilities += CLUMSY H.drop_item() diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 1a4cade761d..68bcc1dbf5d 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -72,7 +72,7 @@ Firing pins as a rule can't be removed without replacing them, blame a really sh user.show_message("SELF-DESTRUCTING...
", 1) visible_message("\The [gun] explodes!") playsound(user, 'sound/weapons/lawgiver_idfail.ogg', 40, 1) - var/obj/item/organ/external/E = user.organs_by_name[user.hand ? "l_hand" : "r_hand"] + var/obj/item/organ/external/E = user.organs_by_name[user.hand ? BP_L_HAND : BP_R_HAND] E.droplimb(0,DROPLIMB_BLUNT) explosion(get_turf(gun), -1, 0, 2, 3) if(gun) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 68e5bca1461..b873a5f4b39 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -235,9 +235,9 @@ L.emote("yawns") if(blocked < 20) if(L.reagents) L.reagents.add_reagent("stoxin", 10) - if(def_zone == "head" && blocked < 100) + if(def_zone == BP_HEAD && blocked < 100) if(L.reagents) L.reagents.add_reagent("stoxin", 15) - if(def_zone != "torso" && def_zone != "head") + if(def_zone != "torso" && def_zone != BP_HEAD) if(blocked < 100 && !(blocked < 20)) L.emote("yawns") if(blocked < 20) diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index a9b5f87a405..9dbe20cbe40 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -132,7 +132,7 @@ if(M.stat == DEAD) M.gib() else - M.apply_damage(60, BRUTE, "head") + M.apply_damage(60, BRUTE, BP_HEAD) playsound(src, 'sound/magic/LightningShock.ogg', 75, 1) else if(isturf(a) || isobj(a)) var/atom/A = a diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index d318226ae35..38e9b7810c2 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -645,7 +645,7 @@ var/mob/living/carbon/human/M = user if(M.h_style == "Floorlength Braid" || M.h_style == "Very Long Hair") if(prob(10)) - M.apply_damage(30, BRUTE, "head") + M.apply_damage(30, BRUTE, BP_HEAD) M.apply_damage(45, HALLOSS) M.visible_message("[user]'s hair catches in the [src]!", "Your hair gets caught in the [src]!") M.say("*scream") @@ -792,7 +792,7 @@ return if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis) user.visible_message("[user] feeds the [target]'s hair into the [src] and flicks it on!", "You turn the [src] on!") - target.apply_damage(30, BRUTE, "head") + target.apply_damage(30, BRUTE, BP_HEAD) target.apply_damage(25, HALLOSS) target.say("*scream") @@ -807,7 +807,7 @@ return if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis) user.visible_message("[user] starts tugging on [target]'s head as the [src] keeps running!", "You start tugging on [target]'s head!") - target.apply_damage(25, BRUTE, "head") + target.apply_damage(25, BRUTE, BP_HEAD) target.apply_damage(10, HALLOSS) target.say("*scream") spawn(10) diff --git a/code/modules/reagents/Chemistry-Reagents-Helpers.dm b/code/modules/reagents/Chemistry-Reagents-Helpers.dm index fda9c0017c2..303940bd700 100644 --- a/code/modules/reagents/Chemistry-Reagents-Helpers.dm +++ b/code/modules/reagents/Chemistry-Reagents-Helpers.dm @@ -11,4 +11,4 @@ return is_open_container() && ..() /mob/living/can_be_injected_by(var/atom/injector) - return ..() && (can_inject(null, 0, "chest") || can_inject(null, 0, "groin")) + return ..() && (can_inject(null, 0, BP_CHEST) || can_inject(null, 0, BP_GROIN)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index d29712e20b1..40df42a8d87 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -187,7 +187,7 @@ /datum/reagent/alcohol/ethanol/affect_ingest(var/mob/living/carbon/human/M, var/alien, var/removed) if(!istype(M)) return - var/obj/item/organ/parasite/P = M.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3))//Vaurca are damaged instead of getting nutrients, but they can still get drunk M.adjustToxLoss(1.5 * removed * (strength / 100)) else @@ -241,7 +241,7 @@ /datum/reagent/alcohol/butanol/affect_ingest(var/mob/living/carbon/human/M, var/alien, var/removed) if(!istype(M)) return - var/obj/item/organ/parasite/P = M.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) M.adjustToxLoss(removed * (strength / 100)) else @@ -280,7 +280,7 @@ /datum/reagent/hydrazine/affect_breathe(var/mob/living/carbon/human/H, var/alien, var/removed) . = ..() if(istype(H)) - var/obj/item/organ/L = H.internal_organs_by_name["lungs"] + var/obj/item/organ/L = H.internal_organs_by_name[BP_LUNGS] if(istype(L)) L.take_damage(removed * 0.5) @@ -417,7 +417,7 @@ /datum/reagent/acid/affect_breathe(var/mob/living/carbon/human/H, var/alien, var/removed) . = ..() if(istype(H)) - var/obj/item/organ/L = H.internal_organs_by_name["lungs"] + var/obj/item/organ/L = H.internal_organs_by_name[BP_LUNGS] if(istype(L)) L.take_damage(removed * power * 0.5) @@ -470,7 +470,7 @@ if(!M.unacidable && removed > 0) if(istype(M, /mob/living/carbon/human) && volume >= meltdose) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) if(affecting) if(affecting.take_damage(0, removed * power * 0.1)) H.UpdateDamageIcon() diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm index a420d32114e..009c021b348 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm @@ -205,7 +205,7 @@ M.make_jittery(special_counter) if(prob(special_counter)) M.emote("twitch") - var/obj/item/organ/H = M.internal_organs_by_name["heart"] + var/obj/item/organ/H = M.internal_organs_by_name[BP_HEART] H.take_damage(special_counter * removed * 0.025) /datum/reagent/guwan_painkillers @@ -314,7 +314,7 @@ H.drop_r_hand() if(robo) H.add_chemical_effect(CE_PAINKILLER, 80) // equivalent to tramadol - var/obj/item/organ/eyes/eyes = H.internal_organs_by_name[H.species.vision_organ || "eyes"] + var/obj/item/organ/internal/eyes/eyes = H.internal_organs_by_name[H.species.vision_organ || BP_EYES] if(eyes.status & ORGAN_ROBOT) M.hallucination = max(M.hallucination, 40) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index bfb5234804d..a3a54136d91 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -15,7 +15,7 @@ /datum/reagent/kois/affect_ingest(var/mob/living/carbon/human/M, var/alien, var/removed) if(!ishuman(M)) return - var/obj/item/organ/parasite/P = M.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) M.heal_organ_damage(1.2 * removed, 1.2 * removed) M.adjustToxLoss(-1.2 * removed) @@ -30,19 +30,19 @@ infect(M, alien, removed) /datum/reagent/kois/proc/infect(var/mob/living/carbon/human/H, var/alien, var/removed) - var/obj/item/organ/parasite/P = H.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = H.internal_organs_by_name["blackkois"] if((alien != IS_VAURCA) || (istype(P) && P.stage >= 3)) H.adjustToxLoss(1 * removed) switch(kois_type) if(1) //Normal if(!H.internal_organs_by_name["kois"] && prob(5*removed)) - var/obj/item/organ/external/affected = H.get_organ("chest") - var/obj/item/organ/parasite/kois/infest = new() + var/obj/item/organ/external/affected = H.get_organ(BP_CHEST) + var/obj/item/organ/internal/parasite/kois/infest = new() infest.replaced(H, affected) if(2) //Modified if(!H.internal_organs_by_name["blackkois"] && prob(10*removed)) - var/obj/item/organ/external/affected = H.get_organ("head") - var/obj/item/organ/parasite/blackkois/infest = new() + var/obj/item/organ/external/affected = H.get_organ(BP_HEAD) + var/obj/item/organ/internal/parasite/blackkois/infest = new() infest.replaced(H, affected) /datum/reagent/kois/clean @@ -119,7 +119,7 @@ /datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/human/M, var/alien, var/removed) if(!istype(M)) return - var/obj/item/organ/parasite/P = M.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) M.adjustToxLoss(1.5 * removed) else if(alien != IS_UNATHI) @@ -635,7 +635,7 @@ no_pain = 1 // Robo-eyes are immune to pepperspray now. Wee. - var/obj/item/organ/eyes/E = H.get_eyes() + var/obj/item/organ/internal/eyes/E = H.get_eyes() if (istype(E) && (E.status & (ORGAN_ROBOT|ORGAN_ADV_ROBOT))) eyes_covered |= EYES_MECH else @@ -3238,7 +3238,7 @@ if(dose > 60 && prob(5)) var/mob/living/carbon/human/H = M - var/obj/item/organ/heart/L = H.internal_organs_by_name["heart"] + var/obj/item/organ/internal/heart/L = H.internal_organs_by_name[BP_HEART] if (L && istype(L)) if(dose < 120) L.take_damage(10 * removed, 0) @@ -4584,7 +4584,7 @@ if(!istype(M)) return - var/obj/item/organ/parasite/P = M.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) M.add_chemical_effect(CE_SPEEDBOOST, 1) M.add_chemical_effect(CE_BLOODRESTORE, 2 * removed) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 85b22da18df..87cd00cb10b 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -76,7 +76,7 @@ /datum/reagent/epinephrine/overdose(var/mob/living/carbon/human/H, var/alien, removed ) if(istype(H)) - var/obj/item/organ/F = H.internal_organs_by_name["heart"] + var/obj/item/organ/F = H.internal_organs_by_name[BP_HEART] if(istype(F)) F.take_damage(-removed*0.1) H.make_jittery(removed*10) @@ -433,7 +433,7 @@ M.eye_blind = max(M.eye_blind - 5 * removed, 0) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/eyes/E = H.get_eyes(no_synthetic = TRUE) + var/obj/item/organ/internal/eyes/E = H.get_eyes(no_synthetic = TRUE) if(E && istype(E)) if(E.damage > 0) E.damage = max(E.damage - 5 * removed, 0) @@ -789,7 +789,7 @@ //This also prevents the whole code from working if the dosage is very small. var/hastrauma = 0 //whether or not the brain has trauma - var/obj/item/organ/brain/B = H.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/B = H.internal_organs_by_name[BP_BRAIN] var/bac = H.get_blood_alcohol() if(alchohol_affected && bac > 0.01) @@ -1327,7 +1327,7 @@ /datum/reagent/pulmodeiectionem/affect_breathe(var/mob/living/carbon/human/H, var/alien, var/removed) if(istype(H)) - var/obj/item/organ/L = H.internal_organs_by_name["lungs"] + var/obj/item/organ/L = H.internal_organs_by_name[BP_LUNGS] if(istype(L) && !L.robotic && !L.is_broken()) var/amount_to_purge = removed*5 //Every unit removes 5 units of other chemicals. for(var/datum/reagent/selected in H.breathing.reagent_list) @@ -1430,7 +1430,7 @@ /datum/reagent/adipemcina/affect_blood(var/mob/living/carbon/human/M, var/alien, var/removed) if(istype(M)) - var/obj/item/organ/F = M.internal_organs_by_name["heart"] + var/obj/item/organ/F = M.internal_organs_by_name[BP_HEART] if(istype(F)) if(M.max_nutrition > 0) var/nutritionmod = max(0.25, (1 - M.nutrition) / M.max_nutrition * 0.5) //Less effective when your stomach is "full". diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm index 24c37c7521f..899f463cd25 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm @@ -525,8 +525,8 @@ stored_value = metabolism /datum/reagent/plexium/affect_blood(var/mob/living/carbon/human/H, var/alien, var/removed) - var/obj/item/organ/brain/B = H.internal_organs_by_name["brain"] - if(B && H.species && H.species.has_organ["brain"] && !isipc(H)) + var/obj/item/organ/internal/brain/B = H.internal_organs_by_name[BP_BRAIN] + if(B && H.species && H.species.has_organ[BP_BRAIN] && !isipc(H)) stored_value += removed if(stored_value >= 5) if(prob(50) && !B.has_trauma_type(BRAIN_TRAUMA_MILD)) @@ -809,7 +809,7 @@ if(!istype(H)) return - var/obj/item/organ/brain/B = H.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/B = H.internal_organs_by_name[BP_BRAIN] if(!H.has_trauma_type(/datum/brain_trauma/special/love)) B.gain_trauma(/datum/brain_trauma/special/love,FALSE) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 1d1b512c916..b8c4e820fdb 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -14,6 +14,7 @@ /datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(strength) + M.add_chemical_effect(CE_TOXIN, 1) M.adjustToxLoss(strength * removed) /datum/reagent/toxin/plasticide @@ -58,6 +59,7 @@ taste_description = "stinging needles" /datum/reagent/toxin/panotoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + M.add_chemical_effect(CE_TOXIN, 1) M.adjustHalLoss(removed*15) /datum/reagent/toxin/phoron @@ -76,7 +78,7 @@ if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/parasite/PA = H.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/PA = H.internal_organs_by_name["blackkois"] if((istype(PA) && PA.stage >= 3)) H.heal_organ_damage(2 * removed, 2 * removed) H.add_chemical_effect(CE_BLOODRESTORE, 8 * removed) @@ -112,7 +114,7 @@ /datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/obj/item/organ/parasite/P = H.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = H.internal_organs_by_name["blackkois"] if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) return @@ -150,8 +152,9 @@ if(!istype(M)) return - var/obj/item/organ/parasite/P = M.internal_organs_by_name["blackkois"] + var/obj/item/organ/internal/parasite/P = M.internal_organs_by_name["blackkois"] if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) + M.add_chemical_effect(CE_TOXIN, 1) M.adjustToxLoss(removed * strength*2) else M.adjustToxLoss(removed * strength) @@ -433,6 +436,7 @@ return if(prob(10)) to_chat(M, "Your insides are burning!") + M.add_chemical_effect(CE_TOXIN, 10) M.adjustToxLoss(rand(100, 300) * removed) else if(prob(40)) M.heal_organ_damage(25 * removed, 0) @@ -491,6 +495,7 @@ M.sleeping = max(M.sleeping, 30) if(dose > 1) + M.add_chemical_effect(CE_TOXIN, 2) M.adjustToxLoss(removed) /datum/reagent/chloralhydrate/beer2 //disguised as normal beer for use by emagged brobots @@ -601,13 +606,13 @@ /datum/reagent/toxin/tobacco/affect_blood(var/mob/living/carbon/human/M, var/alien, var/removed) if(istype(M)) - var/obj/item/organ/H = M.internal_organs_by_name["heart"] + var/obj/item/organ/H = M.internal_organs_by_name[BP_HEART] if(istype(H)) H.take_damage(removed * strength * 0.5,1) - var/obj/item/organ/L = M.internal_organs_by_name["lungs"] + var/obj/item/organ/L = M.internal_organs_by_name[BP_LUNGS] if(istype(L)) L.take_damage(removed * strength,1) - var/obj/item/organ/A = M.internal_organs_by_name["liver"] + var/obj/item/organ/A = M.internal_organs_by_name[BP_LIVER] if(istype(A)) A.take_damage(removed * strength * 0.25,1) @@ -685,12 +690,12 @@ return if(!H.internal_organs_by_name["zombie"] && prob(15)) - var/obj/item/organ/external/affected = H.get_organ("chest") - var/obj/item/organ/parasite/zombie/infest = new() + var/obj/item/organ/external/affected = H.get_organ(BP_CHEST) + var/obj/item/organ/internal/parasite/zombie/infest = new() infest.replaced(H, affected) if(H.species.zombie_type) - if(!H.internal_organs_by_name["brain"]) //destroying the brain stops trioxin from bringing the dead back to life + if(!H.internal_organs_by_name[BP_BRAIN]) //destroying the brain stops trioxin from bringing the dead back to life return if(H && H.stat != DEAD) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 15490844111..3dac953829a 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -126,7 +126,7 @@ if(user.a_intent == I_GRAB && ishuman(user) && ishuman(target)) // we could add other things here eventually. trepanation maybe var/mob/living/carbon/human/H = target - if (check_zone(user.zone_sel.selecting) == "chest") // impromptu needle thoracostomy, re-inflate a collapsed lung + if (check_zone(user.zone_sel.selecting) == BP_CHEST) // impromptu needle thoracostomy, re-inflate a collapsed lung var/P = (user == target) ? "their" : (target + "\'s") var/SM = (user == target) ? "your" : (target + "\'s") user.visible_message(span("danger", "[user] aims \the [src] between [P] ribs!"), span("danger", "You aim \the [src] between [SM] ribs!")) @@ -134,7 +134,7 @@ return user.visible_message(span("warning", "[user] jabs \the [src] between [P] ribs with \the [src]!"), span("warning", "You jab \the [src] between [SM] ribs!")) if(H.is_lung_ruptured()) - var/obj/item/organ/lungs/L = H.internal_organs_by_name["lungs"] + var/obj/item/organ/internal/lungs/L = H.internal_organs_by_name[BP_LUNGS] if(!L.rescued) L.rescued = TRUE else diff --git a/code/modules/research/designs/mechfab/prosthetics/internal.dm b/code/modules/research/designs/mechfab/prosthetics/internal.dm index 6b9a2eb2a9a..d4160cdc25c 100644 --- a/code/modules/research/designs/mechfab/prosthetics/internal.dm +++ b/code/modules/research/designs/mechfab/prosthetics/internal.dm @@ -12,24 +12,24 @@ /datum/design/item/mechfab/prosthetic/internal/heart name = "Prosthetic Heart" id = "robotic_heart" - build_path = /obj/item/organ/heart + build_path = /obj/item/organ/internal/heart /datum/design/item/mechfab/prosthetic/internal/lungs name = "Prosthetic Lungs" id = "robotic_lungs" - build_path = /obj/item/organ/lungs + build_path = /obj/item/organ/internal/lungs /datum/design/item/mechfab/prosthetic/internal/kidneys name = "Prosthetic Kidneys" id = "robotic_kidneys" - build_path = /obj/item/organ/kidneys + build_path = /obj/item/organ/internal/kidneys /datum/design/item/mechfab/prosthetic/internal/eyes name = "Prosthetic Eyes" id = "robotic_eyes" - build_path = /obj/item/organ/eyes + build_path = /obj/item/organ/internal/eyes /datum/design/item/mechfab/prosthetic/internal/liver name = "Prosthetic Liver" id = "robotic_liver" - build_path = /obj/item/organ/liver \ No newline at end of file + build_path = /obj/item/organ/internal/liver \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm b/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm index dd5a779d589..d256ec6af8f 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_replicator.dm @@ -71,7 +71,7 @@ var/quantity = rand(5,15) for(var/i=0, iYou cover \the [src]'s eyes.") to_chat(H, "Your vision is covered by a shadow!") H.eye_blind = 3 H.eye_blurry = 5 - if(target_zone == "r_leg" || target_zone == "l_leg") + if(target_zone == BP_R_LEG || target_zone == BP_L_LEG) to_chat(user, "You move \the [src]'s legs around.") if(H.canmove && !H.restrained() && !(istype(H.loc, /turf/space))) step(H, pick(cardinal)) - if(target_zone == "l_hand" || target_zone == "l_arm") + if(target_zone == BP_L_HAND || target_zone == BP_L_ARM) to_chat(user, "You twist \the [src]'s left arm.") H.drop_l_hand() - if(target_zone == "r_hand" || target_zone == "r_arm") + if(target_zone == BP_R_HAND || target_zone == BP_R_ARM) to_chat(user, "You twist \the [src]'s right arm..") H.drop_r_hand() - if(target_zone == "head") + if(target_zone == BP_HEAD) to_chat(user, "You smack \the [src]'s head with your hand.") H.confused += 10 H.stuttering += 5 diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 36f971a3ca4..7a601c127f7 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -47,8 +47,8 @@ var/list/artefact_feedback = list(/obj/structure/closet/wizard/armor = "HS", if(istype(user, /mob/living/carbon/human)) //Save the users active hand var/mob/living/carbon/human/H = user - var/obj/item/organ/external/LA = H.get_organ("l_arm") - var/obj/item/organ/external/RA = H.get_organ("r_arm") + var/obj/item/organ/external/LA = H.get_organ(BP_L_ARM) + var/obj/item/organ/external/RA = H.get_organ(BP_R_ARM) var/active_hand = H.hand to_chat(user, "You feel unimaginable agony as your eyes pour over millenia of forbidden knowledge!") user.show_message("[user] screams in horror!",2) diff --git a/code/modules/spells/targeted/mindcontrol.dm b/code/modules/spells/targeted/mindcontrol.dm index c7de0abe8cd..c6e732bab3d 100644 --- a/code/modules/spells/targeted/mindcontrol.dm +++ b/code/modules/spells/targeted/mindcontrol.dm @@ -36,7 +36,7 @@ to_chat(user, "\The [H] is mindless!") return FALSE - var/obj/item/organ/brain/F = H.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/F = H.internal_organs_by_name[BP_BRAIN] if(isnull(F)) to_chat(user, "\The [H] is brainless!") diff --git a/code/modules/spells/targeted/projectile/projectile.dm b/code/modules/spells/targeted/projectile/projectile.dm index 2fcfa9c2b3e..5f07a304dda 100644 --- a/code/modules/spells/targeted/projectile/projectile.dm +++ b/code/modules/spells/targeted/projectile/projectile.dm @@ -33,7 +33,7 @@ If the spell_projectile is seeking, it will update its target every process and if(istype(projectile, /obj/item/projectile/spell_projectile)) var/obj/item/projectile/spell_projectile/SP = projectile SP.carried = src //casting is magical - projectile.launch_projectile(target, target_zone="chest") + projectile.launch_projectile(target, target_zone=BP_CHEST) return /spell/targeted/projectile/proc/choose_prox_targets(mob/user = usr, var/atom/movable/spell_holder) diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index aafe8950f1d..485bafc3090 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -52,7 +52,7 @@ if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && affected.name != "head" && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 + return affected && affected.name != BP_HEAD && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -91,7 +91,7 @@ if (!hasorgans(target)) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && affected.name == "head" && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 + return affected && affected.name == BP_HEAD && !(affected.status & ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is beginning to piece together [target]'s skull with \the [tool]." , \ diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index df1fee7877b..2d41255c568 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -8,7 +8,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (isslime(target)) return 0 - if (target_zone == "eyes") //there are specific steps for eye surgery + if (target_zone == BP_EYES) //there are specific steps for eye surgery return 0 if (!hasorgans(target)) return 0 @@ -245,10 +245,10 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]." var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]." - if (target_zone == "chest") + if (target_zone == BP_CHEST) msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." - if (target_zone == "groin") + if (target_zone == BP_GROIN) msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." user.visible_message(msg, self_msg) @@ -259,10 +259,10 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = "[user] keeps the incision open on [target]'s [affected.name] with \the [tool]." var/self_msg = "You keep the incision open on [target]'s [affected.name] with \the [tool]." - if (target_zone == "chest") + if (target_zone == BP_CHEST) msg = "[user] keeps the ribcage open on [target]'s torso with \the [tool]." self_msg = "You keep the ribcage open on [target]'s torso with \the [tool]." - if (target_zone == "groin") + if (target_zone == BP_GROIN) msg = "[user] keeps the incision open on [target]'s lower abdomen with \the [tool]." self_msg = "You keep the incision open on [target]'s lower abdomen with \the [tool]." user.visible_message(msg, self_msg) @@ -272,10 +272,10 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = "[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!" var/self_msg = "Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!" - if (target_zone == "chest") + if (target_zone == BP_CHEST) msg = "[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!" self_msg = "Your hand slips, damaging several organs in [target]'s torso with \the [tool]!" - if (target_zone == "groin") + if (target_zone == BP_GROIN) msg = "[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]" self_msg = "Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!" user.visible_message(msg, self_msg) @@ -331,7 +331,7 @@ max_duration = 160 can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - if (target_zone == "eyes") //there are specific steps for eye surgery + if (target_zone == BP_EYES) //there are specific steps for eye surgery return 0 if (!hasorgans(target)) return 0 diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index 81039911e29..433c40ee55d 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -14,7 +14,7 @@ proc/get_max_wclass(var/obj/item/organ/external/affected) switch (affected.name) - if ("head") + if (BP_HEAD) return 1 if ("upper body") return 3 @@ -24,7 +24,7 @@ proc/get_cavity(var/obj/item/organ/external/affected) switch (affected.name) - if ("head") + if (BP_HEAD) return "cranial" if ("upper body") return "thoracic" @@ -154,7 +154,7 @@ max_duration = 100 can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name[BP_BRAIN] return ..() && (!sponge || !sponge.damage) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 701eb6bd685..55ee6b944c1 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -75,7 +75,7 @@ user.visible_message("[user] treats damage to [target]'s [I.name] with [tool_name].", \ "You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 - var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name[BP_BRAIN] if(sponge && istype(I, sponge)) target.cure_all_traumas(cure_type = CURE_SURGERY) @@ -361,7 +361,7 @@ return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name[BP_BRAIN] if (!affected || !istype(sponge) || !(sponge in affected.internal_organs)) return 0 @@ -372,14 +372,14 @@ return ..() begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/obj/item/organ/brain/B = target.op_stage.current_organ + var/obj/item/organ/internal/brain/B = target.op_stage.current_organ user.visible_message("[user] begins to modify [target]'s [B] to remove their memory recall with \the [tool].", \ "You start to modify [target]'s [B] to remove their memory recall with \the [tool].") target.custom_pain("Someone's scraping away at your [B]!",1) ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/obj/item/organ/brain/B = target.op_stage.current_organ + var/obj/item/organ/internal/brain/B = target.op_stage.current_organ user.visible_message("[user] has modified [target]'s [B] to remove their memory recall with \the [tool]." , \ "You have removed [target]'s memory recall with \the [tool].") B.lobotomize(user) diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 7ec5d7ce4f4..803eb8e3328 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -70,7 +70,7 @@ if(!hasorgans(target)) return 0 - if (target_zone == "mouth" || target_zone == "eyes") + if (target_zone == "mouth" || target_zone == BP_EYES) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -123,7 +123,7 @@ if(!hasorgans(target)) return 0 - if (target_zone == "mouth" || target_zone == "eyes") + if (target_zone == "mouth" || target_zone == BP_EYES) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -189,7 +189,7 @@ var/obj/item/weldingtool/welder = tool if(!welder.isOn() || !welder.remove_fuel(1,user)) return 0 - return (target_zone == "chest") && istype(target.back, /obj/item/rig) && !(target.back.canremove) + return (target_zone == BP_CHEST) && istype(target.back, /obj/item/rig) && !(target.back.canremove) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts cutting through the support systems of [target]'s [target.back] with \the [tool]." , \ diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 253b3c8bc0c..bd692149e9f 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -8,7 +8,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if (isslime(target)) return 0 - if (target_zone == "eyes") //there are specific steps for eye surgery + if (target_zone == BP_EYES) //there are specific steps for eye surgery return 0 if (!hasorgans(target)) return 0 @@ -245,7 +245,7 @@ user.visible_message("[user] repairs [target]'s [I.name] with [tool].", \ "You repair [target]'s [I.name] with [tool]." ) I.damage = 0 - var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/sponge = target.internal_organs_by_name[BP_BRAIN] if(sponge && istype(I, sponge)) target.cure_all_traumas() @@ -373,7 +373,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - if(target_zone != "head") + if(target_zone != BP_HEAD) return var/obj/item/device/mmi/M = tool @@ -400,11 +400,11 @@ to_chat(user, "You have no idea what species this person is. Report this on the bug tracker.") return SURGERY_FAILURE - if(!target.species.has_organ["brain"]) + if(!target.species.has_organ[BP_BRAIN]) to_chat(user, "You're pretty sure [target.species.name_plural] don't normally have a brain.") return SURGERY_FAILURE - if(!isnull(target.internal_organs["brain"])) + if(!isnull(target.internal_organs[BP_BRAIN])) to_chat(user, "Your subject already has a brain.") return SURGERY_FAILURE @@ -423,7 +423,7 @@ var/obj/item/device/mmi/M = tool var/obj/item/organ/mmi_holder/holder = new(target, 1) - target.internal_organs_by_name["brain"] = holder + target.internal_organs_by_name[BP_BRAIN] = holder user.drop_from_inventory(tool,holder) holder.stored_mmi = tool holder.update_from_mmi() diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index a22f398a00f..85c4d502e9f 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -152,10 +152,10 @@ return if (G.state < GRAB_AGGRESSIVE) if(user.a_intent == I_HURT) - var/blocked = M.run_armor_check("head", "melee") + var/blocked = M.run_armor_check(BP_HEAD, "melee") if (prob(30 * BLOCKED_MULT(blocked))) M.Weaken(5) - M.apply_damage(8, BRUTE, "head", blocked) + M.apply_damage(8, BRUTE, BP_HEAD, blocked) visible_message("[G.assailant] slams [G.affecting]'s face against \the [src]!") if(material) playsound(loc, material.tableslam_noise, 50, 1) @@ -167,8 +167,8 @@ if(prob(50)) M.visible_message("\The [S] slices [M]'s face messily!", "\The [S] slices your face messily!") - M.apply_damage(10, BRUTE, "head", blocked) - M.standard_weapon_hit_effects(S, G.assailant, 10, blocked, "head") + M.apply_damage(10, BRUTE, BP_HEAD, blocked) + M.standard_weapon_hit_effects(S, G.assailant, 10, blocked, BP_HEAD) else to_chat(user, "You need a better grip to do that!") return diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 96a33b85a58..3a750cfd6ec 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -146,7 +146,7 @@ verbs += /obj/vehicle/train/cargo/engine/verb/stop_engine /obj/vehicle/train/cargo/RunOver(var/mob/living/carbon/human/H) - var/list/parts = list("head", "chest", "l_leg", "r_leg", "l_arm", "r_arm") + var/list/parts = list(BP_HEAD, BP_CHEST, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) H.apply_effects(5, 5) for(var/i = 0, i < rand(1,5), i++) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 2eb58d2b3a4..d15a69289cb 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -146,7 +146,7 @@ /datum/disease2/effect/organs/activate(var/mob/living/carbon/mob,var/multiplier) if(istype(mob, /mob/living/carbon/human)) var/mob/living/carbon/human/H = mob - var/organ = pick(list("r_arm","l_arm","r_leg","r_leg")) + var/organ = pick(list(BP_R_ARM,BP_L_ARM,BP_R_LEG,BP_R_LEG)) var/obj/item/organ/external/E = H.organs_by_name[organ] if (!(E.status & ORGAN_DEAD)) E.status |= ORGAN_DEAD @@ -240,7 +240,7 @@ /datum/disease2/effect/mind/activate(var/mob/living/carbon/mob,var/multiplier) if(istype(mob, /mob/living/carbon/human)) var/mob/living/carbon/human/H = mob - var/obj/item/organ/brain/B = H.internal_organs_by_name["brain"] + var/obj/item/organ/internal/brain/B = H.internal_organs_by_name[BP_BRAIN] if (B && B.damage < B.min_broken_damage) B.take_damage(5) else diff --git a/code/unit_tests/mob_tests.dm b/code/unit_tests/mob_tests.dm index c20559424c0..e2e01d88cd7 100644 --- a/code/unit_tests/mob_tests.dm +++ b/code/unit_tests/mob_tests.dm @@ -197,7 +197,7 @@ datum/unit_test/mob_damage var/mob_type = /mob/living/carbon/human var/expected_vulnerability = STANDARD var/check_health = 0 - var/damage_location = "chest" + var/damage_location = BP_CHEST datum/unit_test/mob_damage/start_test() var/list/test = create_test_mob_with_mind(null, mob_type) diff --git a/html/changelog.html b/html/changelog.html index 459b42cafc9..1d9726a74fb 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -1,39 +1,39 @@ -
- - - - -
-
Space Station 13
- -

- Code licensed under AGPLv3. Content licensed under CC BY-SA 3.0.

-
- -
Baystation 12 / Aurorastation Credit List - - - - -
- Current Project Maintainers: -Click Here-
- Currently Active GitHub contributor list: -Click Here-
- Code: Abi79, Aryn, Cael_Aislinn, Ccomp5950, Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, JoeyJo0, Lexusjjss, Melonstorm, Miniature, Mloc, NerdyBoy1104, PsiOmegaDelta, SkyMarshal, Snapshot, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty
- Sprites: Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, JoeyJo0, Miniature, Searif, Xenone, faux
- Sounds: Aryn
- Main Testers: Anyone who has submitted a bug to the issue tracker
- Thanks to: /tg/ station, /vg/station, GoonStation devs, Baystation 12 devs, the original SpaceStation developers and FFrances for the title image.
Also a thanks to anybody who has contributed who is not listed here :( Ask to be added here on irc.
-
Have a bug to report?
Visit our Issue Tracker.
-
- - -
+
+ + + + +
+
Space Station 13
+ +

+ Code licensed under AGPLv3. Content licensed under CC BY-SA 3.0.

+
+ +
Baystation 12 / Aurorastation Credit List + + + + +
+ Current Project Maintainers: -Click Here-
+ Currently Active GitHub contributor list: -Click Here-
+ Code: Abi79, Aryn, Cael_Aislinn, Ccomp5950, Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, JoeyJo0, Lexusjjss, Melonstorm, Miniature, Mloc, NerdyBoy1104, PsiOmegaDelta, SkyMarshal, Snapshot, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty
+ Sprites: Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, JoeyJo0, Miniature, Searif, Xenone, faux
+ Sounds: Aryn
+ Main Testers: Anyone who has submitted a bug to the issue tracker
+ Thanks to: /tg/ station, /vg/station, GoonStation devs, Baystation 12 devs, the original SpaceStation developers and FFrances for the title image.
Also a thanks to anybody who has contributed who is not listed here :( Ask to be added here on irc.
+
Have a bug to report?
Visit our Issue Tracker.
+
+ + +

19 November 2019

Aboshehab updated:

@@ -9843,7 +9843,7 @@
  • Refactored some attack vars from simple_animal to mob/living level.
  • Refactored internal organs to /mob/living/carbon level.
  • Refactored rad and light absorbtion to organ level.
  • -
  • Refactored brains to /obj/item/organ/brain.
  • +
  • Refactored brains to /obj/item/organ/internal/brain.
  • Refactored a lot of blood splattering to use blood_splatter() proc.
  • Refactored broadcast languages (changeling and alien hiveminds, drone and binary chat) to actual languages.
  • Refactored xenomorph abilities to work for humans.
  • @@ -11044,14 +11044,14 @@
  • Now disfigurment,now it WILL happen when damage is bad enough.
  • Now if you speak in depressurized area (less than 10 kPa) only people next to you can hear you. Radios still work though.
  • -
    - -GoonStation 13 Development Team -
    - Coders: Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion
    - Spriters: Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No
    -
    -
    -

    Creative Commons License
    Except where otherwise noted, Goon Station 13 is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
    Rights are currently extended to SomethingAwful Goons only.

    -

    Some icons by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.

    + + +GoonStation 13 Development Team +
    + Coders: Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion
    + Spriters: Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No
    +
    +
    +

    Creative Commons License
    Except where otherwise noted, Goon Station 13 is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
    Rights are currently extended to SomethingAwful Goons only.

    +

    Some icons by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.

    \ No newline at end of file diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index ec89a62c89b..4e539258b89 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -1161,7 +1161,7 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - tweak: Refactored some attack vars from simple_animal to mob/living level. - tweak: Refactored internal organs to /mob/living/carbon level. - tweak: Refactored rad and light absorbtion to organ level. - - tweak: Refactored brains to /obj/item/organ/brain. + - tweak: Refactored brains to /obj/item/organ/internal/brain. - tweak: Refactored a lot of blood splattering to use blood_splatter() proc. - tweak: Refactored broadcast languages (changeling and alien hiveminds, drone and binary chat) to actual languages. diff --git a/html/changelogs/mattatlas-brainmedstart.yml b/html/changelogs/mattatlas-brainmedstart.yml new file mode 100644 index 00000000000..0b6a14790d0 --- /dev/null +++ b/html/changelogs/mattatlas-brainmedstart.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Internal organs will now self-heal below 2 points of damage. Be careful - this doesn't work if you have toxins in your body." + - rscadd: "Open and retracted incisions will now show damaged organs and broken bones. Spooky!" diff --git a/maps/aurora/aurora-1_centcomm.dmm b/maps/aurora/aurora-1_centcomm.dmm index ea88bc8cd34..0f5d178da13 100644 --- a/maps/aurora/aurora-1_centcomm.dmm +++ b/maps/aurora/aurora-1_centcomm.dmm @@ -19731,7 +19731,7 @@ /area/wizard_station) "aSO" = ( /obj/structure/table/wood, -/obj/item/organ/heart, +/obj/item/organ/internal/heart, /turf/unsimulated/floor{ dir = 1; icon_state = "carpetside"