PopupSystem public methods rejig (#12830)

This commit is contained in:
Leon Friedrich
2022-12-19 10:41:47 +13:00
committed by GitHub
parent e459452333
commit 881a2b2ece
164 changed files with 721 additions and 631 deletions

View File

@@ -412,13 +412,13 @@ public sealed class WiresSystem : EntitySystem
if (!EntityManager.TryGetComponent(player, out HandsComponent? handsComponent))
{
_popupSystem.PopupEntity(Loc.GetString("wires-component-ui-on-receive-message-no-hands"), uid, Filter.Entities(player));
_popupSystem.PopupEntity(Loc.GetString("wires-component-ui-on-receive-message-no-hands"), uid, player);
return;
}
if (!_interactionSystem.InRangeUnobstructed(player, uid))
{
_popupSystem.PopupEntity(Loc.GetString("wires-component-ui-on-receive-message-cannot-reach"), uid, Filter.Entities(player));
_popupSystem.PopupEntity(Loc.GetString("wires-component-ui-on-receive-message-cannot-reach"), uid, player);
return;
}
@@ -649,13 +649,13 @@ public sealed class WiresSystem : EntitySystem
case WiresAction.Cut:
if (!_toolSystem.HasQuality(toolEntity, "Cutting", tool))
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), user);
return;
}
if (wire.IsCut)
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-cut-cut-wire"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-cut-cut-wire"), user);
return;
}
@@ -663,13 +663,13 @@ public sealed class WiresSystem : EntitySystem
case WiresAction.Mend:
if (!_toolSystem.HasQuality(toolEntity, "Cutting", tool))
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), user);
return;
}
if (!wire.IsCut)
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-mend-uncut-wire"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-mend-uncut-wire"), user);
return;
}
@@ -677,13 +677,13 @@ public sealed class WiresSystem : EntitySystem
case WiresAction.Pulse:
if (!_toolSystem.HasQuality(toolEntity, "Pulsing", tool))
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-multitool"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-multitool"), user);
return;
}
if (wire.IsCut)
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-pulse-cut-wire"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-pulse-cut-wire"), user);
return;
}
@@ -751,13 +751,13 @@ public sealed class WiresSystem : EntitySystem
case WiresAction.Cut:
if (!_toolSystem.HasQuality(toolEntity, "Cutting", tool))
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), user);
break;
}
if (wire.IsCut)
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-cut-cut-wire"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-cut-cut-wire"), user);
break;
}
@@ -772,13 +772,13 @@ public sealed class WiresSystem : EntitySystem
case WiresAction.Mend:
if (!_toolSystem.HasQuality(toolEntity, "Cutting", tool))
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-wirecutters"), user);
break;
}
if (!wire.IsCut)
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-mend-uncut-wire"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-mend-uncut-wire"), user);
break;
}
@@ -793,13 +793,13 @@ public sealed class WiresSystem : EntitySystem
case WiresAction.Pulse:
if (!_toolSystem.HasQuality(toolEntity, "Pulsing", tool))
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-multitool"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-need-multitool"), user);
break;
}
if (wire.IsCut)
{
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-pulse-cut-wire"), Filter.Entities(user));
_popupSystem.PopupCursor(Loc.GetString("wires-component-ui-on-receive-message-cannot-pulse-cut-wire"), user);
break;
}