diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml.cs index 5eace08a7fdb..6d776362dee6 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.Server/DeltaV/Medical/HormoneSystem.cs b/Content.Server/DeltaV/Medical/HormoneSystem.cs new file mode 100644 index 000000000000..acc7ffcf78dc --- /dev/null +++ b/Content.Server/DeltaV/Medical/HormoneSystem.cs @@ -0,0 +1,48 @@ +using Content.Shared.Humanoid; +using Content.Shared.DeltaV.Medical; +using Content.Shared.DeltaV.Traits; + +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; + } + + 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) + { + 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/Chemistry/SharedChemMaster.cs b/Content.Shared/Chemistry/SharedChemMaster.cs index 762131d76122..b37d51f71b4c 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/Content.Shared/DeltaV/Medical/HormoneComponents.cs b/Content.Shared/DeltaV/Medical/HormoneComponents.cs new file mode 100644 index 000000000000..9443ec44a77d --- /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/Content.Shared/DeltaV/Traits/HormoneSensitive.cs b/Content.Shared/DeltaV/Traits/HormoneSensitive.cs new file mode 100644 index 000000000000..d6711de90624 --- /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/_CD/reagents/meta/medicine.ftl b/Resources/Locale/en-US/_CD/reagents/meta/medicine.ftl index 475bd03338af..d1ee1ae8e40c 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 63ebd60c0326..a82c93cd609b 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 7a7b3bfe74bc..345da9556fd4 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 000000000000..4ab757386ddb --- /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 000000000000..7713dee18022 --- /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/Locale/en-US/deltav/traits/traits.ftl b/Resources/Locale/en-US/deltav/traits/traits.ftl index 5fb2e7052bc1..71fec6ff3f6f 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/Reagents/medicine.yml b/Resources/Prototypes/DeltaV/Reagents/medicine.yml new file mode 100644 index 000000000000..10bffde28448 --- /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 000000000000..4d85ec72a849 --- /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/Traits/hormone.yml b/Resources/Prototypes/DeltaV/Traits/hormone.yml new file mode 100644 index 000000000000..1d98f08f2eb8 --- /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 diff --git a/Resources/Prototypes/DeltaV/status_effects.yml b/Resources/Prototypes/DeltaV/status_effects.yml index cf1e8e256391..0e3af8538fd6 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 5b158e228420..70981b1667da 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 a7dcf03f28c6..3ce185fe3421 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 5670f10c0c6d..5a99ce6a25da 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 diff --git a/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/meta.json b/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/meta.json index b9de04b6b811..00039664a5dd 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 000000000000..b35bd3f91290 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill22.png differ 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 000000000000..14a28c46cdef Binary files /dev/null and b/Resources/Textures/Objects/Specific/Chemistry/pills.rsi/pill23.png differ