diff --git a/code/__DEFINES/quirks.dm b/code/__DEFINES/quirks.dm new file mode 100644 index 00000000..202546ae --- /dev/null +++ b/code/__DEFINES/quirks.dm @@ -0,0 +1,12 @@ +//Hyperstation, used to help categorize traits +#define CATEGORY_UNCATEGORIZED "Uncategorized" //Uncategorized quirks always appear last +#define CATEGORY_ALCOHOL "Alcohol" +#define CATEGORY_MOODS "Moods" +#define CATEGORY_MOVEMENT "Movement" +#define CATEGORY_ITEMS "Items" +#define CATEGORY_HEALTH "Health" +#define CATEGORY_FOOD "Food" +#define CATEGORY_LANGUAGES "Languages" +#define CATEGORY_BODY "Body Modification" +#define CATEGORY_GAMEPLAY "Gameplay-Affecting" +#define CATEGORY_SEXUAL "Sexual" //Can't come up with something less vulgar diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 81d70c58..67745c90 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -10,6 +10,8 @@ PROCESSING_SUBSYSTEM_DEF(quirks) var/list/quirks = list() //Assoc. list of all roundstart quirk datum types; "name" = /path/ var/list/quirk_names_by_path = list() + var/list/quirk_categories = list() //Hyper edit: Quirks are sorted by different categories + var/list/quirks_sorted = list() //Hyper edit: Sort quirks by category then cost var/list/quirk_points = list() //Assoc. list of quirk names and their "point cost"; positive numbers are good traits, and negative ones are bad var/list/quirk_objects = list() //A list of all quirk objects in the game, since some may process var/list/quirk_blacklist = list() //A list a list of quirks that can not be used with each other. Format: list(quirk1,quirk2),list(quirk3,quirk4) @@ -17,7 +19,15 @@ PROCESSING_SUBSYSTEM_DEF(quirks) /datum/controller/subsystem/processing/quirks/Initialize(timeofday) if(!quirks.len) SetupQuirks() - quirk_blacklist = list(list("Blind","Nearsighted"),list("Jolly","Depression","Hypersensitive"),list("Ageusia","Vegetarian","Deviant Tastes"),list("Ananas Affinity","Ananas Aversion"),list("Alcohol Tolerance","Light Drinker"),list("Prosthetic Limb (Left Arm)","Prosthetic Limb (Right Arm)","Prosthetic Limb (Left Leg)","Prosthetic Limb (Right Leg)","Prosthetic Limb"),list("Social Anxiety","Mute")) + quirk_blacklist = list( + list("Blind","Nearsighted"), + list("Jolly","Depression","Hypersensitive"), + list("Ageusia","Vegetarian","Deviant Tastes"), + list("Ananas Affinity","Ananas Aversion"), + list("Alcohol Tolerance","Light Drinker"), + list("Social Anxiety","Mute"), + list("Prosthetic Limb (Left Arm)","Prosthetic Limb (Right Arm)","Prosthetic Limb (Left Leg)","Prosthetic Limb (Right Leg)","Prosthetic Limb") + ) return ..() /datum/controller/subsystem/processing/quirks/proc/SetupQuirks() @@ -29,6 +39,24 @@ PROCESSING_SUBSYSTEM_DEF(quirks) quirks[initial(T.name)] = T quirk_points[initial(T.name)] = initial(T.value) quirk_names_by_path[T] = initial(T.name) + if(initial(T.category) != CATEGORY_UNCATEGORIZED) //Hyperstation Edit: Categorized quirks + quirk_categories[initial(T.category)] = 1 + SortQuirks() + +/datum/controller/subsystem/processing/quirks/proc/SortQuirks() //Hyperstation edit: Categorized quirks + quirks_sorted = list() + quirk_categories = sortList(quirk_categories) + var/list/uncategorized = list() + for(var/C in quirk_categories) + quirks_sorted[C] = list() + for(var/V in quirks) //These are already sorted by name and cost + var/datum/quirk/Q = quirks[V] + if(initial(Q.category) == C) + quirks_sorted[C] += initial(Q.name) + else if (initial(Q.category) == CATEGORY_UNCATEGORIZED) + uncategorized += initial(Q.name) + for(var/C in uncategorized) + quirks_sorted[CATEGORY_UNCATEGORIZED] += C /datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/cli, spawn_effects, roundstart = FALSE, datum/job/job, silent = FALSE, mob/to_chat_target) var/badquirk = FALSE diff --git a/code/datums/traits/_quirk.dm b/code/datums/traits/_quirk.dm index 12e34b0c..6ca240b1 100644 --- a/code/datums/traits/_quirk.dm +++ b/code/datums/traits/_quirk.dm @@ -4,6 +4,7 @@ var/name = "Test Quirk" var/desc = "This is a test quirk." var/value = 0 + var/category = "Uncategorized" //Hyper change: Sort quirks into categories var/human_only = TRUE var/gain_text var/lose_text diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index 6bee3b8a..b1e073b9 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -5,6 +5,7 @@ name = "Alcohol Tolerance" desc = "You become drunk more slowly and suffer fewer drawbacks from alcohol." value = 1 + category = CATEGORY_ALCOHOL mob_trait = TRAIT_ALCOHOL_TOLERANCE gain_text = "You feel like you could drink a whole keg!" lose_text = "You don't feel as resistant to alcohol anymore. Somehow." @@ -14,6 +15,7 @@ name = "Apathetic" desc = "You just don't care as much as other people. That's nice to have in a place like this, I guess." value = 1 + category = CATEGORY_MOODS mood_quirk = TRUE medical_record_text = "Patient was administered the Apathy Evaluation Scale but did not bother to complete it." @@ -32,6 +34,7 @@ name = "Drunken Resilience" desc = "Nothing like a good drink to make you feel on top of the world. Whenever you're drunk, you slowly recover from injuries." value = 2 + category = CATEGORY_ALCOHOL mob_trait = TRAIT_DRUNK_HEALING gain_text = "You feel like a drink would do you good." lose_text = "You no longer feel like drinking would ease your pain." @@ -41,6 +44,7 @@ name = "Empath" desc = "Whether it's a sixth sense or careful study of body language, it only takes you a quick glance at someone to understand how they feel." value = 2 + category = CATEGORY_MOODS mob_trait = TRAIT_EMPATH gain_text = "You feel in tune with those around you." lose_text = "You feel isolated from others." @@ -50,6 +54,7 @@ name = "Freerunning" desc = "You're great at quick moves! You can climb tables more quickly." value = 2 + category = CATEGORY_MOVEMENT mob_trait = TRAIT_FREERUNNING gain_text = "You feel lithe on your feet!" lose_text = "You feel clumsy again." @@ -59,6 +64,7 @@ name = "Friendly" desc = "You give the best hugs, especially when you're in the right mood." value = 1 + category = CATEGORY_MOODS mob_trait = TRAIT_FRIENDLY gain_text = "You want to hug someone." lose_text = "You no longer feel compelled to hug others." @@ -69,6 +75,7 @@ name = "Jolly" desc = "You sometimes just feel happy, for no reason at all." value = 1 + category = CATEGORY_MOODS mob_trait = TRAIT_JOLLY mood_quirk = TRUE medical_record_text = "Patient demonstrates constant euthymia irregular for environment. It's a bit much, to be honest." @@ -81,6 +88,7 @@ name = "Light Step" desc = "You walk with a gentle step; stepping on sharp objects is quieter, less painful and you won't leave footprints behind you." value = 1 + category = CATEGORY_MOVEMENT mob_trait = TRAIT_LIGHT_STEP gain_text = "You walk with a little more litheness." lose_text = "You start tromping around like a barbarian." @@ -90,6 +98,7 @@ name = "Quick Step" desc = "You walk with determined strides, and out-pace most people when walking." value = 2 + category = CATEGORY_MOVEMENT mob_trait = TRAIT_SPEEDY_STEP gain_text = "You feel determined. No time to lose." lose_text = "You feel less determined. What's the rush, man?" @@ -99,6 +108,7 @@ name = "Musician" desc = "You can tune handheld musical instruments to play melodies that clear certain negative effects and soothe the soul." value = 1 + category = CATEGORY_ITEMS mob_trait = TRAIT_MUSICIAN gain_text = "You know everything about musical instruments." lose_text = "You forget how musical instruments work." @@ -126,6 +136,7 @@ name = "Night Vision" desc = "You can see slightly more clearly in full darkness than most people." value = 1 + category = CATEGORY_BODY mob_trait = TRAIT_NIGHT_VISION gain_text = "The shadows seem a little less dark." lose_text = "Everything seems a little darker." @@ -141,6 +152,7 @@ name = "Photographer" desc = "You know how to handle a camera, shortening the delay between each shot." value = 1 + category = CATEGORY_ITEMS mob_trait = TRAIT_PHOTOGRAPHER gain_text = "You know everything about photography." lose_text = "You forget how photo cameras work." @@ -163,6 +175,7 @@ name = "Self-Aware" desc = "You know your body well, and can accurately assess the extent of your wounds." value = 2 + category = CATEGORY_HEALTH mob_trait = TRAIT_SELF_AWARE medical_record_text = "Patient demonstrates an uncanny knack for self-diagnosis." @@ -170,12 +183,14 @@ name = "Skittish" desc = "You can conceal yourself in danger. Ctrl-shift-click a closed locker to jump into it, as long as you have access." value = 2 + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_SKITTISH /datum/quirk/spiritual name = "Spiritual" desc = "You're in tune with the gods, and your prayers may be more likely to be heard. Or not." value = 1 + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_SPIRITUAL gain_text = "You feel a little more faithful to the gods today." lose_text = "You feel less faithful in the gods." @@ -185,6 +200,7 @@ name = "Tagger" desc = "You're an experienced artist. While drawing graffiti, you can get twice as many uses out of drawing supplies." value = 1 + category = CATEGORY_ITEMS mob_trait = TRAIT_TAGGER gain_text = "You know how to tag walls efficiently." lose_text = "You forget how to tag walls properly." @@ -206,6 +222,7 @@ name = "Voracious" desc = "Nothing gets between you and your food. You eat twice as fast as everyone else!" value = 1 + category = CATEGORY_FOOD mob_trait = TRAIT_VORACIOUS gain_text = "You feel HONGRY." lose_text = "You no longer feel HONGRY." @@ -215,6 +232,7 @@ name = "High Luminosity Eyes" desc = "When the next big fancy implant came out you had to buy one on impluse!" value = 1 + category = CATEGORY_BODY gain_text = "You have to keep up with the next big thing!." lose_text = "High-tech gizmos are a scam..." @@ -234,6 +252,7 @@ name = "Polycythemia vera" desc = "You've a treated form of Polycythemia vera that increases the total blood volume inside of you as well as the rate of replenishment!" value = 2 //I honeslty dunno if this is a good trait? I just means you use more of medbays blood and make janitors madder, but you also regen blood a lil faster. + category = CATEGORY_HEALTH mob_trait = TRAIT_HIGH_BLOOD gain_text = "You feel full of blood!" lose_text = "You feel like your blood pressure went down." @@ -251,6 +270,7 @@ name = "Tough" desc = "Your body is abnormally enduring and can take 10% more damage." value = 2 + category = CATEGORY_HEALTH mob_trait = TRAIT_TOUGH medical_record_text = "Patient has an abnormally high capacity for injury." gain_text = "You feel very sturdy." @@ -270,6 +290,7 @@ name = "Draconic speaker" desc = "Due to your time spent around lizards, you can speak Draconic!" value = 1 + category = CATEGORY_LANGUAGES gain_text = "You feel sensitive to hissing noises and your tongue curls comfortably." lose_text = "You forget how to speak Draconic!" @@ -285,6 +306,7 @@ name = "Slime speaker" desc = "Due to your time spent around slimes, you can speak Slimespeak!" value = 1 + category = CATEGORY_LANGUAGES gain_text = "You feel sensitive to blorbling noises, and your throat produces melodic sounds." lose_text = "You forget how to speak Slimespeak!" @@ -300,6 +322,7 @@ name = "Siik-Tajr speaker" desc = "Due to your time spent around Tajaran, you can speak their native tongue!" value = 1 + category = CATEGORY_LANGUAGES gain_text = "You feel sensitive to mrowls and your tongue curls comfortably." lose_text = "You forget how to speak Siik'Tajr!" @@ -315,6 +338,7 @@ name = "Neo-Russkiya speaker" desc = "Due to your time spent around space russians, you can speak Neo-Russkiya!" value = 1 + category = CATEGORY_LANGUAGES gain_text = "You feel sensitive to the motherland, blyat!" lose_text = "You forget how to speak Neo-Russkiya!" diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index 4f8ec5f9..c20c69e2 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -4,6 +4,7 @@ name = "Acute Blood Deficiency" desc = "Your body can't produce enough blood to sustain itself." value = -2 + category = CATEGORY_HEALTH gain_text = "You feel your vigor slowly fading away." lose_text = "You feel vigorous again." medical_record_text = "Patient requires regular treatment for blood loss due to low production of blood." @@ -18,8 +19,9 @@ /datum/quirk/depression name = "Depression" desc = "You sometimes just hate life." - mob_trait = TRAIT_DEPRESSION value = -1 + category = CATEGORY_MOODS + mob_trait = TRAIT_DEPRESSION gain_text = "You start feeling depressed." lose_text = "You no longer feel depressed." //if only it were that easy! medical_record_text = "Patient has a severe mood disorder, causing them to experience acute episodes of depression." @@ -33,6 +35,7 @@ name = "Family Heirloom" desc = "You are the current owner of an heirloom, passed down for generations. You have to keep it safe!" value = -1 + category = CATEGORY_ITEMS mood_quirk = TRUE medical_record_text = "Patient demonstrates an unnatural attachment to a family heirloom." var/obj/item/heirloom @@ -110,6 +113,7 @@ name = "Heavy Sleeper" desc = "You sleep like a rock! Whenever you're put to sleep, you sleep for a little bit longer." value = -1 + category = CATEGORY_HEALTH mob_trait = TRAIT_HEAVY_SLEEPER gain_text = "You feel sleepy." lose_text = "You feel awake again." @@ -119,6 +123,7 @@ name = "Hypersensitive" desc = "For better or worse, everything seems to affect your mood more than it should." value = -1 + category = CATEGORY_MOODS gain_text = "You seem to make a big deal out of everything." lose_text = "You don't seem to make a big deal out of everything anymore." mood_quirk = TRUE //yogs @@ -139,6 +144,7 @@ name = "Brain Tumor" desc = "You have a little friend in your brain that is slowly destroying it. Better bring some mannitol!" value = -3 + category = CATEGORY_HEALTH gain_text = "You feel smooth." lose_text = "You feel wrinkled again." medical_record_text = "Patient has a tumor in their brain that is slowly driving them to brain death." @@ -150,6 +156,7 @@ name = "Nearsighted" desc = "You are nearsighted without prescription glasses, but spawn with a pair." value = -1 + category = CATEGORY_BODY gain_text = "Things far away from you start looking blurry." lose_text = "You start seeing faraway things normally again." medical_record_text = "Patient requires prescription glasses in order to counteract nearsightedness." @@ -168,6 +175,7 @@ name = "Nyctophobia" desc = "As far as you can remember, you've always been afraid of the dark. While in the dark without a light source, you instinctually act careful, and constantly feel a sense of dread." value = -1 + category = CATEGORY_GAMEPLAY medical_record_text = "Patient demonstrates a fear of the dark. (Seriously?)" /datum/quirk/nyctophobia/on_process() @@ -188,6 +196,7 @@ name = "Light Sensitivity" desc = "Bright lights irritate you. Your eyes start to water, your skin feels itchy against the photon radiation, and your hair gets dry and frizzy. Maybe it's a medical condition. If only Kinaris was more considerate of your needs..." value = -1 + category = CATEGORY_BODY gain_text = "The safety of light feels off..." lose_text = "Enlightening." medical_record_text = "Despite my warnings, the patient refuses turn on the lights, only to end up rolling down a full flight of stairs and into the cellar." @@ -204,6 +213,7 @@ name = "Pacifist" desc = "The thought of violence makes you sick. So much so, in fact, that you can't hurt anyone." value = -2 + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_PACIFISM gain_text = "You feel repulsed by the thought of violence!" lose_text = "You think you can defend yourself again." @@ -218,6 +228,7 @@ name = "Paraplegic" desc = "Your legs do not function. Nothing will ever fix this. But hey, free wheelchair!" value = -3 + category = CATEGORY_MOVEMENT mob_trait = TRAIT_PARA human_only = TRUE gain_text = null // Handled by trauma. @@ -253,6 +264,7 @@ name = "Poor Aim" desc = "You're terrible with guns and can't line up a straight shot to save your life. Dual-wielding is right out." value = -1 + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_POOR_AIM medical_record_text = "Patient possesses a strong tremor in both hands." @@ -260,6 +272,7 @@ name = "Prosopagnosia" desc = "You have a mental disorder that prevents you from being able to recognize faces at all." value = -1 + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_PROSOPAGNOSIA medical_record_text = "Patient suffers from prosopagnosia and cannot recognize faces." @@ -267,6 +280,7 @@ name = "Prosthetic Limb" desc = "An accident caused you to lose one of your limbs. Because of this, you now have a random prosthetic!" value = -1 + category = CATEGORY_BODY var/slot_string = "limb" var/specific = null medical_record_text = "During physical examination, patient was found to have a prosthetic limb." @@ -308,6 +322,7 @@ name = "Reality Dissociation Syndrome" desc = "You suffer from a severe disorder that causes very vivid hallucinations. Mindbreaker toxin can suppress its effects, and you are immune to mindbreaker's hallucinogenic properties. This is not a license to grief." value = -2 + category = CATEGORY_GAMEPLAY //no mob trait because it's handled uniquely gain_text = "..." lose_text = "You feel in tune with the world again." @@ -353,6 +368,7 @@ name = "Social Anxiety" desc = "Talking to people is very difficult for you, and you often stutter or even lock up." value = -1 + category = CATEGORY_GAMEPLAY gain_text = "You start worrying about what you're saying." lose_text = "You feel easier about talking again." //if only it were that easy! medical_record_text = "Patient is usually anxious in social encounters and prefers to avoid them." @@ -381,6 +397,7 @@ name = "Phobia" desc = "You've had a traumatic past, one that has scarred you for life, and cripples you when dealing with your greatest fears." value = -2 // It can hardstun you. You can be a job that your phobia targets... + category = CATEGORY_GAMEPLAY gain_text = "You begin to tremble as an immeasurable fear grips your mind." lose_text = "Your confidence wipes away the fear that had been plaguing you." medical_record_text = "Patient has an extreme or irrational fear and aversion to an undefined stimuli." @@ -399,6 +416,7 @@ name = "Mute" desc = "Due to some accident, medical condition, or simply by choice, you are completely unable to speak." value = -2 //HALP MAINTS + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_MUTE gain_text = "You find yourself unable to speak!" lose_text = "You feel a growing strength in your vocal chords." @@ -420,6 +438,7 @@ name = "Unstable" desc = "Due to past troubles, you are unable to recover your sanity if you lose it. Be very careful managing your mood!" value = -2 + category = CATEGORY_MOODS mob_trait = TRAIT_UNSTABLE gain_text = "There's a lot on your mind right now." lose_text = "Your mind finally feels calm." @@ -430,6 +449,7 @@ name = "DNC" desc = "You have filed a Do Not Clone order, stating that you do not wish to be cloned. You can still be revived by other means." value = -2 + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_NEVER_CLONE medical_record_text = "Patient has a DNC (Do not clone) order on file, and cannot be cloned as a result." @@ -438,6 +458,7 @@ name = "Blind" desc = "You are completely blind, nothing can counteract this." value = -4 + category = CATEGORY_GAMEPLAY gain_text = "You can't see anything." lose_text = "You miraculously gain back your vision." medical_record_text = "Patient has permanent blindness." @@ -453,6 +474,7 @@ name = "Cold-blooded" desc = "Your body doesn't create its own internal heat, requiring external heat regulation." value = -2 + category = CATEGORY_GAMEPLAY medical_record_text = "Patient is ectothermic." mob_trait = TRAIT_COLDBLOODED gain_text = "You feel cold-blooded." @@ -462,6 +484,7 @@ name = "Flimsy" desc = "Your body is a little more fragile then most, decreasing total health by 20%." value = -2 + category = CATEGORY_HEALTH medical_record_text = "Patient has abnormally low capacity for injury." mob_trait = TRAIT_FLIMSY gain_text = "You feel like you could break with a single hit." diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm index 522c4fb8..18b2b4b6 100644 --- a/code/datums/traits/neutral.dm +++ b/code/datums/traits/neutral.dm @@ -5,6 +5,7 @@ name = "Ageusia" desc = "You can't taste anything! Toxic food will still poison you." value = 0 + category = CATEGORY_FOOD mob_trait = TRAIT_AGEUSIA gain_text = "You can't taste anything!" lose_text = "You can taste again!" @@ -14,6 +15,7 @@ name = "Vegetarian" desc = "You find the idea of eating meat morally and physically repulsive." value = 0 + category = CATEGORY_FOOD gain_text = "You feel repulsion at the idea of eating meat." lose_text = "You feel like eating meat isn't that bad." medical_record_text = "Patient reports a vegetarian diet." @@ -37,6 +39,7 @@ name = "Ananas Affinity" desc = "You find yourself greatly enjoying fruits of the ananas genus. You can't seem to ever get enough of their sweet goodness!" value = 0 + category = CATEGORY_FOOD gain_text = "You feel an intense craving for pineapple." lose_text = "Your feelings towards pineapples seem to return to a lukewarm state." medical_record_text = "Patient demonstrates a pathological love of pineapple." @@ -56,6 +59,7 @@ name = "Ananas Aversion" desc = "You find yourself greatly detesting fruits of the ananas genus. Serious, how the hell can anyone say these things are good? And what kind of madman would even dare putting it on a pizza!?" value = 0 + category = CATEGORY_FOOD gain_text = "You find yourself pondering what kind of idiot actually enjoys pineapples..." lose_text = "Your feelings towards pineapples seem to return to a lukewarm state." medical_record_text = "Patient is correct to think that pineapple is disgusting." @@ -75,6 +79,7 @@ name = "Deviant Tastes" desc = "You dislike food that most people enjoy, and find delicious what they don't." value = 0 + category = CATEGORY_FOOD gain_text = "You start craving something that tastes strange." lose_text = "You feel like eating normal food again." medical_record_text = "Patient demonstrates irregular nutrition preferences." @@ -97,6 +102,7 @@ name = "Monochromacy" desc = "You suffer from full colorblindness, and perceive nearly the entire world in blacks and whites." value = 0 + category = CATEGORY_GAMEPLAY medical_record_text = "Patient is afflicted with almost complete color blindness." /datum/quirk/monochromatic/add() @@ -116,6 +122,7 @@ desc = "You're one of the few people in the galaxy who are genetically immune to Crocin and Hexacrocin products and their addictive properties! However, you can still get brain damage from Hexacrocin addiction." mob_trait = TRAIT_CROCRIN_IMMUNE value = 0 + category = CATEGORY_SEXUAL gain_text = "You feel more prudish." lose_text = "You don't feel as prudish as before." medical_record_text = "Patient exhibits a special gene that makes them immune to Crocin and Hexacrocin." @@ -125,6 +132,7 @@ desc = "You've never skipped ass day. With this trait, you are completely immune to all forms of ass slapping and anyone who tries to slap your rock hard ass usually gets a broken hand." mob_trait = TRAIT_ASSBLASTUSA value = 0 + category = CATEGORY_SEXUAL medical_record_text = "Patient never skipped ass day." gain_text = "Your ass rivals those of golems." lose_text = "Your butt feels more squishy and slappable." @@ -134,6 +142,7 @@ desc = "You like headpats, alot, maybe even a little bit too much. Headpats give you a bigger mood boost and cause arousal" mob_trait = TRAIT_HEADPAT_SLUT value = 0 + category = CATEGORY_SEXUAL medical_record_text = "Patient seems overly affectionate." /datum/quirk/headpat_hater @@ -141,4 +150,5 @@ desc = "You don't seem to show much care for being touched. Whether it's because you're reserved or due to self control, you won't wag your tail outside of your own control should you possess one." mob_trait = TRAIT_DISTANT value = 0 + category = CATEGORY_SEXUAL //Any better place to put it? Doesn't really affect gameplay medical_record_text = "Patient cares little with or dislikes being touched." diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 1e447659..2207b2eb 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -198,6 +198,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/custom_species = null var/list/all_quirks = list() + var/compressed_quirks = FALSE //Hyperstation edit: Use a smaller font for the quirks list + var/old_view = FALSE //Hyperstation edit: toggle for sorting by category //Jobs, uses bitflags var/job_civilian_high = 0 @@ -1431,7 +1433,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) to_chat(user, "The quirk subsystem is still initializing! Try again in a minute.") return - var/list/dat = list() + var/dat = "" if(!SSquirks.quirks.len) dat += "The quirk subsystem hasn't finished initializing, please hold..." dat += "
Done

