Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow metapsionic to detect mindswapped bodys. #787

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@
}

private void OnPowerUsed(EntityUid uid, MetapsionicPowerComponent component, MetapsionicPowerActionEvent args)
{
{
if (HasComp<MindSwappedComponent>(entity))

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name 'entity' does not exist in the current context

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

The name 'entity' does not exist in the current context

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'entity' does not exist in the current context

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'entity' does not exist in the current context

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'entity' does not exist in the current context

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The name 'entity' does not exist in the current context

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name 'entity' does not exist in the current context

Check failure on line 58 in Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs

View workflow job for this annotation

GitHub Actions / YAML Linter

The name 'entity' does not exist in the current context

_popups.PopupEntity(Loc.GetString("metapsionic-pulse-mindswapped"), uid, uid, PopupType.LargeCaution);
args.Handled = true;
return;

foreach (var entity in _lookup.GetEntitiesInRange(uid, component.Range))
{
if (HasComp<PsionicComponent>(entity) && entity != uid && !HasComp<PsionicInsulationComponent>(entity) &&
Expand All @@ -64,6 +70,13 @@
args.Handled = true;
return;
}

if (HasComp<MindSwappedComponent>(entity) && entity != uid)
{
_popups.PopupEntity(Loc.GetString("metapsionic-pulse-mindswapped"), uid, uid, PopupType.LargeCaution);
args.Handled = true;
return;
}
}
_popups.PopupEntity(Loc.GetString("metapsionic-pulse-failure"), uid, uid, PopupType.Large);
_psionics.LogPowerUsed(uid, "metapsionic pulse", 2, 4);
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/nyanotrasen/abilities/psionic.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ action-description-metapsionic = Send a mental pulse through the area to see if
metapsionic-pulse-success = You detect psychic presence nearby.
metapsionic-pulse-failure = You don't detect any psychic presence nearby.
metapsionic-pulse-power = You detect that {$power} was used nearby.
metapsionic-pulse-mindswapped = You detect that someone is mindswapped

action-name-dispel = Dispel
action-description-dispel = Dispel summoned entities such as familiars or forcewalls.
Expand Down
Loading