From 08000fc700bb8be1ed0890abbc9f3598fbfb7b1a Mon Sep 17 00:00:00 2001 From: Janet Blackquill Date: Sun, 24 Nov 2024 02:14:14 -0500 Subject: [PATCH 1/3] Add new pills inspired by IRL HRT pill designs --- .../Chemistry/UI/ChemMasterWindow.xaml.cs | 4 ++-- Content.Shared/Chemistry/SharedChemMaster.cs | 2 +- .../Specific/Chemistry/pills.rsi/meta.json | 8 +++++++- .../Specific/Chemistry/pills.rsi/pill22.png | Bin 0 -> 228 bytes .../Specific/Chemistry/pills.rsi/pill23.png | Bin 0 -> 251 bytes 5 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill22.png create mode 100644 Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill23.png diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs index 5eace08a7fd..6d776362dee 100644 --- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs +++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs @@ -37,11 +37,11 @@ public ChemMasterWindow() RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); - // Pill type selection buttons, in total there are 20 pills. + // Pill type selection buttons, in total there are 23 pills. // Pill rsi file should have states named as pill1, pill2, and so on. var resourcePath = new ResPath(PillsRsiPath); var pillTypeGroup = new ButtonGroup(); - PillTypeButtons = new Button[20]; + PillTypeButtons = new Button[23]; for (uint i = 0; i < PillTypeButtons.Length; i++) { // For every button decide which stylebase to have diff --git a/Content.Shared/Chemistry/SharedChemMaster.cs b/Content.Shared/Chemistry/SharedChemMaster.cs index 762131d7612..b37d51f71b4 100644 --- a/Content.Shared/Chemistry/SharedChemMaster.cs +++ b/Content.Shared/Chemistry/SharedChemMaster.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Chemistry /// public sealed class SharedChemMaster { - public const uint PillTypes = 20; + public const uint PillTypes = 23; public const string BufferSolutionName = "buffer"; public const string InputSlotName = "beakerSlot"; public const string OutputSlotName = "outputSlot"; diff --git a/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/meta.json b/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/meta.json index b9de04b6b81..00039664a5d 100644 --- a/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC-BY-SA-3.0", - "copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/chemical.dmi", + "copyright": "Pills φ through 21 are taken from cev-eris at https://github.com/discordia-space/CEV-Eris/blob/2b969adc2dfd3e9621bf3597c5cbffeb3ac8c9f0/icons/obj/chemical.dmi; pills 22 and 23 are copyright 2024 Janet Blackquill ", "size": { "x": 32, "y": 32 @@ -73,6 +73,12 @@ { "name": "pill17" }, + { + "name": "pill22" + }, + { + "name": "pill23" + }, { "name": "inhand-left", "directions": 4 diff --git a/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill22.png b/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill22.png new file mode 100644 index 0000000000000000000000000000000000000000..b35bd3f912902a385bef76f4bc5e4902a520b25b GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}^E_P~Ln2y} z6C_v{Cy4Yk1sZUQ#Hy)N!u7<1!;9UQWF6%0 z=wphqYx?R*bN6YBv_gG7#MwY V%u=QVKLxs!!PC{xWt~$(69A20RG9z( literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill23.png b/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill23.png new file mode 100644 index 0000000000000000000000000000000000000000..14a28c46cdef46314f8160cdda816e504ca86d39 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}TRmMILn2y} z6C_v{Cy4Yk1sZUmWzrCYUfUVc=fcLt!?^!$r&zB3Rej~ z{O_=4BFIc0pCei|Uq4yT`TPE?b6b7BTvF)wXNws;`4p_yC0uOaH|RWJeC9^^%q1-z oMS2IOGfPN#oQFG)O@@I%Io7Z*F6hr3pa&Q{UHx3vIVCg!01=T~ Date: Sun, 24 Nov 2024 03:00:13 -0500 Subject: [PATCH 2/3] Add hormone replacement therapy reagents & effects - new status effects: Feminized, Masculinized (changes sex) - new reagents: Hormonium, Estradiol, Testosterone --- .../DeltaV/Medical/HormoneSystem.cs | 45 +++++++++++++ .../DeltaV/Medical/HormoneComponents.cs | 25 ++++++++ .../en-US/_CD/reagents/meta/medicine.ftl | 2 +- .../en-US/_CD/reagents/meta/physical-desc.ftl | 2 +- .../guidebook/chemistry/statuseffects.ftl | 2 + .../Locale/en-US/deltav/reagents/medicine.ftl | 8 +++ .../deltav/reagents/meta/physical-desc.ftl | 1 + .../Prototypes/DeltaV/Reagents/medicine.yml | 63 +++++++++++++++++++ .../DeltaV/Recipes/Reactions/medicine.yml | 34 ++++++++++ .../Prototypes/DeltaV/status_effects.yml | 6 ++ .../Entities/Clothing/Neck/cloaks.yml | 10 +++ .../Entities/Clothing/Neck/pins.yml | 10 +++ .../Prototypes/Entities/Mobs/Species/base.yml | 2 + 13 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 Content.Server/DeltaV/Medical/HormoneSystem.cs create mode 100644 Content.Shared/DeltaV/Medical/HormoneComponents.cs create mode 100644 Resources/Locale/en-US/deltav/reagents/medicine.ftl create mode 100644 Resources/Locale/en-US/deltav/reagents/meta/physical-desc.ftl create mode 100644 Resources/Prototypes/DeltaV/Reagents/medicine.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Reactions/medicine.yml diff --git a/Content.Server/DeltaV/Medical/HormoneSystem.cs b/Content.Server/DeltaV/Medical/HormoneSystem.cs new file mode 100644 index 00000000000..944a5c0b93e --- /dev/null +++ b/Content.Server/DeltaV/Medical/HormoneSystem.cs @@ -0,0 +1,45 @@ +using Content.Shared.Humanoid; +using Content.Shared.DeltaV.Medical; + +namespace Content.Server.DeltaV.Medical; + +/// +/// System to handle hormonal effects +/// +public sealed class HormoneSystem : EntitySystem +{ + [Dependency] private readonly SharedHumanoidAppearanceSystem _humanoidSystem = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnInit); + SubscribeLocalEvent(OnShutdown); + SubscribeLocalEvent(OnInit); + SubscribeLocalEvent(OnShutdown); + } + + private void OnInit(EntityUid uid, IHormoneComponent component, ComponentInit args) + { + HumanoidAppearanceComponent? humanoid = null; + + if (!Resolve(uid, ref humanoid) || humanoid == null || humanoid.Sex == component.Target) { + return; + } + + component.Original = humanoid.Sex; + _humanoidSystem.SetSex(uid, component.Target); + } + + private void OnShutdown(EntityUid uid, IHormoneComponent component, ComponentShutdown args) + { + HumanoidAppearanceComponent? humanoid = null; + + if (!Resolve(uid, ref humanoid) || humanoid == null || component.Original == null) { + return; + } + + _humanoidSystem.SetSex(uid, component.Original.Value); + } +} diff --git a/Content.Shared/DeltaV/Medical/HormoneComponents.cs b/Content.Shared/DeltaV/Medical/HormoneComponents.cs new file mode 100644 index 00000000000..9443ec44a77 --- /dev/null +++ b/Content.Shared/DeltaV/Medical/HormoneComponents.cs @@ -0,0 +1,25 @@ +using Robust.Shared.GameStates; +using Content.Shared.Humanoid; + +namespace Content.Shared.DeltaV.Medical; + +public interface IHormoneComponent { + Sex Target { get; } + Sex? Original { get; set; } +} + +[RegisterComponent, NetworkedComponent] +public sealed partial class MasculinizedComponent : Component, IHormoneComponent { + public Sex Target => Sex.Male; + + [DataField("original")] + public Sex? Original { get; set; } = null; +} + +[RegisterComponent, NetworkedComponent] +public sealed partial class FeminizedComponent : Component, IHormoneComponent { + public Sex Target => Sex.Female; + + [DataField("original")] + public Sex? Original { get; set; } = null; +} diff --git a/Resources/Locale/en-US/_CD/reagents/meta/medicine.ftl b/Resources/Locale/en-US/_CD/reagents/meta/medicine.ftl index 475bd03338a..d1ee1ae8e40 100644 --- a/Resources/Locale/en-US/_CD/reagents/meta/medicine.ftl +++ b/Resources/Locale/en-US/_CD/reagents/meta/medicine.ftl @@ -26,4 +26,4 @@ reagent-name-soretizone = Soretizone reagent-desc-soretizone = A fairly effective painkiller developed to treat chronic pain. It works for cases that Stubantazine won't solve. Overdoses will knock you right out. High doses may cause addiction. Does not conflict with reasonable amounts of alcohol. reagent-name-agonolexyne = Agonolexyne -reagent-desc-agonolexyne = An incredibly potent and fast acting opioid invented to speed up the application of painkillers during surgery. Stops you from feeling pain (or really anything at all). Interacts poorly with alcohol. Known to be very addictive. Overdose may relax the lungs to the point of non-function. \ No newline at end of file +reagent-desc-agonolexyne = An incredibly potent and fast acting opioid invented to speed up the application of painkillers during surgery. Stops you from feeling pain (or really anything at all). Interacts poorly with alcohol. Known to be very addictive. Overdose may relax the lungs to the point of non-function. diff --git a/Resources/Locale/en-US/_CD/reagents/meta/physical-desc.ftl b/Resources/Locale/en-US/_CD/reagents/meta/physical-desc.ftl index 63ebd60c032..a82c93cd609 100644 --- a/Resources/Locale/en-US/_CD/reagents/meta/physical-desc.ftl +++ b/Resources/Locale/en-US/_CD/reagents/meta/physical-desc.ftl @@ -1 +1 @@ -reagent-physical-desc-bending = light bending \ No newline at end of file +reagent-physical-desc-bending = light bending diff --git a/Resources/Locale/en-US/deltav/guidebook/chemistry/statuseffects.ftl b/Resources/Locale/en-US/deltav/guidebook/chemistry/statuseffects.ftl index 7a7b3bfe74b..345da9556fd 100644 --- a/Resources/Locale/en-US/deltav/guidebook/chemistry/statuseffects.ftl +++ b/Resources/Locale/en-US/deltav/guidebook/chemistry/statuseffects.ftl @@ -1,2 +1,4 @@ reagent-effect-status-effect-PsionicallyInsulated = psionic insulation reagent-effect-status-effect-PsionicsDisabled = inability to use psionic powers +reagent-effect-status-effect-Feminized = feminization +reagent-effect-status-effect-Masculinized = masculinization diff --git a/Resources/Locale/en-US/deltav/reagents/medicine.ftl b/Resources/Locale/en-US/deltav/reagents/medicine.ftl new file mode 100644 index 00000000000..4ab757386dd --- /dev/null +++ b/Resources/Locale/en-US/deltav/reagents/medicine.ftl @@ -0,0 +1,8 @@ +reagent-name-hormonium = hormonium +reagent-desc-hormonium = An efficient precursor to hormonal medicines developed by Nanotrasen. Taken alone, it results in hallucinations. + +reagent-name-testosterone = testosterone +reagent-desc-testosterone = A hormonal medicine that results in masculinization. This formulation was developed by Nanotrasen to be easy to produce, but the results are temporary. + +reagent-name-estradiol = estradiol +reagent-desc-estradiol = A hormonal medicine that results in feminization. This formulation was developed by Nanotrasen to be easy to produce, but the results are temporary. diff --git a/Resources/Locale/en-US/deltav/reagents/meta/physical-desc.ftl b/Resources/Locale/en-US/deltav/reagents/meta/physical-desc.ftl new file mode 100644 index 00000000000..7713dee1802 --- /dev/null +++ b/Resources/Locale/en-US/deltav/reagents/meta/physical-desc.ftl @@ -0,0 +1 @@ +reagent-physical-desc-hormonal = hormonal diff --git a/Resources/Prototypes/DeltaV/Reagents/medicine.yml b/Resources/Prototypes/DeltaV/Reagents/medicine.yml new file mode 100644 index 00000000000..10bffde2844 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Reagents/medicine.yml @@ -0,0 +1,63 @@ +- type: reagent + id: Testosterone + name: reagent-name-testosterone + group: Medicine + desc: reagent-desc-testosterone + physicalDesc: reagent-physical-desc-hormonal + flavor: bitter + color: "#eb692d" + boilingPoint: 1321.0 + meltingPoint: 424.1 + metabolisms: + Medicine: + metabolismRate: 0.02 + effects: + - !type:GenericStatusEffect + key: Masculinized + component: Masculinized + type: Add + time: 2 + refresh: false + +- type: reagent + id: Estradiol + name: reagent-name-estradiol + group: Medicine + desc: reagent-desc-estradiol + physicalDesc: reagent-physical-desc-hormonal + flavor: bitter + color: "#65b4b1" + boilingPoint: 1573.0 + meltingPoint: 446.5 + metabolisms: + Medicine: + metabolismRate: 0.02 + effects: + - !type:GenericStatusEffect + key: Feminized + component: Feminized + type: Add + time: 2 + refresh: false + +- type: reagent + id: Hormonium + name: reagent-name-hormonium + group: Medicine + desc: reagent-desc-hormonium + physicalDesc: reagent-physical-desc-hormonal + flavor: bitter + color: "#f9c3f9" + boilingPoint: 937.0 + meltingPoint: 420.0 + metabolisms: + Medicine: + metabolismRate: 1 + effects: + - !type:GenericStatusEffect + conditions: + key: SeeingRainbows + component: SeeingRainbows + type: Add + time: 1.1 + refresh: false diff --git a/Resources/Prototypes/DeltaV/Recipes/Reactions/medicine.yml b/Resources/Prototypes/DeltaV/Recipes/Reactions/medicine.yml new file mode 100644 index 00000000000..4d85ec72a84 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Reactions/medicine.yml @@ -0,0 +1,34 @@ +- type: reaction + id: Testosterone + reactants: + Oil: + amount: 1 + Hormonium: + amount: 1 + Mercury: + amount: 1 + products: + Testosterone: 3 + +- type: reaction + id: Estradiol + reactants: + Oil: + amount: 1 + Hormonium: + amount: 1 + Radium: + amount: 1 + products: + Estradiol: 3 + +- type: reaction + id: TestosteroneEstradiol + impact: Medium + reactants: + Testosterone: + amount: 1 + Estradiol: + amount: 1 + products: + Hormonium: 1 diff --git a/Resources/Prototypes/DeltaV/status_effects.yml b/Resources/Prototypes/DeltaV/status_effects.yml index cf1e8e25639..0e3af8538fd 100644 --- a/Resources/Prototypes/DeltaV/status_effects.yml +++ b/Resources/Prototypes/DeltaV/status_effects.yml @@ -9,3 +9,9 @@ - type: statusEffect id: SuppressPain + +- type: statusEffect + id: Feminized + +- type: statusEffect + id: Masculinized diff --git a/Resources/Prototypes/Entities/Clothing/Neck/cloaks.yml b/Resources/Prototypes/Entities/Clothing/Neck/cloaks.yml index 5b158e22842..70981b1667d 100644 --- a/Resources/Prototypes/Entities/Clothing/Neck/cloaks.yml +++ b/Resources/Prototypes/Entities/Clothing/Neck/cloaks.yml @@ -143,6 +143,16 @@ components: - type: Sprite sprite: Clothing/Neck/Cloaks/trans.rsi + # Begin DeltaV Additions - trans cloaks can be ground into hormonium + - type: SolutionContainerManager + solutions: + hormone: + reagents: + - ReagentId: Hormonium + Quantity: 25 + - type: Extractable + grindableSolutionName: hormone + # End DeltaV Additions - type: entity parent: ClothingNeckBase diff --git a/Resources/Prototypes/Entities/Clothing/Neck/pins.yml b/Resources/Prototypes/Entities/Clothing/Neck/pins.yml index a7dcf03f28c..3ce185fe342 100644 --- a/Resources/Prototypes/Entities/Clothing/Neck/pins.yml +++ b/Resources/Prototypes/Entities/Clothing/Neck/pins.yml @@ -121,6 +121,16 @@ state: trans - type: Clothing equippedPrefix: trans + # Begin DeltaV Additions - trans pins can be ground into hormonium + - type: SolutionContainerManager + solutions: + hormone: + reagents: + - ReagentId: Hormonium + Quantity: 15 + - type: Extractable + grindableSolutionName: hormone + # End DeltaV Additions - type: entity parent: ClothingNeckPinBase diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 5670f10c0c6..5a99ce6a25d 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -142,6 +142,8 @@ - SuppressAddiction # DeltaV - Psych med addictions system - InPain # DeltaV - Pain system - SuppressPain # DeltaV - Pain system + - Feminized # DeltaV - Hormone system + - Masculinized # DeltaV - Hormone system - type: Body prototype: Human requiredLegs: 2 From 37a5e2923470e306ec0fcbe549dd7946ddbf57e6 Mon Sep 17 00:00:00 2001 From: Janet Blackquill Date: Sun, 24 Nov 2024 13:02:41 -0500 Subject: [PATCH 3/3] Gate HRT efficacy behind traits --- Content.Server/DeltaV/Medical/HormoneSystem.cs | 7 +++++-- .../DeltaV/Traits/HormoneSensitive.cs | 12 ++++++++++++ Resources/Locale/en-US/deltav/traits/traits.ftl | 6 ++++++ Resources/Prototypes/DeltaV/Traits/hormone.yml | 17 +++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 Content.Shared/DeltaV/Traits/HormoneSensitive.cs create mode 100644 Resources/Prototypes/DeltaV/Traits/hormone.yml diff --git a/Content.Server/DeltaV/Medical/HormoneSystem.cs b/Content.Server/DeltaV/Medical/HormoneSystem.cs index 944a5c0b93e..acc7ffcf78d 100644 --- a/Content.Server/DeltaV/Medical/HormoneSystem.cs +++ b/Content.Server/DeltaV/Medical/HormoneSystem.cs @@ -1,5 +1,6 @@ using Content.Shared.Humanoid; using Content.Shared.DeltaV.Medical; +using Content.Shared.DeltaV.Traits; namespace Content.Server.DeltaV.Medical; @@ -28,8 +29,10 @@ private void OnInit(EntityUid uid, IHormoneComponent component, ComponentInit ar return; } - component.Original = humanoid.Sex; - _humanoidSystem.SetSex(uid, component.Target); + if (TryComp(uid, out var trait) && trait.Target == component.Target) { + component.Original = humanoid.Sex; + _humanoidSystem.SetSex(uid, component.Target); + } } private void OnShutdown(EntityUid uid, IHormoneComponent component, ComponentShutdown args) diff --git a/Content.Shared/DeltaV/Traits/HormoneSensitive.cs b/Content.Shared/DeltaV/Traits/HormoneSensitive.cs new file mode 100644 index 00000000000..d6711de9062 --- /dev/null +++ b/Content.Shared/DeltaV/Traits/HormoneSensitive.cs @@ -0,0 +1,12 @@ +namespace Content.Shared.DeltaV.Traits; +using Content.Shared.Humanoid; + +/// +/// This is used for the hormone sensitivty traits. +/// +[RegisterComponent] +public sealed partial class HormoneSensitiveComponent : Component +{ + [DataField(required: true)] + public Sex Target; +} diff --git a/Resources/Locale/en-US/deltav/traits/traits.ftl b/Resources/Locale/en-US/deltav/traits/traits.ftl index 5fb2e7052bc..71fec6ff3f6 100644 --- a/Resources/Locale/en-US/deltav/traits/traits.ftl +++ b/Resources/Locale/en-US/deltav/traits/traits.ftl @@ -32,3 +32,9 @@ trait-inpain-desc = You’re constantly in discomfort. You need painkillers to f trait-addicted-name = Addicted trait-addicted-desc = You crave the substance, and your thoughts keep drifting back to it. Without it, you feel incomplete, anxious, and on edge. + +trait-estradiol-sensitive-name = Estradiol sensitive +trait-estradiol-sensitive-desc = Your body is capable of taking on Nanotrasen's special feminization medicines. + +trait-testosterone-sensitive-name = Testosterone sensitive +trait-testosterone-sensitive-desc = Your body is capable of taking on Nanotrasen's special masculinization medicines. diff --git a/Resources/Prototypes/DeltaV/Traits/hormone.yml b/Resources/Prototypes/DeltaV/Traits/hormone.yml new file mode 100644 index 00000000000..1d98f08f2eb --- /dev/null +++ b/Resources/Prototypes/DeltaV/Traits/hormone.yml @@ -0,0 +1,17 @@ +- type: trait + id: EstradiolSensitive + name: trait-estradiol-sensitive-name + description: trait-estradiol-sensitive-desc + category: Quirks + components: + - type: HormoneSensitive + target: Female + +- type: trait + id: TestosteroneSensitive + name: trait-testosterone-sensitive-name + description: trait-testosterone-sensitive-desc + category: Quirks + components: + - type: HormoneSensitive + target: Male