diff --git a/Content.Server/DeltaV/Medical/HormoneSystem.cs b/Content.Server/DeltaV/Medical/HormoneSystem.cs new file mode 100644 index 000000000000..944a5c0b93ef --- /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 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/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/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/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