Skip to content

Commit

Permalink
Gate HRT efficacy behind traits
Browse files Browse the repository at this point in the history
  • Loading branch information
sowelipililimute committed Nov 28, 2024
1 parent 45c3d53 commit 37a5e29
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Content.Server/DeltaV/Medical/HormoneSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Shared.Humanoid;
using Content.Shared.DeltaV.Medical;
using Content.Shared.DeltaV.Traits;

namespace Content.Server.DeltaV.Medical;

Expand Down Expand Up @@ -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<HormoneSensitiveComponent>(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)
Expand Down
12 changes: 12 additions & 0 deletions Content.Shared/DeltaV/Traits/HormoneSensitive.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Content.Shared.DeltaV.Traits;
using Content.Shared.Humanoid;

/// <summary>
/// This is used for the hormone sensitivty traits.
/// </summary>
[RegisterComponent]
public sealed partial class HormoneSensitiveComponent : Component
{
[DataField(required: true)]
public Sex Target;
}
6 changes: 6 additions & 0 deletions Resources/Locale/en-US/deltav/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
17 changes: 17 additions & 0 deletions Resources/Prototypes/DeltaV/Traits/hormone.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 37a5e29

Please sign in to comment.