Skip to content

Commit

Permalink
Revert "Доработка панели взаимодействия (space-sunrise#145)"
Browse files Browse the repository at this point in the history
This reverts commit 139629c.
  • Loading branch information
VigersRay committed Jan 22, 2025
1 parent f43738e commit 2bc550c
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 410 deletions.
19 changes: 10 additions & 9 deletions Content.Client/_Sunrise/ERP/InteractionEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
using Robust.Client.Player;
using Robust.Shared.Timing;
using Content.Shared.IdentityManagement;

namespace Content.Client._Sunrise.ERP
{
[UsedImplicitly]
public sealed class InteractionEui : BaseEui
{
private InteractionWindow _window;
private readonly InteractionWindow _window;
public IEntityManager _entManager;

[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IChatManager _chat = default!;
[Dependency] private readonly IPlayerManager _player = default!;
Expand All @@ -27,10 +27,7 @@ public InteractionEui()
{
_entManager = IoCManager.Resolve<IEntityManager>();
_window = new InteractionWindow(this);
_window.OnClose += () =>
{
SendMessage(new CloseEuiMessage());
};
_window.OnClose += OnClosed;
}

public override void HandleMessage(EuiMessageBase msg)
Expand Down Expand Up @@ -70,9 +67,13 @@ public void RequestState()
SendMessage(new RequestInteractionState());
}

private void OnClosed()
{
SendMessage(new CloseEuiMessage());
}

public override void Opened()
{
base.Opened();
_window.OpenCenteredLeft();
}

Expand Down Expand Up @@ -101,10 +102,10 @@ public override void HandleState(EuiStateBase state)

public void FrameUpdate(FrameEventArgs args)
{
foreach ((var item, var time, var text) in _disabledItems)
foreach((var item, var time, var text) in _disabledItems)
{
item.Text = text + $" ({(time - _gameTiming.CurTime).Seconds} сек.)";
if (_gameTiming.CurTime >= time)
if(_gameTiming.CurTime >= time)
{
item.Text = text;
item.Disabled = false;
Expand Down
Loading

0 comments on commit 2bc550c

Please sign in to comment.