forked from DeltaV-Station/Delta-v
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shitmed Update 1 - Forma de Goob (DeltaV-Station#897)
* full fucking send * ope forgot to remove the EE scripts * fix test * fix shitcode fail * DELTA THAT VALUE IS NULLABLE * whoopsie daysie
- Loading branch information
1 parent
a778a9b
commit bf33742
Showing
79 changed files
with
347 additions
and
215 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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
// Shitmed Change Start | ||
|
||
using Content.Shared.Smoking.Systems; | ||
|
||
namespace Content.Client.Smoking; | ||
|
||
public sealed class MatchstickSystem : SharedMatchstickSystem; | ||
|
||
// Shitmed Change End |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Content.Shared.Body.Events; | ||
using Content.Server.Body.Components; | ||
using Content.Shared.Body.Systems; | ||
using Content.Shared._Shitmed.Body.Organ; | ||
using Content.Server._Shitmed.DelayedDeath; | ||
|
||
namespace Content.Server._Shitmed.Body.Organ; | ||
|
||
public sealed class HeartSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedBodySystem _bodySystem = default!; | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<HeartComponent, OrganAddedToBodyEvent>(HandleAddition); | ||
SubscribeLocalEvent<HeartComponent, OrganRemovedFromBodyEvent>(HandleRemoval); | ||
} | ||
|
||
private void HandleRemoval(EntityUid uid, HeartComponent _, ref OrganRemovedFromBodyEvent args) | ||
{ | ||
if (TerminatingOrDeleted(uid) || TerminatingOrDeleted(args.OldBody)) | ||
return; | ||
|
||
// TODO: Add some form of very violent bleeding effect. | ||
EnsureComp<DelayedDeathComponent>(args.OldBody); | ||
} | ||
|
||
private void HandleAddition(EntityUid uid, HeartComponent _, ref OrganAddedToBodyEvent args) | ||
{ | ||
if (TerminatingOrDeleted(uid) || TerminatingOrDeleted(args.Body)) | ||
return; | ||
|
||
if (_bodySystem.TryGetBodyOrganEntityComps<BrainComponent>(args.Body, out var _)) | ||
RemComp<DelayedDeathComponent>(args.Body); | ||
} | ||
// Shitmed-End | ||
} |
16 changes: 16 additions & 0 deletions
16
Content.Server/_Shitmed/DelayedDeath/DelayedDeathComponent.cs
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,16 @@ | ||
namespace Content.Server._Shitmed.DelayedDeath; | ||
|
||
[RegisterComponent] | ||
public sealed partial class DelayedDeathComponent : Component | ||
{ | ||
/// <summary> | ||
/// How long it takes to kill the entity. | ||
/// </summary> | ||
[DataField] | ||
public float DeathTime = 60; | ||
|
||
/// <summary> | ||
/// How long it has been since the delayed death timer started. | ||
/// </summary> | ||
public float DeathTimer; | ||
} |
28 changes: 28 additions & 0 deletions
28
Content.Server/_Shitmed/DelayedDeath/DelayedDeathSystem.cs
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,28 @@ | ||
using Content.Shared.Damage; | ||
using Content.Shared.Damage.Prototypes; | ||
using Content.Shared.Mobs.Systems; | ||
using Robust.Shared.Prototypes; | ||
namespace Content.Server._Shitmed.DelayedDeath; | ||
|
||
public partial class DelayedDeathSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly DamageableSystem _damageable = default!; | ||
[Dependency] private readonly MobStateSystem _mobState = default!; | ||
[Dependency] private readonly IPrototypeManager _prototypes = default!; | ||
public override void Update(float frameTime) | ||
{ | ||
base.Update(frameTime); | ||
|
||
using var query = EntityQueryEnumerator<DelayedDeathComponent>(); | ||
while (query.MoveNext(out var ent, out var component)) | ||
{ | ||
component.DeathTimer += frameTime; | ||
|
||
if (component.DeathTimer >= component.DeathTime && !_mobState.IsDead(ent)) | ||
{ | ||
var damage = new DamageSpecifier(_prototypes.Index<DamageTypePrototype>("Bloodloss"), 150); | ||
_damageable.TryChangeDamage(ent, damage, partMultiplier: 0f); | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.