From 3d6e95c8f0d56f174c871d182e8a6762df437cb5 Mon Sep 17 00:00:00 2001 From: Dani Glore Date: Thu, 15 Dec 2022 16:41:24 -0500 Subject: [PATCH] Add: Cybernetic Tongue & Augments Tweak (#17561) * Add cybernetic tongue organ with new sprite * Add cybernetic tongue to techweb designs and Augment+ menu. Add changes to tgstation.dme * Add cybernetic tongue to /datum/techweb_node/cyber_organs * Update Cybernetic Tongue sprite and description. * Change cybernetic tongue design to use '4 SECONDS' instead of 40 * Change default organ augment name to 'Default' * Rename Organic Tongue to Human Tongue * Change augment limbs and organs to use intended names * Rename Human tongue augment_item to Organic tongue * Add defines LIMBS_DEFAULT_NAME and ORGANS_DEFAULT_NAME to limbs_and_markings.dm --- code/modules/research/techweb/all_nodes.dm | 1 + .../middleware/limbs_and_markings.dm | 54 +++++++++++------- .../research/designs/medical_designs.dm | 12 ++++ .../modules/client/augment/limbs.dm | 20 +++---- .../modules/client/augment/organs.dm | 6 +- modular_skyrat/modules/organs/code/tongue.dm | 16 ++++++ .../modules/organs/icons/cyber_tongue.dmi | Bin 0 -> 354 bytes tgstation.dme | 1 + 8 files changed, 77 insertions(+), 33 deletions(-) create mode 100644 modular_skyrat/master_files/code/modules/research/designs/medical_designs.dm create mode 100644 modular_skyrat/modules/organs/icons/cyber_tongue.dmi diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index a3a455387cd..1c845ffbb5e 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -1349,6 +1349,7 @@ "cybernetic_liver_tier2", "cybernetic_lungs_tier2", "cybernetic_stomach_tier2", + "cybernetic_tongue", //SKYRAT EDIT ADDITION ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000) diff --git a/modular_skyrat/master_files/code/modules/client/preferences/middleware/limbs_and_markings.dm b/modular_skyrat/master_files/code/modules/client/preferences/middleware/limbs_and_markings.dm index c7c18259395..7480b1cb87c 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/middleware/limbs_and_markings.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/middleware/limbs_and_markings.dm @@ -1,3 +1,6 @@ +#define ORGANS_DEFAULT_NAME "Default" +#define LIMBS_DEFAULT_NAME "None" + /datum/preference_middleware/limbs_and_markings/post_set_preference(mob/user, preference, value) preferences.character_preview_view.update_body() . = ..() @@ -56,7 +59,7 @@ /datum/preference_middleware/limbs_and_markings/proc/set_limb_aug(list/params, mob/user) var/limb_slot = params["limb_slot"] var/augment_name = params["augment_name"] - if(augment_name == "None") + if(augment_name == LIMBS_DEFAULT_NAME) preferences.augments -= limbs_to_process[limb_slot] else preferences.augments[limbs_to_process[limb_slot]] = augment_to_path[augment_name] @@ -66,7 +69,7 @@ /datum/preference_middleware/limbs_and_markings/proc/set_limb_aug_style(list/params, mob/user) var/limb_slot = params["limb_slot"] var/style_name = params["style_name"] - if(style_name == "None") + if(style_name == LIMBS_DEFAULT_NAME) preferences.augment_limb_styles -= limbs_to_process[limb_slot] else preferences.augment_limb_styles[limbs_to_process[limb_slot]] = style_name @@ -176,7 +179,7 @@ /datum/preference_middleware/limbs_and_markings/proc/set_organ_aug(list/params, mob/user) var/organ_slot = params["organ_slot"] var/augment_name = params["augment_name"] - if(augment_name == "Organic") + if(augment_name == ORGANS_DEFAULT_NAME) preferences.augments -= organs_to_process[organ_slot] else preferences.augments[organs_to_process[organ_slot]] = augment_to_path[augment_name] @@ -204,23 +207,25 @@ for(var/limb in limbs_to_process) if(!nice_aug_names[limb]) nice_aug_names[limb] = list() - for(var/augments in GLOB.augment_slot_to_items[limbs_to_process[limb]]) - var/obj/item/aug = augments + for(var/augment in GLOB.augment_slot_to_items[limbs_to_process[limb]]) + var/obj/item/aug = augment + var/datum/augment_item/expensive_augment = GLOB.augment_items[augment] var/cost = 0 - if(GLOB.augment_items[augments]) - var/datum/augment_item/expensive_augment = GLOB.augment_items[augments] + var/name = initial(aug.name) + if (expensive_augment) cost = expensive_augment.cost + name = expensive_augment.name // To display the cost of the limb, if it's anything aside from 0. - var/aug_name = cost != 0 ? initial(aug.name) + " ([cost])" : initial(aug.name) + var/aug_name = cost != 0 ? name + " ([cost])" : name costs[AUGMENT_CATEGORY_LIMBS][aug_name] = cost - nice_aug_names[limb][augments] = aug_name - augment_to_path[aug_name] = augments - nice_aug_names[limb]["none"] = "None" + nice_aug_names[limb][augment] = aug_name + augment_to_path[aug_name] = augment + nice_aug_names[limb]["none"] = LIMBS_DEFAULT_NAME var/chosen_augment if(preferences.augments[limbs_to_process[limb]] && !isnull(nice_aug_names[limb][preferences.augments[limbs_to_process[limb]]])) chosen_augment = nice_aug_names[limb][preferences.augments[limbs_to_process[limb]]] else - chosen_augment = "None" + chosen_augment = LIMBS_DEFAULT_NAME var/list/choices = GLOB.body_markings_per_limb[limb].Copy() if (!allow_mismatched_parts) for (var/name in choices) @@ -232,7 +237,7 @@ "name" = limbs_to_process[limb], "can_augment" = aug_support[limb], "chosen_aug" = chosen_augment, - "chosen_style" = preferences.augment_limb_styles[limbs_to_process[limb]] ? preferences.augment_limb_styles[limbs_to_process[limb]] : "None", + "chosen_style" = preferences.augment_limb_styles[limbs_to_process[limb]] ? preferences.augment_limb_styles[limbs_to_process[limb]] : LIMBS_DEFAULT_NAME, "aug_choices" = nice_aug_names[limb], "costs" = costs[AUGMENT_CATEGORY_LIMBS], "markings" = list( @@ -247,23 +252,25 @@ for(var/organ in organs_to_process) if(!nice_aug_names[organ]) nice_aug_names[organ] = list() - for(var/augments in GLOB.augment_slot_to_items[organs_to_process[organ]]) - var/obj/item/aug = augments + for(var/augment in GLOB.augment_slot_to_items[organs_to_process[organ]]) + var/obj/item/aug = augment + var/datum/augment_item/expensive_augment = GLOB.augment_items[augment] var/cost = 0 - if(GLOB.augment_items[augments]) - var/datum/augment_item/expensive_augment = GLOB.augment_items[augments] + var/name = initial(aug.name) + if (expensive_augment) cost = expensive_augment.cost + name = expensive_augment.name // To display the cost of the limb, if it's anything aside from 0. - var/aug_name = cost != 0 ? initial(aug.name) + " ([cost])" : initial(aug.name) + var/aug_name = cost != 0 ? name + " ([cost])" : name costs[AUGMENT_CATEGORY_ORGANS][aug_name] = cost - nice_aug_names[organ][augments] = aug_name - augment_to_path[aug_name] = augments - nice_aug_names[organ]["organic"] = "Organic" + nice_aug_names[organ][augment] = aug_name + augment_to_path[aug_name] = augment + nice_aug_names[organ]["organic"] = ORGANS_DEFAULT_NAME var/chosen_organ if(preferences.augments[organs_to_process[organ]] && !isnull(nice_aug_names[organ][preferences.augments[organs_to_process[organ]]])) chosen_organ = nice_aug_names[organ][preferences.augments[organs_to_process[organ]]] else - chosen_organ = "Organic" + chosen_organ = ORGANS_DEFAULT_NAME organs_data += list(list( "slot" = organ, "name" = organs_to_process[organ], @@ -284,3 +291,6 @@ data["marking_presets"] = presets return data + +#undef LIMBS_DEFAULT_NAME +#undef ORGANS_DEFAULT_NAME diff --git a/modular_skyrat/master_files/code/modules/research/designs/medical_designs.dm b/modular_skyrat/master_files/code/modules/research/designs/medical_designs.dm new file mode 100644 index 00000000000..7b1f3c0a6d4 --- /dev/null +++ b/modular_skyrat/master_files/code/modules/research/designs/medical_designs.dm @@ -0,0 +1,12 @@ +/datum/design/cybernetic_tongue + name = "Cybernetic Tongue" + desc = "A cybernetic tongue." + id = "cybernetic_tongue" + build_type = PROTOLATHE | AWAY_LATHE | MECHFAB + construction_time = 4 SECONDS + materials = list(/datum/material/iron = 250, /datum/material/glass = 300, /datum/material/silver = 250) + build_path = /obj/item/organ/internal/tongue/cybernetic + category = list( + RND_CATEGORY_CYBERNETICS + RND_SUBCATEGORY_CYBERNETICS_ORGANS + ) + departmental_flags = DEPARTMENT_BITFLAG_MEDICAL diff --git a/modular_skyrat/modules/customization/modules/client/augment/limbs.dm b/modular_skyrat/modules/customization/modules/client/augment/limbs.dm index 658b851947d..6d9812ce16a 100644 --- a/modular_skyrat/modules/customization/modules/client/augment/limbs.dm +++ b/modular_skyrat/modules/customization/modules/client/augment/limbs.dm @@ -33,7 +33,7 @@ slot = AUGMENT_SLOT_HEAD /datum/augment_item/limb/head/cyborg - name = "Cyborg" + name = "Cyborg head" path = /obj/item/bodypart/head/robot/weak //CHESTS @@ -41,7 +41,7 @@ slot = AUGMENT_SLOT_CHEST /datum/augment_item/limb/chest/cyborg - name = "Cyborg" + name = "Cyborg chest" path = /obj/item/bodypart/chest/robot/weak //LEFT ARMS @@ -49,12 +49,12 @@ slot = AUGMENT_SLOT_L_ARM /datum/augment_item/limb/l_arm/prosthetic - name = "Prosthetic" + name = "Prosthetic left arm" path = /obj/item/bodypart/arm/left/robot/surplus cost = -1 /datum/augment_item/limb/l_arm/cyborg - name = "Cyborg" + name = "Cyborg left arm" path = /obj/item/bodypart/arm/left/robot/weak //RIGHT ARMS @@ -62,12 +62,12 @@ slot = AUGMENT_SLOT_R_ARM /datum/augment_item/limb/r_arm/prosthetic - name = "Prosthetic" + name = "Prosthetic right arm" path = /obj/item/bodypart/arm/right/robot/surplus cost = -1 /datum/augment_item/limb/r_arm/cyborg - name = "Cyborg" + name = "Cyborg right arm" path = /obj/item/bodypart/arm/right/robot/weak //LEFT LEGS @@ -75,12 +75,12 @@ slot = AUGMENT_SLOT_L_LEG /datum/augment_item/limb/l_leg/prosthetic - name = "Prosthetic" + name = "Prosthetic left leg" path = /obj/item/bodypart/leg/left/robot/surplus cost = -1 /datum/augment_item/limb/l_leg/cyborg - name = "Cyborg" + name = "Cyborg left leg" path = /obj/item/bodypart/leg/left/robot/weak //RIGHT LEGS @@ -88,10 +88,10 @@ slot = AUGMENT_SLOT_R_LEG /datum/augment_item/limb/r_leg/prosthetic - name = "Prosthetic" + name = "Prosthetic right leg" path = /obj/item/bodypart/leg/right/robot/surplus cost = -1 /datum/augment_item/limb/r_leg/cyborg - name = "Cyborg" + name = "Cyborg right leg" path = /obj/item/bodypart/leg/right/robot/weak diff --git a/modular_skyrat/modules/customization/modules/client/augment/organs.dm b/modular_skyrat/modules/customization/modules/client/augment/organs.dm index 1e8057c2b31..2d4a0a3ba9d 100644 --- a/modular_skyrat/modules/customization/modules/client/augment/organs.dm +++ b/modular_skyrat/modules/customization/modules/client/augment/organs.dm @@ -80,12 +80,16 @@ /datum/augment_item/organ/tongue/normal name = "Organic tongue" - path = /obj/item/organ/internal/tongue + path = /obj/item/organ/internal/tongue/human /datum/augment_item/organ/tongue/robo name = "Robotic voicebox" path = /obj/item/organ/internal/tongue/robot +/datum/augment_item/organ/tongue/cybernetic + name = "Cybernetic tongue" + path = /obj/item/organ/internal/tongue/cybernetic + /datum/augment_item/organ/tongue/forked name = "Forked tongue" path = /obj/item/organ/internal/tongue/lizard diff --git a/modular_skyrat/modules/organs/code/tongue.dm b/modular_skyrat/modules/organs/code/tongue.dm index f08cfefa548..79f9f017ddf 100644 --- a/modular_skyrat/modules/organs/code/tongue.dm +++ b/modular_skyrat/modules/organs/code/tongue.dm @@ -20,6 +20,22 @@ speaker.verb_sing = initial(verb_sing) speaker.verb_yell = initial(verb_yell) +/// This "human" tongue is only used in Character Preferences / Augmentation menu. +/// The base tongue class lacked a say_mod. With say_mod included it makes a non-Human user sound like a Human. +/obj/item/organ/internal/tongue/human + say_mod = "says" + +/obj/item/organ/internal/tongue/cybernetic + name = "cybernetic tongue" + icon = 'modular_skyrat/modules/organs/icons/cyber_tongue.dmi' + icon_state = "cybertongue" + desc = "A fully-functional synthetic tongue, encased in soft silicone. Features include high-resolution vocals and taste receptors." + status = ORGAN_ROBOTIC + organ_flags = ORGAN_SYNTHETIC + say_mod = "says" + // Not as good as organic tongues, not as bad as the robotic voicebox. + taste_sensitivity = 20 + /obj/item/organ/internal/tongue/vox name = "vox tongue" desc = "A fleshy muscle mostly used for skreeing." diff --git a/modular_skyrat/modules/organs/icons/cyber_tongue.dmi b/modular_skyrat/modules/organs/icons/cyber_tongue.dmi new file mode 100644 index 0000000000000000000000000000000000000000..961aeb14f265383a8a7816e0cb1dbd17c5490000 GIT binary patch literal 354 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv-2k5u*8>L*hzJPF%WK@Nm=_k6 zd_I2S|D9L9&Dis4u2^|>^Jdrl|5qKQrOc&Wr>HEwXB)ab3aF8>B*-tA!Qt7BG$1Fx zDkP%BCAB!YD6^m>Ge3`kp<+&OSV2+g_b^F-?vWM=v^vAn#W6%