Skip to content

Commit

Permalink
Add hormone replacement therapy reagents & effects
Browse files Browse the repository at this point in the history
- new status effects: Feminized, Masculinized (changes sex)
- new reagents: Hormonium, Estradiol, Testosterone
  • Loading branch information
pontaoski committed Nov 24, 2024
1 parent e7d0a27 commit bb62d3d
Show file tree
Hide file tree
Showing 11 changed files with 207 additions and 2 deletions.
43 changes: 43 additions & 0 deletions Content.Server/Medical/HormoneSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using Content.Shared.Humanoid;
using Content.Shared.Drugs;

/// <summary>
/// System to handle hormonal effects
/// </summary>
public sealed class HormoneSystem : EntitySystem
{
[Dependency] private readonly SharedHumanoidAppearanceSystem _humanoidSystem = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<FeminizedComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<FeminizedComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<MasculinizedComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<MasculinizedComponent, ComponentShutdown>(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);
}
}
25 changes: 25 additions & 0 deletions Content.Shared/Drugs/HormoneComponents.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Robust.Shared.GameStates;
using Content.Shared.Humanoid;

namespace Content.Shared.Drugs;

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;
}
11 changes: 10 additions & 1 deletion Resources/Locale/en-US/_CD/reagents/meta/medicine.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@ 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.
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.
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.
3 changes: 2 additions & 1 deletion Resources/Locale/en-US/_CD/reagents/meta/physical-desc.ftl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
reagent-physical-desc-bending = light bending
reagent-physical-desc-bending = light bending
reagent-physical-desc-hormonal = hormonal
Original file line number Diff line number Diff line change
@@ -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
63 changes: 63 additions & 0 deletions Resources/Prototypes/DeltaV/Reagents/medicine.yml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions Resources/Prototypes/DeltaV/Recipes/Reactions/medicine.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions Resources/Prototypes/DeltaV/status_effects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@

- type: statusEffect
id: SuppressPain

- type: statusEffect
id: Feminized

- type: statusEffect
id: Masculinized
10 changes: 10 additions & 0 deletions Resources/Prototypes/Entities/Clothing/Neck/cloaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@
components:
- type: Sprite
sprite: Clothing/Neck/Cloaks/trans.rsi
# Begin DeltaV Additions - trans pins 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
Expand Down
10 changes: 10 additions & 0 deletions Resources/Prototypes/Entities/Clothing/Neck/pins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Species/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb62d3d

Please sign in to comment.