forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from She-Is-Trying-To-Form-Her-First-Thought/…
…atypical-taster ITS FUARKKEN RAW! Atypical tasters and the like
- Loading branch information
Showing
7 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
modular_doppler/modular_quirks/atypical_tastes/atypical_tastes.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = 0 | ||
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
20
modular_doppler/modular_quirks/atypical_tastes/code/preferences.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...interfaces/PreferencesMenu/preferences/features/character_preferences/atypical_taster.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { FeatureChoiced } from '../base'; | ||
import { FeatureDropdownInput } from '../dropdowns'; | ||
|
||
export const atypical_tastes: FeatureChoiced = { | ||
name: 'Atypical Tastes', | ||
component: FeatureDropdownInput, | ||
}; |