-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 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,31 @@ | ||
using Content.Server.Body.Components; | ||
using Content.Shared.Traits; | ||
|
||
namespace Content.Server.Hemophilia; | ||
|
||
public sealed partial class HemophiliaSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<HemophiliaComponent, MapInitEvent>(OnInitHemophilia); | ||
SubscribeLocalEvent<HemophiliaComponent, ComponentShutdown>(OnShutdown); | ||
|
||
} | ||
|
||
private void OnInitHemophilia(EntityUid uid, HemophiliaComponent component, MapInitEvent args) | ||
{ | ||
if (TryComp<BloodstreamComponent>(uid, out var bldcomp)) | ||
{ | ||
bldcomp.BleedReductionAmount *= component.Modifier; | ||
} | ||
} | ||
private void OnShutdown(EntityUid uid, HemophiliaComponent component, ComponentShutdown args) | ||
{ | ||
if (TryComp<BloodstreamComponent>(uid, out var bldcomp)) | ||
{ | ||
bldcomp.BleedReductionAmount /= component.Modifier; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Content.Shared.Traits; | ||
|
||
[RegisterComponent] | ||
public sealed partial class HemophiliaComponent : Component | ||
{ | ||
[DataField] | ||
public float Modifier = 0.3f; | ||
|
||
|
||
} |
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,2 @@ | ||
trait-hemophilia-name = Hemophilia | ||
trait-hemophilia-desc = Your blood is clotting extremely badly. |
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