-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hormone replacement therapy reagents & effects
- new status effects: Feminized, Masculinized (changes sex) - new reagents: Hormonium, Estradiol, Testosterone
- Loading branch information
Showing
11 changed files
with
207 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
2 changes: 2 additions & 0 deletions
2
Resources/Locale/en-US/deltav/guidebook/chemistry/statuseffects.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
34
Resources/Prototypes/DeltaV/Recipes/Reactions/medicine.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,9 @@ | |
|
||
- type: statusEffect | ||
id: SuppressPain | ||
|
||
- type: statusEffect | ||
id: Feminized | ||
|
||
- type: statusEffect | ||
id: Masculinized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters