From be5d620dc60a5bf408d729a9ea4d942ee59aca32 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 3 Apr 2021 06:19:54 +0200 Subject: [PATCH] Gustatory Augment (#11434) --- code/__defines/mobs.dm | 1 + .../loadout/loadout_xeno/machine.dm | 21 ++++++++++ code/modules/mob/living/carbon/taste.dm | 6 ++- code/modules/organs/subtypes/augment.dm | 42 +++++++++++++++++++ html/changelogs/geeves-gustatory_aug.yml | 7 ++++ 5 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/geeves-gustatory_aug.yml diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 00440beb1be..59bbbb3100b 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -146,6 +146,7 @@ #define BP_AUG_PEN "retractable combipen" #define BP_AUG_LIGHTER "retractable lighter" #define BP_AUG_HEALTHSCAN "integrated health scanner" +#define BP_AUG_GUSTATORIAL "integrated gustatorial centre" #define BP_AUG_TESLA "tesla spine" #define BP_AUG_EYE_SENSORS "integrated eyes sensors" #define BP_AUG_HAIR "synthetic hair extensions" diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno/machine.dm b/code/modules/client/preference_setup/loadout/loadout_xeno/machine.dm index ca0d62f61f8..e6f8ceee433 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno/machine.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno/machine.dm @@ -133,3 +133,24 @@ goldendeep["golden deep suit"] = /obj/item/clothing/under/goldendeep/suit goldendeep["golden deep skirtsuit"] = /obj/item/clothing/under/goldendeep/skirtsuit gear_tweaks += new/datum/gear_tweak/path(goldendeep) + +/datum/gear/augment/machine/gustatorial + display_name = "gustatorial centre (tongue)" + description = "An extremely complex augment, capable of translating taste into binary code, allowing synthetic beings to experience food." + path = /obj/item/organ/internal/augment/gustatorial + cost = 1 + whitelisted = list(SPECIES_IPC_SHELL) + sort_category = "Xenowear - IPC" + +/datum/gear/augment/machine/gustatorial/hands + display_name = "gustatorial centre (hands)" + description = "An extremely complex augment, capable of translating taste into binary code, allowing synthetic beings to experience food." + path = /obj/item/organ/internal/augment/gustatorial/hand + whitelisted = list(SPECIES_IPC, SPECIES_IPC_G1, SPECIES_IPC_G2, SPECIES_IPC_XION, SPECIES_IPC_ZENGHU, SPECIES_IPC_BISHOP, SPECIES_IPC_SHELL) + +/datum/gear/augment/machine/gustatorial/hands/New() + ..() + var/list/handies = list() + handies["gustatorial centre (right hand)"] = /obj/item/organ/internal/augment/gustatorial/hand + handies["gustatorial centre (left hand)"] = /obj/item/organ/internal/augment/gustatorial/hand/left + gear_tweaks += new /datum/gear_tweak/path(handies) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/taste.dm b/code/modules/mob/living/carbon/taste.dm index ddf1e92f8e9..3b057dccd92 100644 --- a/code/modules/mob/living/carbon/taste.dm +++ b/code/modules/mob/living/carbon/taste.dm @@ -14,9 +14,11 @@ catalogue the 'taste strength' of each one calculate text size per text. */ -/datum/reagents/proc/generate_taste_message(mob/living/carbon/taster = null) +/datum/reagents/proc/generate_taste_message(mob/living/carbon/taster = null, var/force_taste_sensitivity) var/minimum_percent = 15 - if(ishuman(taster)) + if(force_taste_sensitivity) + minimum_percent = round(15 / force_taste_sensitivity) + else if(ishuman(taster)) var/mob/living/carbon/human/H = taster var/total_taste_sensitivity diff --git a/code/modules/organs/subtypes/augment.dm b/code/modules/organs/subtypes/augment.dm index 596bde0eff2..a27914fc304 100644 --- a/code/modules/organs/subtypes/augment.dm +++ b/code/modules/organs/subtypes/augment.dm @@ -349,6 +349,48 @@ name = "C'thur language processor" augment_languages = list(LANGUAGE_SKRELLIAN) +/obj/item/organ/internal/augment/gustatorial + name = "gustatorial centre" + action_button_name = "Activate Gustatorial Centre (tongue)" + action_button_icon = "augment" + organ_tag = BP_AUG_GUSTATORIAL + parent_organ = BP_HEAD + activable = TRUE + cooldown = 8 + + var/taste_sensitivity = TASTE_NORMAL + var/action_verb = "licks" + var/self_action_verb = "lick" + +/obj/item/organ/internal/augment/gustatorial/attack_self(var/mob/user) + . = ..() + if(!.) + return FALSE + + var/obj/item/reagent_containers/food/F = user.get_active_hand() + if(istype(F)) + if(!F.is_open_container()) + to_chat(user, SPAN_WARNING("\The [F] is closed!")) + return + user.visible_message("[user] [action_verb] \the [F].", SPAN_NOTICE("You [self_action_verb] \the [F].")) + to_chat(user, SPAN_NOTICE("\The [src] reports that \the [F] tastes like: [F.reagents.generate_taste_message(user, taste_sensitivity)]")) + else + var/list/tastes = list("Hypersensitive" = TASTE_HYPERSENSITIVE, "Sensitive" = TASTE_SENSITIVE, "Normal" = TASTE_NORMAL, "Dull" = TASTE_DULL, "Numb" = TASTE_NUMB) + var/taste_choice = input(user, "How well do you want to taste?", "Taste Sensitivity", "Normal") as null|anything in tastes + if(taste_choice) + to_chat(user, SPAN_NOTICE("\The [src] will now output taste as if you were [taste_choice].")) + taste_sensitivity = tastes[taste_choice] + +/obj/item/organ/internal/augment/gustatorial/hand + parent_organ = BP_R_HAND + action_button_name = "Activate Gustatorial Centre (hand)" + + action_verb = "sticks their finger in" + self_action_verb = "stick your finger in" + +/obj/item/organ/internal/augment/gustatorial/hand/left + parent_organ = BP_L_HAND + // Snakebitten! /obj/item/organ/internal/augment/psi name = "psionic receiver" diff --git a/html/changelogs/geeves-gustatory_aug.yml b/html/changelogs/geeves-gustatory_aug.yml new file mode 100644 index 00000000000..9988fd568f4 --- /dev/null +++ b/html/changelogs/geeves-gustatory_aug.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added a gustatoral centre augment for IPCs. This will allow them to taste food in their active hand as if they've eaten it. Using it with no food in their hand will let them change how sensitive it is." + - rscadd: "Shell IPCs get an additional gustatoral centre augment variation that goes in their tongue, allowing them to taste food without their finger." \ No newline at end of file