Un-revert IPlayerManager refactor (#21244)
This commit is contained in:
@@ -10,7 +10,6 @@ using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Storage;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -43,8 +42,8 @@ namespace Content.Client.Inventory
|
||||
UpdatesOutsidePrediction = true;
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<InventorySlotsComponent, PlayerAttachedEvent>(OnPlayerAttached);
|
||||
SubscribeLocalEvent<InventorySlotsComponent, PlayerDetachedEvent>(OnPlayerDetached);
|
||||
SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
|
||||
SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
|
||||
|
||||
SubscribeLocalEvent<InventoryComponent, ComponentShutdown>(OnShutdown);
|
||||
|
||||
@@ -113,12 +112,12 @@ namespace Content.Client.Inventory
|
||||
OnUnlinkInventory?.Invoke();
|
||||
}
|
||||
|
||||
private void OnPlayerDetached(EntityUid uid, InventorySlotsComponent component, PlayerDetachedEvent args)
|
||||
private void OnPlayerDetached(EntityUid uid, InventorySlotsComponent component, LocalPlayerDetachedEvent args)
|
||||
{
|
||||
OnUnlinkInventory?.Invoke();
|
||||
}
|
||||
|
||||
private void OnPlayerAttached(EntityUid uid, InventorySlotsComponent component, PlayerAttachedEvent args)
|
||||
private void OnPlayerAttached(EntityUid uid, InventorySlotsComponent component, LocalPlayerAttachedEvent args)
|
||||
{
|
||||
if (TryGetSlots(uid, out var definitions))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user