" @@ -1440,50 +1442,76 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "
Choose quirk setup

" dat += "
Left-click to add or remove quirks. You need negative quirks to have positive ones.
\ Quirks are applied at roundstart and cannot normally be removed.
" - dat += "
Done
" + dat += "
Done
\ + [compressed_quirks ? "Normal View" : "Small View"] \ + [old_view ? "Current View" : "Old View"]
" //Hyper edit dat += "
" dat += "
Current quirks: [all_quirks.len ? all_quirks.Join(", ") : "None"]
" dat += "
[GetPositiveQuirkCount()] / [MAX_QUIRKS] max positive quirks
\ Quirk balance remaining: [GetQuirkBalance()]

" - for(var/V in SSquirks.quirks) - var/datum/quirk/T = SSquirks.quirks[V] - var/quirk_name = initial(T.name) - var/has_quirk - var/quirk_cost = initial(T.value) * -1 - var/lock_reason = "This trait is unavailable." - var/quirk_conflict = FALSE - for(var/_V in all_quirks) - if(_V == quirk_name) - has_quirk = TRUE - if(initial(T.mood_quirk) && CONFIG_GET(flag/disable_human_mood)) - lock_reason = "Mood is disabled." - quirk_conflict = TRUE - if(has_quirk) - if(quirk_conflict) - all_quirks -= quirk_name - has_quirk = FALSE + var/list/hacky = SSquirks.quirk_categories + if(old_view) + hacky = list(1) //Hyperstation edit; super hacky, but it works + + //Hyperstation Edit: Categorize quirks + for(var/_cat in hacky) + var/list/L = SSquirks.quirks_sorted[_cat] + if(!old_view) + if(compressed_quirks) + dat += "

