forked from Rxup/space-station-14
-
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.
syringe ops real (Rxup#967) * ebin syringeops * its fucking real * 1984 * Update BaseSolutionInjectOnEventComponent.cs minor spelling mistake webeditops
- Loading branch information
1 parent
d366ab5
commit 14157fa
Showing
32 changed files
with
370 additions
and
9 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
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
27 changes: 27 additions & 0 deletions
27
Content.Server/_Goobstation/Weapons/Ranged/SyringeGunSystem.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,27 @@ | ||
using Content.Server.Chemistry.Components; | ||
using Content.Shared.Weapons.Ranged.Events; | ||
using Content.Shared._Goobstation.Weapons.Ranged; | ||
namespace Content.Server._Goobstation.Weapons.Ranged; | ||
|
||
/// <summary> | ||
/// System for handling projectiles and altering their properties when fired from a Syringe Gun. | ||
/// </summary> | ||
public sealed class SyringeGunSystem : EntitySystem | ||
{ | ||
|
||
public override void Initialize() | ||
{ | ||
SubscribeLocalEvent<SyringeGunComponent, AmmoShotEvent>(OnFire); | ||
} | ||
|
||
private void OnFire(Entity<SyringeGunComponent> gun, ref AmmoShotEvent args) | ||
{ | ||
foreach (var projectile in args.FiredProjectiles) | ||
if (TryComp(projectile, out SolutionInjectOnEmbedComponent? inject)) | ||
{ | ||
inject.Shot = true; | ||
inject.PierceArmor = gun.Comp.PierceArmor; | ||
} | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
Content.Shared/_Goobstation/Weapons/Ranged/SyringeGunComponent.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,13 @@ | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared._Goobstation.Weapons.Ranged; | ||
|
||
/// <summary> | ||
/// Component that allows guns to instantly inject all the contents of any syringe on a target. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class SyringeGunComponent : Component | ||
{ | ||
[DataField] | ||
public bool PierceArmor; | ||
} |
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
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.