-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent telegnomes from interacting with anything (#2117)
* disable interaction for telegnomes, add access for the components * make client and server systems extend shared system --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
- Loading branch information
1 parent
6ee37b2
commit b6b2971
Showing
5 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
Content.Client/Nyanotrasen/Abilities/Psionics/TelegnosisPowerSystem.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,5 @@ | ||
using Content.Shared.Abilities.Psionics; | ||
|
||
namespace Content.Client.Abilities.Psionics; | ||
|
||
public sealed class TelegnosisPowerSystem : SharedTelegnosisPowerSystem; |
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
19 changes: 19 additions & 0 deletions
19
...Shared/Nyanotrasen/Abilities/Psionics/Abilities/Telegnosis/SharedTelegnosisPowerSystem.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,19 @@ | ||
using Content.Shared.Interaction.Events; | ||
|
||
namespace Content.Shared.Abilities.Psionics; | ||
|
||
public abstract class SharedTelegnosisPowerSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<TelegnosticProjectionComponent, InteractionAttemptEvent>(OnInteractionAttempt); | ||
} | ||
|
||
private void OnInteractionAttempt(Entity<TelegnosticProjectionComponent> ent, ref InteractionAttemptEvent args) | ||
{ | ||
// no astrally stealing someones shoes | ||
args.Cancelled = true; | ||
} | ||
} |
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
10 changes: 4 additions & 6 deletions
10
...red/Nyanotrasen/Abilities/Psionics/Abilities/Telegnosis/TelegnosticProjectionComponent.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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
namespace Content.Shared.Abilities.Psionics | ||
{ | ||
[RegisterComponent] | ||
public sealed partial class TelegnosticProjectionComponent : Component | ||
{} | ||
} | ||
namespace Content.Shared.Abilities.Psionics; | ||
|
||
[RegisterComponent, Access(typeof(SharedTelegnosisPowerSystem))] | ||
public sealed partial class TelegnosticProjectionComponent : Component; |