From 3c557515945c14e02084b528a1439261de15ef6d Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Fri, 13 Jan 2023 12:25:18 +0100 Subject: [PATCH] Adds mechanical traits from origins. (#15497) --- aurorastation.dme | 1 + code/__defines/origin_traits.dm | 10 +++++ code/__defines/traits.dm | 9 +--- code/modules/background/origins/_origins.dm | 30 ++++++++----- .../origins/origins/human/coalition.dm | 14 ++++++ .../origins/origins/human/dominia.dm | 8 ++++ .../background/origins/origins/human/elyra.dm | 8 ++++ .../background/origins/origins/human/sol.dm | 41 +++++++++++++++--- .../client/preference_setup/origin/origin.dm | 10 ++++- code/modules/client/preferences.dm | 2 + .../mob/living/carbon/human/intoxication.dm | 3 ++ code/modules/mob/living/carbon/human/life.dm | 33 +++++++++++++- code/modules/nano/modules/human_appearance.dm | 2 + code/modules/organs/internal/eyes.dm | 3 ++ .../Chemistry-Reagents-Drugs.dm | 6 +++ .../Chemistry-Reagents-Food-Drinks.dm | 22 +++++++++- .../Chemistry-Reagents-Toxins.dm | 2 + html/changelogs/mattatlas-xltt.yml | 43 +++++++++++++++++++ 18 files changed, 218 insertions(+), 29 deletions(-) create mode 100644 code/__defines/origin_traits.dm create mode 100644 html/changelogs/mattatlas-xltt.yml diff --git a/aurorastation.dme b/aurorastation.dme index 04562005c81..d517ba20edf 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -56,6 +56,7 @@ #include "code\__defines\modular_guns.dm" #include "code\__defines\obj.dm" #include "code\__defines\organs.dm" +#include "code\__defines\origin_traits.dm" #include "code\__defines\overmap.dm" #include "code\__defines\projectiles.dm" #include "code\__defines\psi.dm" diff --git a/code/__defines/origin_traits.dm b/code/__defines/origin_traits.dm new file mode 100644 index 00000000000..d882f524f81 --- /dev/null +++ b/code/__defines/origin_traits.dm @@ -0,0 +1,10 @@ +// A set of traits used to determine which origin quirks to apply to characters. +#define TRAIT_ORIGIN_IGNORE_CAPSAICIN "ignore_capsaicin" +#define TRAIT_ORIGIN_ALCOHOL_RESISTANCE "alcohol_resistance" +#define TRAIT_ORIGIN_DRUG_RESISTANCE "drug_resistance" +#define TRAIT_ORIGIN_DARK_AFRAID "dark_sensitivity" +#define TRAIT_ORIGIN_TOX_RESISTANCE "toxin_resistance" +#define TRAIT_ORIGIN_COLD_RESISTANCE "cold_resistance" +#define TRAIT_ORIGIN_HOT_RESISTANCE "hot_resistance" +#define TRAIT_ORIGIN_NO_ANIMAL_PROTEIN "no_animal_protein" +#define TRAIT_ORIGIN_LIGHT_SENSITIVE "light_sensitive" \ No newline at end of file diff --git a/code/__defines/traits.dm b/code/__defines/traits.dm index b3e1b91abf2..d37a06e026c 100644 --- a/code/__defines/traits.dm +++ b/code/__defines/traits.dm @@ -119,17 +119,10 @@ // common trait sources #define TRAIT_GENERIC "generic" #define GENERIC_ITEM_TRAIT "generic_item" -#define UNCONSCIOUS_TRAIT "unconscious" -#define EYE_DAMAGE "eye_damage" -#define EAR_DAMAGE "ear_damage" -#define GENETIC_MUTATION "genetic" -#define OBESITY "obesity" -#define MAGIC_TRAIT "magic" -#define TRAUMA_TRAIT "trauma" /// cannot be removed without admin intervention #define ROUNDSTART_TRAIT "roundstart" -#define JOB_TRAIT "job" +#define CULTURE_TRAIT "culture" #define INNATE_TRAIT "innate" diff --git a/code/modules/background/origins/_origins.dm b/code/modules/background/origins/_origins.dm index 1a22f11274b..8f0388effe4 100644 --- a/code/modules/background/origins/_origins.dm +++ b/code/modules/background/origins/_origins.dm @@ -1,16 +1,24 @@ /singleton/origin_item - var/name = "generic origin item" - var/desc = "You shouldn't be seeing this." - var/important_information //Big red text. Should only be used if not following it would incur a bwoink. + var/name = "generic origin item" + var/desc = "You shouldn't be seeing this." + var/important_information //Big red text. Should only be used if not following it would incur a bwoink. + var/list/origin_traits = list() + /// Format for the following list: "Characters from this origin: [list entry], [list entry]." + /// One list item per trait. + var/list/origin_traits_descriptions = list() /singleton/origin_item/culture - name = "generic culture" - desc = "You shouldn't be seeing this." - var/list/singleton/origin_item/origin/possible_origins = list() + name = "generic culture" + desc = "You shouldn't be seeing this." + var/list/singleton/origin_item/origin/possible_origins = list() /singleton/origin_item/origin - name = "generic origin" - desc = "You shouldn't be seeing this." - var/list/datum/accent/possible_accents = list() - var/list/datum/citizenship/possible_citizenships = list() - var/list/datum/religion/possible_religions = list() \ No newline at end of file + name = "generic origin" + desc = "You shouldn't be seeing this." + var/list/datum/accent/possible_accents = list() + var/list/datum/citizenship/possible_citizenships = list() + var/list/datum/religion/possible_religions = list() + +/singleton/origin_item/proc/on_apply(var/mob/living/carbon/human/H) + for(var/trait in origin_traits) + ADD_TRAIT(H, trait, CULTURE_TRAIT) diff --git a/code/modules/background/origins/origins/human/coalition.dm b/code/modules/background/origins/origins/human/coalition.dm index d6b88b5fb3e..d43601db865 100644 --- a/code/modules/background/origins/origins/human/coalition.dm +++ b/code/modules/background/origins/origins/human/coalition.dm @@ -30,6 +30,8 @@ possible_accents = list(ACCENT_HIMEO) possible_citizenships = CITIZENSHIPS_COALITION possible_religions = RELIGIONS_COALITION + origin_traits = list(TRAIT_ORIGIN_COLD_RESISTANCE, TRAIT_ORIGIN_LIGHT_SENSITIVE) + origin_traits_descriptions = list("are more acclimatised to the cold.", "are more sensitive to bright lights") /singleton/origin_item/origin/vysoka name = "Vysoka" @@ -53,6 +55,11 @@ possible_accents = list(ACCENT_GADPATHUR) possible_citizenships = list(CITIZENSHIP_COALITION) possible_religions = list(RELIGION_NONE, RELIGION_CHRISTIANITY, RELIGION_ISLAM, RELIGION_BUDDHISM, RELIGION_HINDU, RELIGION_TAOISM, RELIGION_JUDAISM, RELIGION_OTHER) + origin_traits = list(TRAIT_ORIGIN_LIGHT_SENSITIVE) + origin_traits_descriptions = list("have a small resistance to radiation", "are more sensitive to bright lights") + +/singleton/origin_item/origin/gadpathur/on_apply(var/mob/living/carbon/human/H) + H.AddComponent(/datum/component/armor, list(rad = ARMOR_RAD_MINOR)) /singleton/origin_item/origin/gadpathur_exile name = "Gadpathurian Exile" @@ -60,6 +67,11 @@ possible_accents = list(ACCENT_GADPATHUR) possible_citizenships = list(CITIZENSHIP_COALITION, CITIZENSHIP_BIESEL) possible_religions = RELIGIONS_COALITION + origin_traits = list(TRAIT_ORIGIN_LIGHT_SENSITIVE) + origin_traits_descriptions = list("have a small resistance to radiation", "are more sensitive to bright lights") + +/singleton/origin_item/origin/gadpathur_exile/on_apply(var/mob/living/carbon/human/H) + H.AddComponent(/datum/component/armor, list(rad = ARMOR_RAD_MINOR)) /singleton/origin_item/origin/assunzione name = "Republic of Assunzione" @@ -68,6 +80,8 @@ possible_accents = list(ACCENT_ASSUNZIONE) possible_citizenships = CITIZENSHIPS_COALITION possible_religions = list(RELIGION_LUCEISM) + origin_traits = list(TRAIT_ORIGIN_DARK_AFRAID) + origin_traits_descriptions = list("tend to feel nervous in the dark") /singleton/origin_item/origin/non_coalition_frontier name = "Non-Coalition Frontier" diff --git a/code/modules/background/origins/origins/human/dominia.dm b/code/modules/background/origins/origins/human/dominia.dm index 705ed1d50f3..825cdc00e20 100644 --- a/code/modules/background/origins/origins/human/dominia.dm +++ b/code/modules/background/origins/origins/human/dominia.dm @@ -18,6 +18,8 @@ possible_accents = list(ACCENT_DOMINIA_VULGAR, ACCENT_DOMINIA_HIGH, ACCENT_FISANDUH) possible_citizenships = CITIZENSHIPS_DOMINIA possible_religions = list(RELIGION_MOROZ) + origin_traits = list(TRAIT_ORIGIN_COLD_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the cold.") /singleton/origin_item/origin/fisanduh name = "Fisanduh" @@ -25,6 +27,8 @@ possible_accents = list(ACCENT_FISANDUH) possible_citizenships = list(CITIZENSHIP_DOMINIA, CITIZENSHIP_BIESEL, CITIZENSHIP_COALITION, CITIZENSHIP_SOL) possible_religions = list(RELIGION_MOROZ, RELIGION_NONE, RELIGION_CHRISTIANITY, RELIGION_ISLAM, RELIGION_BUDDHISM, RELIGION_HINDU, RELIGION_TAOISM, RELIGION_JUDAISM, RELIGION_SHINTO, RELIGION_OTHER) + origin_traits = list(TRAIT_ORIGIN_COLD_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the cold.") /singleton/origin_item/origin/imperial_core_worlds name = "Imperial Core Worlds" @@ -39,6 +43,8 @@ possible_accents = list(ACCENT_DOMINIA_NOVIJADRAN) possible_citizenships = CITIZENSHIPS_DOMINIA possible_religions = list(RELIGION_MOROZ) + origin_traits = list(TRAIT_ORIGIN_COLD_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the cold.") /singleton/origin_item/origin/imperial_frontier name = "Imperial Frontier" @@ -54,3 +60,5 @@ possible_accents = list(ACCENT_DOMINIA_VULGAR, ACCENT_DOMINIA_HIGH) possible_citizenships = list(CITIZENSHIP_BIESEL, CITIZENSHIP_COALITION) possible_religions = list(RELIGION_MOROZ, RELIGION_NONE, RELIGION_CHRISTIANITY, RELIGION_ISLAM, RELIGION_BUDDHISM, RELIGION_HINDU, RELIGION_TAOISM, RELIGION_JUDAISM, RELIGION_SHINTO, RELIGION_OTHER) + origin_traits = list(TRAIT_ORIGIN_COLD_RESISTANCE) //they're all Morozi anyway + origin_traits_descriptions = list("are more acclimatised to the cold.") \ No newline at end of file diff --git a/code/modules/background/origins/origins/human/elyra.dm b/code/modules/background/origins/origins/human/elyra.dm index 1633e246ece..360858ca584 100644 --- a/code/modules/background/origins/origins/human/elyra.dm +++ b/code/modules/background/origins/origins/human/elyra.dm @@ -19,6 +19,8 @@ possible_accents = list(ACCENT_PERSEPOLIS) possible_citizenships = list(CITIZENSHIP_ELYRA) possible_religions = RELIGIONS_ELYRA + origin_traits = list(TRAIT_ORIGIN_HOT_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the heat.") /singleton/origin_item/origin/damascus name = "Damascus II" @@ -26,6 +28,8 @@ possible_accents = list(ACCENT_DAMASCUS) possible_citizenships = list(CITIZENSHIP_ELYRA) possible_religions = RELIGIONS_ELYRA + origin_traits = list(TRAIT_ORIGIN_HOT_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the heat.") /singleton/origin_item/origin/medina name = "Medina" @@ -33,6 +37,8 @@ possible_accents = list(ACCENT_MEDINA) possible_citizenships = list(CITIZENSHIP_ELYRA) possible_religions = RELIGIONS_ELYRA + origin_traits = list(TRAIT_ORIGIN_HOT_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the heat.") /singleton/origin_item/origin/aemaq name = "Aemaq" @@ -40,6 +46,8 @@ possible_accents = list(ACCENT_AEMAQ) possible_citizenships = list(CITIZENSHIP_ELYRA) possible_religions = RELIGIONS_ELYRA + origin_traits = list(TRAIT_ORIGIN_HOT_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the heat.") /singleton/origin_item/origin/new_suez name = "New Suez" diff --git a/code/modules/background/origins/origins/human/sol.dm b/code/modules/background/origins/origins/human/sol.dm index 3c908beec86..6e905356fb8 100644 --- a/code/modules/background/origins/origins/human/sol.dm +++ b/code/modules/background/origins/origins/human/sol.dm @@ -8,11 +8,13 @@ /singleton/origin_item/origin/sol_system, /singleton/origin_item/origin/earth, /singleton/origin_item/origin/luna, - /singleton/origin_item/origin/venus, + /singleton/origin_item/origin/venus_c, + /singleton/origin_item/origin/venus_j, /singleton/origin_item/origin/mars, /singleton/origin_item/origin/jupiter, /singleton/origin_item/origin/pluto, /singleton/origin_item/origin/eridani, + /singleton/origin_item/origin/eridani_dreg, /singleton/origin_item/origin/middle_ring, /singleton/origin_item/origin/new_hai_phong, /singleton/origin_item/origin/silversun, @@ -46,10 +48,19 @@ possible_citizenships = CITIZENSHIPS_SOLARIAN possible_religions = RELIGIONS_SOLARIAN -/singleton/origin_item/origin/venus - name = "Venus" +/singleton/origin_item/origin/venus_c + name = "Venus, Cytherea" desc = "Venus is the cultural capital of the Alliance, and its residents mostly dwell in floating settlements referred to as \"aerostats.\" While wealthy and culturally rich, Venus is deeply divided between Cythereans, those involved in the cultural industry, and Jintarians, those involved in other industries. Cytherean culture is well known throughout the Orion Spur, and is typically stereotyped as hedonistic." - possible_accents = list(ACCENT_VENUS, ACCENT_VENUSJIN) + possible_accents = list(ACCENT_VENUS) + possible_citizenships = CITIZENSHIPS_SOLARIAN + possible_religions = RELIGIONS_SOLARIAN + origin_traits = list(TRAIT_ORIGIN_ALCOHOL_RESISTANCE, TRAIT_ORIGIN_DRUG_RESISTANCE) + origin_traits_descriptions = list("have a higher alcoholic tolerance", "have a higher tolerance to recreative drugs") + +/singleton/origin_item/origin/venus_j + name = "Venus, Jintaria" + desc = "Venus is the cultural capital of the Alliance, and its residents mostly dwell in floating settlements referred to as \"aerostats.\" While wealthy and culturally rich, Venus is deeply divided between Cythereans, those involved in the cultural industry, and Jintarians, those involved in other industries. Jintarian culture can often be defined as the polar opposite of Cytherean culture in many facets, but it borrows as much as it opposes." + possible_accents = list(ACCENT_VENUSJIN) possible_citizenships = CITIZENSHIPS_SOLARIAN possible_religions = RELIGIONS_SOLARIAN @@ -79,9 +90,21 @@ name = "Eridani Corporate Federation" desc = "The Eridani Corporate Federation is an autonomous member of the Solarian Alliance that is infamous abroad for its starkly divided society and extreme levels of corporate involvement in daily life. Corporations touch every aspect of Eridani, and its society is divided between corporate \"Suits\" that work for its companies and non-citizen \"Dregs\" that live off the scraps of society. Between the two, \"Reinstated Dregs\" chart an awkward balance: too corporate to be Dregs, but not corporate enough to be Suits." important_information = "Due to Epsilon Eridani being originally settled by colonists of West and Central African descent, human characters born in the Eridani Corporate Federation must have names and appearances consistent with the indigenous peoples of these regions as any human moving to the ECF would assimilate into the dominant cultures and ethnic groups of the federation. Eridani dregs have developed cultures of abstract or unconventional names however and this is tolerated. Only native Eridanians may select the Eridanian accents. This is enforceable by server moderators and admins." - possible_accents = list(ACCENT_ERIDANI, ACCENT_ERIDANIDREG, ACCENT_ERIDANIREINSTATED) + possible_accents = list(ACCENT_ERIDANI, ACCENT_ERIDANIREINSTATED) possible_citizenships = list(CITIZENSHIP_ERIDANI, CITIZENSHIP_COALITION, CITIZENSHIP_BIESEL) possible_religions = RELIGIONS_SOLARIAN + origin_traits = list(TRAIT_ORIGIN_NO_ANIMAL_PROTEIN) + origin_traits_descriptions = list("get sick if they eat animal protein that isn't tofu or seafood") + +/singleton/origin_item/origin/eridani_dreg + name = "Eridani Corporate Federation Dreg" + desc = "The Eridani Corporate Federation is an autonomous member of the Solarian Alliance that is infamous abroad for its starkly divided society and extreme levels of corporate involvement in daily life. Referred to as Dregs by the Spur at large, the term has been co-opted by many as a badge of honor rather than a pejorative. Whether an individual was born outside the great Eridanian skyscrapers or sent there following the loss of their job, Dreg society is the polar opposite of their Suit counterpart. Without corporate control or any form of governance from the Eridanian state itself, the Dregs largely inhabit their own sprawling, slum-like conurbations all across the surface of Eridani's terrestrial worlds." + important_information = "Due to Epsilon Eridani being originally settled by colonists of West and Central African descent, human characters born in the Eridani Corporate Federation must have names and appearances consistent with the indigenous peoples of these regions as any human moving to the ECF would assimilate into the dominant cultures and ethnic groups of the federation. Eridani dregs have developed cultures of abstract or unconventional names however and this is tolerated. Only native Eridanians may select the Eridanian accents. This is enforceable by server moderators and admins." + possible_accents = list(ACCENT_ERIDANIDREG) + possible_citizenships = list(CITIZENSHIP_COALITION, CITIZENSHIP_BIESEL) + possible_religions = RELIGIONS_SOLARIAN + origin_traits = list(TRAIT_ORIGIN_NO_ANIMAL_PROTEIN, TRAIT_ORIGIN_TOX_RESISTANCE, TRAIT_ORIGIN_DRUG_RESISTANCE) + origin_traits_descriptions = list("get sick if they eat animal protein that isn't tofu or seafood", "have a higher resistance to toxins", "have a higher tolerance to recreative drugs") /singleton/origin_item/origin/middle_ring name = "Middle Ring" @@ -97,6 +120,8 @@ possible_accents = list(ACCENT_PHONG) possible_citizenships = list(CITIZENSHIP_SOL, CITIZENSHIP_BIESEL, CITIZENSHIP_COALITION) possible_religions = RELIGIONS_SOLARIAN + origin_traits = list(TRAIT_ORIGIN_IGNORE_CAPSAICIN) + origin_traits_descriptions = list("are not affected by spicy foods") /singleton/origin_item/origin/silversun name = "Silversun" @@ -104,6 +129,8 @@ possible_accents = list(ACCENT_SILVERSUN_ORIGINAL, ACCENT_SILVERSUN_EXPATRIATE) possible_citizenships = CITIZENSHIPS_SOLARIAN possible_religions = RELIGIONS_SOLARIAN + origin_traits = list(TRAIT_ORIGIN_HOT_RESISTANCE) + origin_traits_descriptions = list("are more acclimatised to the heat") /singleton/origin_item/origin/outer_ring name = "Outer Ring" @@ -127,6 +154,8 @@ possible_accents = list(ACCENT_VISEGRAD) possible_citizenships = list(CITIZENSHIP_SOL, CITIZENSHIP_BIESEL, CITIZENSHIP_COALITION) possible_religions = RELIGIONS_SOLARIAN + origin_traits = list(TRAIT_ORIGIN_IGNORE_CAPSAICIN, TRAIT_ORIGIN_COLD_RESISTANCE) + origin_traits_descriptions = list("are not affected by spicy foods", "are more acclimatised to the cold") /singleton/origin_item/origin/mictlan name = "Mictlan" @@ -135,6 +164,8 @@ possible_accents = list(ACCENT_MICTLAN) possible_citizenships = list(CITIZENSHIP_SOL, CITIZENSHIP_BIESEL) possible_religions = RELIGIONS_SOLARIAN + origin_traits = list(TRAIT_ORIGIN_IGNORE_CAPSAICIN) + origin_traits_descriptions = list("are not affected by spicy foods") /singleton/origin_item/origin/antillia name = "Port Antillia" diff --git a/code/modules/client/preference_setup/origin/origin.dm b/code/modules/client/preference_setup/origin/origin.dm index e5859128271..ccc8e72364c 100644 --- a/code/modules/client/preference_setup/origin/origin.dm +++ b/code/modules/client/preference_setup/origin/origin.dm @@ -100,11 +100,17 @@ var/singleton/origin_item/culture/CL = GET_SINGLETON(text2path(pref.culture)) var/singleton/origin_item/origin/OR = GET_SINGLETON(text2path(pref.origin)) dat += "Culture: [CL.name]
" - dat += "- [CL.desc]" + dat += "- [CL.desc]

" + if(length(CL.origin_traits_descriptions)) + dat += "- Characters from this culture " + dat += "[english_list(CL.origin_traits_descriptions)]." if(CL.important_information) dat += "
- [CL.important_information]" dat += "
Origin: [OR.name]
" - dat += "- [OR.desc]" + dat += "- [OR.desc]
" + if(length(OR.origin_traits_descriptions)) + dat += "- Characters from this origin " + dat += "[english_list(OR.origin_traits_descriptions)]." if(OR.important_information) dat += "
- [OR.important_information]" dat += "
" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 4cc24e11f46..c2630a93140 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -467,6 +467,8 @@ datum/preferences character.accent = accent character.origin = GET_SINGLETON(text2path(origin)) character.culture = GET_SINGLETON(text2path(culture)) + character.origin.on_apply(character) + character.culture.on_apply(character) character.skills = skills character.used_skillpoints = used_skillpoints diff --git a/code/modules/mob/living/carbon/human/intoxication.dm b/code/modules/mob/living/carbon/human/intoxication.dm index 670fe848a94..ee1e9e01204 100644 --- a/code/modules/mob/living/carbon/human/intoxication.dm +++ b/code/modules/mob/living/carbon/human/intoxication.dm @@ -8,6 +8,9 @@ intoxication = 0 return + if(HAS_TRAIT(src, TRAIT_ORIGIN_ALCOHOL_RESISTANCE)) + SR = 1.5 + //Godmode messes some things up, so no more BSTs getting drunk unless they toggle it off if (status_flags & GODMODE) intoxication = 0 //Zero out intoxication but don't return, let the rest of this function run to remove any residual effects diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 28c32523c3f..9cd2526b5cd 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -359,8 +359,15 @@ var/relative_density = environment.total_moles / MOLES_CELLSTANDARD bodytemperature += between(BODYTEMP_COOLING_MAX, temp_adj*relative_density, BODYTEMP_HEATING_MAX) + var/cold_bonus = 0 + var/hot_bonus = 0 + if(HAS_TRAIT(src, TRAIT_ORIGIN_COLD_RESISTANCE)) + cold_bonus = 20 + if(HAS_TRAIT(src, TRAIT_ORIGIN_HOT_RESISTANCE)) + hot_bonus = 20 + // +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt. - if(bodytemperature >= species.heat_level_1) + if(bodytemperature >= (species.heat_level_1 + hot_bonus)) //Body temperature is too hot. fire_alert = max(fire_alert, 1) if(status_flags & GODMODE) return 1 //godmode @@ -374,7 +381,7 @@ take_overall_damage(burn = burn_dam, used_weapon = "extreme heat") fire_alert = max(fire_alert, 2) - else if(bodytemperature <= species.cold_level_1) + else if(bodytemperature <= (species.cold_level_1 - cold_bonus)) fire_alert = max(fire_alert, 1) if(status_flags & GODMODE) return 1 @@ -1137,6 +1144,28 @@ if (T.get_lumcount() < 0.01) // give a little bit of tolerance for near-dark areas. playsound_simple(null, pick(scarySounds), 50, TRUE) + if(HAS_TRAIT(src, TRAIT_ORIGIN_DARK_AFRAID)) + if(T.get_lumcount() < 0.1) + if(prob(2)) + var/list/assunzione_messages = list( + "You feel a bit afraid...", + "You feel somewhat nervous...", + "You could use a little light here...", + "Ennoia be with you, it's a bit too dark..." + ) + to_chat(src, SPAN_WARNING(pick(assunzione_messages))) + + if(HAS_TRAIT(src, TRAIT_ORIGIN_LIGHT_SENSITIVE)) + if(T.get_lumcount() > 0.8) + if(prob(1)) + if(prob(5)) + var/list/eye_sensitivity_messages = list( + "Your eyes tire a bit.", + "Your eyes sting a little.", + "Your vision feels a bit strained." + ) + to_chat(src, SPAN_WARNING(pick(eye_sensitivity_messages))) + /mob/living/carbon/human/proc/handle_changeling() if(mind) var/datum/changeling/changeling = mind.antag_datums[MODE_CHANGELING] diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 513737f1186..4e8f3567368 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -134,6 +134,7 @@ if(new_culture_id in valid_cultures) var/singleton/origin_item/culture/new_culture = valid_cultures[new_culture_id] owner.culture = new_culture + owner.culture.on_apply(owner) if(!(owner.origin in new_culture.possible_origins)) owner.origin = GET_SINGLETON(pick(new_culture.possible_origins)) clear_and_generate_data() @@ -144,6 +145,7 @@ if(new_origin_id in valid_origins) var/singleton/origin_item/origin/new_origin = valid_origins[new_origin_id] owner.origin = new_origin + owner.origin.on_apply(owner) if(!(owner.accent in new_origin.possible_accents)) owner.accent = new_origin.possible_accents[1] if(!(owner.religion in new_origin.possible_religions)) diff --git a/code/modules/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm index b783d2ee52f..be383e3f6f0 100644 --- a/code/modules/organs/internal/eyes.dm +++ b/code/modules/organs/internal/eyes.dm @@ -43,6 +43,9 @@ to_chat(owner, "You go blind!") /obj/item/organ/internal/eyes/proc/flash_act() + if(HAS_TRAIT(owner, TRAIT_ORIGIN_LIGHT_SENSITIVE)) + to_chat(owner, SPAN_WARNING("Your eyes burn with the intense light of the flash!")) + take_damage(4) return /obj/item/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var. diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm index 3febc5d9eb9..704eca25d7a 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Drugs.dm @@ -19,6 +19,8 @@ M.add_chemical_effect(CE_PULSE, -1) var/power = (M.chem_doses[type] + REAGENT_VOLUME(holder, type))/2 //Larger the dose and volume, the more affected you are by the chemical. + if(HAS_TRAIT(M, TRAIT_ORIGIN_DRUG_RESISTANCE)) + power = max(power - 2, 0) M.druggy = max(M.druggy, power) M.add_chemical_effect(CE_PAINKILLER, 5 + round(power,5)) @@ -141,6 +143,8 @@ M.druggy = max(M.druggy, 30) M.add_chemical_effect(CE_HALLUCINATE, 1) var/dose = M.chem_doses[type] + if(HAS_TRAIT(M, TRAIT_ORIGIN_DRUG_RESISTANCE)) + dose = max(dose - 2, 0) if(dose < 1) M.apply_effect(3, STUTTER) M.make_dizzy(5) @@ -399,6 +403,8 @@ M.add_chemical_effect(CE_PULSE, -1) var/power = (M.chem_doses[type] + REAGENT_VOLUME(holder, type))/2 //Larger the dose and volume, the more affected you are by the chemical. + if(HAS_TRAIT(M, TRAIT_ORIGIN_DRUG_RESISTANCE)) + power = max(power - 5, 0) M.add_chemical_effect(CE_PAINKILLER, 5 + round(power,5)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 2b7c596b164..4d91da86854 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -213,32 +213,46 @@ color = "#440000" blood_factor = 3 taste_description = "some sort of protein" + var/vegan = FALSE /singleton/reagent/nutriment/protein/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) if(alien && alien == IS_UNATHI) digest(M,removed, holder = holder) return + if(HAS_TRAIT(M, TRAIT_ORIGIN_NO_ANIMAL_PROTEIN) && !vegan) + if(prob(2)) + var/list/uncomfortable_messages = list( + "You shouldn't have eaten that...", + "Your stomach cramps!", + "Your stomach hurts a bit...", + "You feel a bit sick..." + ) + to_chat(M, SPAN_WARNING(uncomfortable_messages)) ..() /singleton/reagent/nutriment/protein/tofu //Good for Skrell! name = "Tofu Protein" color = "#fdffa8" taste_description = "tofu" + vegan = TRUE /singleton/reagent/nutriment/protein/seafood // Good for Skrell! name = "Seafood Protein" color = "#f5f4e9" taste_description = "fish" + vegan = TRUE /singleton/reagent/nutriment/protein/seafood/mollusc name = "Mollusc Protein" taste_description = "cold, bitter slime" hydration_factor = 6 + vegan = TRUE /singleton/reagent/nutriment/protein/seafood/cosmozoan name = "Cosmozoan Protein" taste_description = "cold, bitter slime" hydration_factor = 8 + vegan = TRUE /singleton/reagent/nutriment/protein/seafood/cosmozoan/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) M.add_chemical_effect(CE_PAINKILLER, 10) @@ -761,6 +775,8 @@ M.adjustToxLoss(0.5 * removed) /singleton/reagent/capsaicin/initial_effect(var/mob/living/carbon/M, var/alien) + if(HAS_TRAIT(M, TRAIT_ORIGIN_IGNORE_CAPSAICIN)) + return to_chat(M, discomfort_message) /singleton/reagent/capsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) @@ -769,8 +785,12 @@ if(!H.can_feel_pain()) return + if(HAS_TRAIT(H, TRAIT_ORIGIN_IGNORE_CAPSAICIN)) + return + if(M.chem_doses[type] >= agony_dose && prob(5)) to_chat(M, discomfort_message) + M.visible_message("[M] [pick("dry heaves!", "coughs!", "splutters!")]") M.apply_effect(agony_amount, PAIN, 0) @@ -832,7 +852,7 @@ if (!mouth_covered && (eyes_covered & EYES_PROTECTED)) message = "Your [eye_protection] protects your eyes from the pepperspray!" else if (eyes_covered & EYES_MECH) - message = "Your mechanical eyes are invulnurable to pepperspray!" + message = "Your mechanical eyes are invulnerable to pepperspray!" else message = "The pepperspray gets in your eyes!" if(mouth_covered) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 2dccb792fa0..375f46d8c6d 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -17,6 +17,8 @@ /singleton/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) if(strength && alien != IS_DIONA) var/dam = (strength * removed) + if(HAS_TRAIT(M, TRAIT_ORIGIN_TOX_RESISTANCE)) + dam = max(dam - 1, 1) if(ishuman(M)) var/mob/living/carbon/human/H = M if(target_organ) diff --git a/html/changelogs/mattatlas-xltt.yml b/html/changelogs/mattatlas-xltt.yml new file mode 100644 index 00000000000..82d0df0616e --- /dev/null +++ b/html/changelogs/mattatlas-xltt.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a way for Origins to give the character one or more mechanical traits. Currently only implemented for some human origins: New Hai Phong, Visegrad, Mictlan, most Dominian origins, Assunzione, Himeo, most Elyran origins, to name a few." + - tweak: "Split the Venusian Cytherean and Jintarian origins." + - tweak: "Split the Eridani Citizen and Dreg origins."