diff --git a/code/__DEFINES/~doppler_defines/traits.dm b/code/__DEFINES/~doppler_defines/traits.dm index fb5c21cd8680c..5d1775bfb52c1 100644 --- a/code/__DEFINES/~doppler_defines/traits.dm +++ b/code/__DEFINES/~doppler_defines/traits.dm @@ -39,6 +39,8 @@ #define TRAIT_HARD_SOLES "hard_soles" /// Can detach cybernetic limbs voluntarily #define TRAIT_ROBOTIC_LIMBATTACHMENT "robotic_limbattachment" +/// This person has the same taste in food as a different species +#define TRAIT_ATYPICAL_TASTER "atypical_taster" //// // Jobs diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index c281c6582890b..18571330e09bc 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -757,6 +757,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_R_SMALL" = TRAIT_R_SMALL, "TRAIT_R_UNIQUEPANEL" = TRAIT_R_UNIQUEPANEL, "TRAIT_SYSTEM_SHOCK" = TRAIT_SYSTEM_SHOCK, + "TRAIT_ATYPICAL_TASTER" = TRAIT_ATYPICAL_TASTER, ), // DOPPLER EDIT ADDITION END )) diff --git a/code/_globalvars/traits/admin_tooling.dm b/code/_globalvars/traits/admin_tooling.dm index 1b62e3c5a1892..fda494a36d757 100644 --- a/code/_globalvars/traits/admin_tooling.dm +++ b/code/_globalvars/traits/admin_tooling.dm @@ -415,6 +415,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list( "TRAIT_R_SMALL" = TRAIT_R_SMALL, "TRAIT_R_UNIQUEPANEL" = TRAIT_R_UNIQUEPANEL, "TRAIT_SYSTEM_SHOCK" = TRAIT_SYSTEM_SHOCK, + "TRAIT_ATYPICAL_TASTER" = TRAIT_ATYPICAL_TASTER, ), // DOPPLER EDIT ADDITION END )) diff --git a/modular_doppler/modular_quirks/atypical_tastes/atypical_tastes.dm b/modular_doppler/modular_quirks/atypical_tastes/atypical_tastes.dm new file mode 100644 index 0000000000000..ee0f2ea7389db --- /dev/null +++ b/modular_doppler/modular_quirks/atypical_tastes/atypical_tastes.dm @@ -0,0 +1,40 @@ +GLOBAL_LIST_INIT(possible_quirk_atypical_tastes, list( + "Lizardperson" = /obj/item/organ/tongue/lizard, + "Feline" = /obj/item/organ/tongue/cat, + "Mothman" = /obj/item/organ/tongue/moth, + "Snail" = /obj/item/organ/tongue/snail, + "Hemophage" = /obj/item/organ/tongue/hemophage, + "Ramatan" = /obj/item/organ/tongue/ramatan, +)) + +/datum/quirk/atypical_tastes + name = "Atypical Tastes" + desc = "For one reason or another, your tastes in food are similar to that of another species." + value = 8 + mob_trait = TRAIT_ATYPICAL_TASTER + icon = FA_ICON_PLATE_WHEAT + +/datum/quirk_constant_data/atypical_taster + associated_typepath = /datum/quirk/atypical_tastes + customization_options = list(/datum/preference/choiced/atypical_tastes) + +/datum/quirk/atypical_tastes/add_unique(client/client_source) + var/obj/item/organ/tongue/desired_taste_copier = GLOB.possible_quirk_atypical_tastes[client_source?.prefs?.read_preference(/datum/preference/choiced/atypical_tastes)] + if(isnull(desired_taste_copier)) // I mean I'm not going to stop you from randomizing your tastes every round. Go ahead. + desired_taste_copier = GLOB.possible_quirk_atypical_tastes[pick(GLOB.possible_quirk_atypical_tastes)] + + var/mob/living/carbon/human/human_holder = quirk_holder + if(human_holder.dna.species.type in GLOB.species_blacklist_no_humanoid) + to_chat(human_holder, span_warning("Due to your species type, the [name] quirk has been disabled.")) + return + + var/obj/item/organ/tongue/holder_tongue = human_holder.get_organ_slot(ORGAN_SLOT_TONGUE) + if(!holder_tongue) + to_chat(human_holder, span_warning("As you seem to lack a tongue and thus ability to taste food, the [name] quirk has been disabled.")) + return + + holder_tongue.liked_foodtypes = desired_taste_copier.liked_foodtypes + holder_tongue.disliked_foodtypes = desired_taste_copier.disliked_foodtypes + holder_tongue.toxic_foodtypes = desired_taste_copier.toxic_foodtypes + holder_tongue.sense_of_taste = desired_taste_copier.sense_of_taste + medical_record_text = "Patient exhibits atypical mutation in taste receptors." diff --git a/modular_doppler/modular_quirks/atypical_tastes/code/preferences.dm b/modular_doppler/modular_quirks/atypical_tastes/code/preferences.dm new file mode 100644 index 0000000000000..1b3688af9e22a --- /dev/null +++ b/modular_doppler/modular_quirks/atypical_tastes/code/preferences.dm @@ -0,0 +1,20 @@ +/datum/preference/choiced/atypical_tastes + category = PREFERENCE_CATEGORY_MANUALLY_RENDERED + savefile_key = "atypical_tastes" + savefile_identifier = PREFERENCE_CHARACTER + can_randomize = FALSE + +/datum/preference/choiced/atypical_tastes/init_possible_values() + return list("Random") + assoc_to_keys(GLOB.possible_quirk_atypical_tastes) + +/datum/preference/choiced/atypical_tastes/create_default_value() + return "Random" + +/datum/preference/choiced/atypical_tastes/is_accessible(datum/preferences/preferences) + if (!..()) + return FALSE + + return "Atypical Tastes" in preferences.all_quirks + +/datum/preference/choiced/atypical_tastes/apply_to_human(mob/living/carbon/human/target, value) + return diff --git a/tgstation.dme b/tgstation.dme index 73aa5a0c84765..28aaaf49a566c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7082,6 +7082,8 @@ #include "modular_doppler\modular_mood\code\mood_events\dog_wag.dm" #include "modular_doppler\modular_mood\code\mood_events\hotspring.dm" #include "modular_doppler\modular_mood\code\mood_events\race_drink.dm" +#include "modular_doppler\modular_quirks\atypical_tastes\atypical_tastes.dm" +#include "modular_doppler\modular_quirks\atypical_tastes\code\preferences.dm" #include "modular_doppler\modular_quirks\breather\accessories.dm" #include "modular_doppler\modular_quirks\breather\breather_quirk.dm" #include "modular_doppler\modular_quirks\breather\nitrogen_breather\nitrogen_breather.dm"