[_cat]

" else - quirk_cost *= -1 //invert it back, since we'd be regaining this amount - if(quirk_cost > 0) - quirk_cost = "+[quirk_cost]" - var/font_color = "#AAAAFF" - if(initial(T.value) != 0) - font_color = initial(T.value) > 0 ? "#AAFFAA" : "#FFAAAA" - if(quirk_conflict) - dat += "[quirk_name] - [initial(T.desc)] \ - LOCKED: [lock_reason]
" + dat += "

[_cat]

" else + L = SSquirks.quirks + + for(var/T in L) + //End Hyperstation Edit + var/datum/quirk/Q = SSquirks.quirks[T] + var/quirk_name = initial(Q.name) + var/has_quirk + var/quirk_cost = initial(Q.value) * -1 + var/lock_reason = "This trait is unavailable." + var/quirk_conflict = FALSE + for(var/_V in all_quirks) + if(_V == quirk_name) + has_quirk = TRUE + break + if(initial(Q.mood_quirk) && CONFIG_GET(flag/disable_human_mood)) + lock_reason = "Mood is disabled." + quirk_conflict = TRUE if(has_quirk) - dat += "[has_quirk ? "Remove" : "Take"] ([quirk_cost] pts.) \ - [quirk_name] - [initial(T.desc)]
" - else - dat += "[has_quirk ? "Remove" : "Take"] ([quirk_cost] pts.) \ - [quirk_name] - [initial(T.desc)]
" + if(quirk_conflict) + all_quirks -= quirk_name + has_quirk = FALSE + else + quirk_cost *= -1 //invert it back, since we'd be regaining this amount + if(quirk_cost > 0) + quirk_cost = "+[quirk_cost]" + var/font_color = "#AAAAFF" + if(initial(Q.value) != 0) + font_color = initial(Q.value) > 0 ? "#AAFFAA" : "#FFAAAA" + + if(compressed_quirks) //Hyperstation Edit: smol text + if(quirk_conflict) + dat += "([quirk_cost]) [quirk_name])" + else + dat += "[has_quirk ? "" : ""]([quirk_cost]) [quirk_name][has_quirk ? "" : ""]" + else //if(old_view) + if(quirk_conflict) + dat += "[quirk_name] - \ + LOCKED: [lock_reason]" + else + dat += "[has_quirk ? "Remove" : "Take"] ([quirk_cost] pts.) \ + [has_quirk ? "" : ""][quirk_name][has_quirk ? "": ""] - [initial(Q.desc)]" + dat += "
" + + dat += "
" + dat += "
Reset Quirks
" var/datum/browser/popup = new(user, "mob_occupation", "
Quirk Preferences
", 900, 600) //no reason not to reuse the occupation window, as it's cleaner that way popup.set_window_options("can_close=0") - popup.set_content(dat.Join()) + popup.set_content(dat) popup.open(FALSE) /datum/preferences/proc/GetQuirkBalance() @@ -1572,8 +1600,16 @@ GLOBAL_LIST_EMPTY(preferences_datums) else if(href_list["preference"] == "trait") switch(href_list["task"]) + if("trait_small_text") + compressed_quirks = !compressed_quirks + SetQuirks(user) + if("old_view") + old_view = !old_view + SetQuirks(user) if("close") user << browse(null, "window=mob_occupation") + compressed_quirks = FALSE + //Intentional for old_view to not be reset here. But we don't save the varx ShowChoices(user) if("update") var/quirk = href_list["trait"] diff --git a/hyperstation/code/datums/traits/good.dm b/hyperstation/code/datums/traits/good.dm index 672d8719..10c99af6 100644 --- a/hyperstation/code/datums/traits/good.dm +++ b/hyperstation/code/datums/traits/good.dm @@ -2,6 +2,7 @@ name = "Nar-Sian speaker" desc = "Obsessed with forbidden knowledge regarding the blood cult, you've learned how to speak their ancient language." value = 1 + category = CATEGORY_LANGUAGES gain_text = "Your mind feels sensitive to the slurred, ancient language of Nar'Sian cultists." lose_text = "You forget how to speak Nar'Sian!" @@ -17,6 +18,7 @@ name = "Ratvarian speaker" desc = "Obsessed with the inner workings of the clock cult, you've learned how to speak their language." value = 1 + category = CATEGORY_LANGUAGES gain_text = "Your mind feels sensitive to the ancient language of Ratvarian cultists." lose_text = "You forget how to speak Ratvarian!" @@ -32,6 +34,7 @@ name = "Encoded Audio speaker" desc = "You've been augmented with language encoders, allowing you to understand encoded audio." value = 1 + category = CATEGORY_LANGUAGES gain_text = "Your mouth feels a little weird for a moment as your language encoder kicks in." lose_text = "You feel your encoded audio chip malfunction. You can no longer speak or understand the language of fax machines." @@ -47,6 +50,7 @@ name = "Xenocommon speaker" desc = "Through time observing and interacting with xenos and xeno hybrids, you've learned the intricate hissing patterns of their language." value = 1 + category = CATEGORY_LANGUAGES gain_text = "You feel that you are now able to hiss in the same way xenomorphs do." lose_text = "You seem to no longer know how to speak xenocommon." diff --git a/hyperstation/code/datums/traits/neutral.dm b/hyperstation/code/datums/traits/neutral.dm index 2402a26d..5d83aa03 100644 --- a/hyperstation/code/datums/traits/neutral.dm +++ b/hyperstation/code/datums/traits/neutral.dm @@ -3,6 +3,7 @@ name = "Alcoholic Lightweight" desc = "Alcohol really goes straight to your head, gotta be careful with what you drink." value = 0 + category = CATEGORY_ALCOHOL mob_trait = TRAIT_ALCOHOL_LIGHTWEIGHT gain_text = "You feel woozy thinking of alcohol." lose_text = "You regain your stomach for drinks." @@ -12,6 +13,7 @@ name = "Cursed Blood" desc = "Your lineage is cursed with the paleblood curse. Best to stay away from holy water... Hell water, on the other hand..." value = 0 + category = CATEGORY_GAMEPLAY mob_trait = TRAIT_CURSED_BLOOD gain_text = "A curse from a land where men return as beasts runs deep in your blood. Best to stay away from holy water... Hell water, on the other hand..." lose_text = "You feel the weight of the curse in your blood finally gone." @@ -22,6 +24,7 @@ name = "Estrus Detection" desc = "You have a animalistic sense of detecting if someone is in heat, and can get pregnant." value = 0 + category = CATEGORY_SEXUAL mob_trait = TRAIT_HEAT_DETECT gain_text = "You feel your senses adjust, allowing a animalistic sense of others' fertility." lose_text = "You feel your sense of others' fertility fade." @@ -31,6 +34,7 @@ name = "In Heat" desc = "Your system burns with the desire to be bred, your body will betray you and alert others' to your desire when examining you. Satisfying your lust will make you happy, but ignoring it may cause you to become sad and needy." value = 0 + category = CATEGORY_SEXUAL mob_trait = TRAIT_HEAT gain_text = "You body burns with the desire to be bred." lose_text = "You feel more in control of your body and thoughts." @@ -39,6 +43,7 @@ name = "Overweight" desc = "You're particularly fond of food, and join the round being overweight." value = 0 + category = CATEGORY_FOOD gain_text = "You feel a bit chubby!" //no lose_text cause why would there be? @@ -47,3 +52,41 @@ M.nutrition = rand(NUTRITION_LEVEL_FAT + NUTRITION_LEVEL_START_MIN, NUTRITION_LEVEL_FAT + NUTRITION_LEVEL_START_MAX) M.overeatduration = 100 ADD_TRAIT(M, TRAIT_FAT, OBESITY) + +/datum/quirk/virile + name = "Virile" + desc = "Either through higher quality sperms, more of them, or just being more horny, your impregnation chance will increase by 20-30%." + value = 1 + category = CATEGORY_SEXUAL + medical_record_text = "Patient has a higher sperm count." + //mob_trait = TRAIT_VIRILE + gain_text = "You feel more potent." + lose_text = "You feel less potent." + var/ichange = 0 + +/datum/quirk/virile/add() + ichange = rand(20,30) + quirk_holder.impregchance += ichange + +/datum/quirk/virile/remove() + if(quirk_holder) + quirk_holder.impregchance -= ichange + + +/datum/quirk/macrophile + name = "Macrophile" + desc = "You are attracted to larger people, and being stepped on by them." + value = 0 + category = CATEGORY_SEXUAL + //mob_trait = TRAIT_MACROPHILE + gain_text = "You feel attracted to people larger than you." + lose_text = "You feel less attracted to people larger than you." + +/datum/quirk/microphile + name = "Microphile" + desc = "You are attracted to smaller people, and stepping on them." + value = 0 + category = CATEGORY_SEXUAL + //mob_trait = TRAIT_MICROPHILE + gain_text = "You feel attracted to people smaller than you." + lose_text = "You feel less attracted to people smaller than you." diff --git a/hyperstation/code/modules/traits.dm b/hyperstation/code/modules/traits.dm index f3407352..9fc461d0 100644 --- a/hyperstation/code/modules/traits.dm +++ b/hyperstation/code/modules/traits.dm @@ -5,6 +5,7 @@ name = "Extra productive genitals" desc = "Your lower bits produce more and hold more than normal." value = 0 + category = CATEGORY_SEXUAL mob_trait = TRAIT_CUM_PLUS gain_text = "You feel pressure in your groin." lose_text = "You feel a weight lifted from your groin." diff --git a/modular_citadel/code/datums/traits/neutral.dm b/modular_citadel/code/datums/traits/neutral.dm index d26f64a1..20530dcc 100644 --- a/modular_citadel/code/datums/traits/neutral.dm +++ b/modular_citadel/code/datums/traits/neutral.dm @@ -4,6 +4,7 @@ name = "Nymphomania" desc = "You're always feeling a bit in heat. Also, you get aroused faster than usual." value = 0 + category = CATEGORY_SEXUAL mob_trait = TRAIT_NYMPHO gain_text = "You are feeling extra wild." lose_text = "You don't feel that burning sensation anymore." @@ -27,6 +28,7 @@ name = "Masochism" desc = "You are aroused by pain." value = 0 + category = CATEGORY_SEXUAL mob_trait = TRAIT_MASO gain_text = "You desire to be hurt." lose_text = "Pain has become less exciting for you." @@ -35,6 +37,7 @@ name = "Choke Slut" desc = "You are aroused by suffocation." value = 0 + category = CATEGORY_SEXUAL mob_trait = TRAIT_CHOKE_SLUT gain_text = "You feel like you want to feel fingers around your neck, choking you until you pass out or make a mess... Maybe both." lose_text = "Seems you don't have a kink for suffocation anymore." @@ -43,6 +46,7 @@ name = "Acute hepatic pharmacokinesis" desc = "You've a rare genetic disorder that causes Incubus draft and Sucubus milk to be absorbed by your liver instead." value = 0 + category = CATEGORY_SEXUAL mob_trait = TRAIT_PHARMA lose_text = "Your liver feels different." var/active = FALSE diff --git a/tgstation.dme b/tgstation.dme index 63f3f9ed..4f663757 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -82,6 +82,7 @@ #include "code\__DEFINES\procpath.dm" #include "code\__DEFINES\profile.dm" #include "code\__DEFINES\qdel.dm" +#include "code\__DEFINES\quirks.dm" #include "code\__DEFINES\radiation.dm" #include "code\__DEFINES\radio.dm" #include "code\__DEFINES\reactions.dm"