-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move some of the new singularity code into shared
Hopefully without explosions yay
- Loading branch information
1 parent
6e53cd9
commit 9c66645
Showing
3 changed files
with
35 additions
and
20 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
29 changes: 29 additions & 0 deletions
29
Content.Shared/Singularity/EntitySystems/SharedSingularityGeneratorSystem.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,29 @@ | ||
using Content.Shared.Emag.Systems; | ||
using Content.Shared.Popups; | ||
using Content.Shared.Singularity.Components; | ||
|
||
namespace Content.Shared.Singularity.EntitySystems; | ||
|
||
/// <summary> | ||
/// Shared part of SingularitySingularityGeneratorSystem | ||
/// </summary> | ||
public abstract class SharedSingularityGeneratorSystem : EntitySystem | ||
{ | ||
#region Dependencies | ||
[Dependency] protected readonly SharedPopupSystem PopupSystem = default!; | ||
#endregion Dependencies | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<SingularityGeneratorComponent, GotEmaggedEvent>(OnEmagged); | ||
} | ||
|
||
private void OnEmagged(EntityUid uid, SingularityGeneratorComponent component, ref GotEmaggedEvent args) | ||
{ | ||
PopupSystem.PopupEntity(Loc.GetString("comp-generator-failsafe-disabled", ("target", uid)), uid); | ||
component.FailsafeDisabled = true; | ||
args.Handled = true; | ||
} | ||
} |