Fixes storage eating buckled players (#9096)

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Júlio César Ueti
2022-06-24 16:26:56 -03:00
committed by GitHub
parent 8761dec4e9
commit d1a0340343
4 changed files with 32 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server.Ghost.Components;
using Content.Server.Mind;
using Content.Server.Mind.Components;
using Content.Server.Players;
using Content.Server.Storage.Components;
using Content.Server.Visible;
using Content.Server.Warps;
using Content.Shared.Actions;
@@ -51,6 +52,7 @@ namespace Content.Server.Ghost
SubscribeNetworkEvent<GhostWarpToTargetRequestEvent>(OnGhostWarpToTargetRequest);
SubscribeLocalEvent<GhostComponent, BooActionEvent>(OnActionPerform);
SubscribeLocalEvent<GhostComponent, InsertIntoEntityStorageAttemptEvent>(OnEntityStorageInsertAttempt);
}
private void OnActionPerform(EntityUid uid, GhostComponent component, BooActionEvent args)
{
@@ -265,5 +267,10 @@ namespace Content.Server.Ghost
return players;
}
public void OnEntityStorageInsertAttempt(EntityUid uid, GhostComponent comp, InsertIntoEntityStorageAttemptEvent args)
{
args.Cancel();
}
}
}