Fix popup bugs (#13233)

This commit is contained in:
Leon Friedrich
2022-12-31 12:46:04 +13:00
committed by GitHub
parent 89ea6eda3e
commit 2f4e90a3e0
2 changed files with 5 additions and 5 deletions

View File

@@ -109,13 +109,13 @@ namespace Content.Client.Popups
public override void PopupEntity(string message, EntityUid uid, EntityUid recipient, PopupType type = PopupType.Small) public override void PopupEntity(string message, EntityUid uid, EntityUid recipient, PopupType type = PopupType.Small)
{ {
if (_playerManager.LocalPlayer?.ControlledEntity == recipient) if (_playerManager.LocalPlayer?.ControlledEntity == recipient)
PopupCursor(message, type); PopupEntity(message, uid, type);
} }
public override void PopupEntity(string message, EntityUid uid, ICommonSession recipient, PopupType type = PopupType.Small) public override void PopupEntity(string message, EntityUid uid, ICommonSession recipient, PopupType type = PopupType.Small)
{ {
if (_playerManager.LocalPlayer?.Session == recipient) if (_playerManager.LocalPlayer?.Session == recipient)
PopupCursor(message, type); PopupEntity(message, uid, type);
} }
public override void PopupEntity(string message, EntityUid uid, Filter filter, bool recordReplay, PopupType type=PopupType.Small) public override void PopupEntity(string message, EntityUid uid, Filter filter, bool recordReplay, PopupType type=PopupType.Small)

View File

@@ -72,18 +72,18 @@ namespace Content.Shared.Stacks
switch (transfered) switch (transfered)
{ {
case > 0: case > 0:
PopupSystem.PopupCoordinates($"+{transfered}", popupPos); PopupSystem.PopupCoordinates($"+{transfered}", popupPos, Filter.Local(), false);
if (GetAvailableSpace(recipientStack) == 0) if (GetAvailableSpace(recipientStack) == 0)
{ {
PopupSystem.PopupCoordinates(Loc.GetString("comp-stack-becomes-full"), PopupSystem.PopupCoordinates(Loc.GetString("comp-stack-becomes-full"),
popupPos.Offset(new Vector2(0, -0.5f))); popupPos.Offset(new Vector2(0, -0.5f)), Filter.Local(), false);
} }
break; break;
case 0 when GetAvailableSpace(recipientStack) == 0: case 0 when GetAvailableSpace(recipientStack) == 0:
PopupSystem.PopupCoordinates(Loc.GetString("comp-stack-already-full"), popupPos); PopupSystem.PopupCoordinates(Loc.GetString("comp-stack-already-full"), popupPos, Filter.Local(), false);
break; break;
} }
} }