Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxup committed Mar 19, 2024
1 parent 7234945 commit 6eef731
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
using Content.Shared.Backmen.Psionics.Events;
using Content.Shared.Rejuvenate;
using Content.Shared.ActionBlocker;
using Content.Shared.Pulling.Components;
using Content.Server.Popups;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.NPC.Systems;
using Robust.Server.Audio;
using Robust.Shared.Player;
Expand Down Expand Up @@ -70,7 +70,7 @@ private void OnDrain(EntityUid uid, GlimmerWispComponent component, GlimmerWispD
if (args.Cancelled)
{
_audioSystem.Stop(component.DrainStingStream, component.DrainStingStream);
if (TryComp<SharedPullableComponent>(args.Args.Target.Value, out var pullable) &&
if (TryComp<PullableComponent>(args.Args.Target.Value, out var pullable) &&
pullable.Puller != null)
{
_npcFaction.AggroEntity(uid, pullable.Puller.Value);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using Content.Server.Backmen.Species.Shadowkin.Components;
using Content.Server.Backmen.Species.Shadowkin.Events;
using Content.Server.Magic;
using Content.Server.Pulling;
using Content.Server.Backmen.Species.Shadowkin.Components;
using Content.Server.Backmen.Species.Shadowkin.Events;
using Content.Shared.Actions;
using Content.Shared.Backmen.Abilities.Psionics;
using Content.Shared.Backmen.Species.Shadowkin.Components;
using Content.Shared.Cuffs.Components;
using Content.Shared.Damage.Systems;
using Content.Shared.Pulling.Components;
using Content.Shared.Backmen.Species.Shadowkin.Components;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Pulling.Systems;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
Expand Down Expand Up @@ -66,14 +66,14 @@ private void Teleport(EntityUid uid, ShadowkinTeleportPowerComponent component,
if (transform.MapID != args.Target.GetMapId(EntityManager) || transform.GridUid == null)
return;

SharedPullableComponent? pullable = null; // To avoid "might not be initialized when accessed" warning
if (TryComp<SharedPullerComponent>(args.Performer, out var puller) &&
PullableComponent? pullable = null; // To avoid "might not be initialized when accessed" warning
if (TryComp<PullerComponent>(args.Performer, out var puller) &&
puller.Pulling != null &&
TryComp<SharedPullableComponent>(puller.Pulling, out pullable) &&
TryComp<PullableComponent>(puller.Pulling, out pullable) &&
pullable.BeingPulled)
{
// Temporarily stop pulling to avoid not teleporting to the target
_pulling.TryStopPull(pullable);
_pulling.TryStopPull(puller.Pulling.Value, pullable);
}

// Teleport the performer to the target
Expand All @@ -92,7 +92,7 @@ private void Teleport(EntityUid uid, ShadowkinTeleportPowerComponent component,

// Resume pulling
// TODO: This does nothing? // This does things sometimes, but the client never knows
_pulling.TryStartPull(puller, pullable);
_pulling.TryStartPull(args.Performer, puller.Pulling.Value, null, puller, pullable);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Content.Shared.Interaction.Events;
using Content.Shared.Inventory.Events;
using Content.Shared.Movement.Events;
using Content.Shared.Physics.Pull;
using Robust.Shared.Console;

namespace Content.Shared.Backmen.StationAI;
Expand Down
1 change: 0 additions & 1 deletion Resources/Prototypes/Maps/saltern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
Mime: [ 1, 1 ]
Musician: [ 1, 1 ]
# backmen
Paramedic: [ 1, 1 ] # backmen-Paramedic
Brigmedic: [ 0, 1 ] # backmen-Brigmedic
BKBPLATech: [0, 3] # backmen-BPLA-Silicons
BKBPLAMED: [0, 3] # backmen-BPLAMED-Silicons
Expand Down

0 comments on commit 6eef731

Please sign in to comment.