Skip to content

Commit

Permalink
good eatin pizza tower
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxilmaniac committed Dec 25, 2024
1 parent 8b308f4 commit 11304a6
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/~doppler_defines/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
))

Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
))

Expand Down
40 changes: 40 additions & 0 deletions modular_doppler/modular_quirks/atypical_tastes/atypical_tastes.dm
Original file line number Diff line number Diff line change
@@ -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."
20 changes: 20 additions & 0 deletions modular_doppler/modular_quirks/atypical_tastes/code/preferences.dm
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 11304a6

Please sign in to comment.