-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #588 from Rxup/upstream-sync
Upstream sync
- Loading branch information
Showing
477 changed files
with
5,253 additions
and
3,028 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using Robust.Client.GameObjects; | ||
using Content.Shared.Fax.Components; | ||
using Content.Shared.Fax; | ||
using Robust.Client.Animations; | ||
|
||
namespace Content.Client.Fax.System; | ||
|
||
/// <summary> | ||
/// Visualizer for the fax machine which displays the correct sprite based on the inserted entity. | ||
/// </summary> | ||
public sealed class FaxVisualsSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly AnimationPlayerSystem _player = default!; | ||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<FaxMachineComponent, AppearanceChangeEvent>(OnAppearanceChanged); | ||
} | ||
|
||
private void OnAppearanceChanged(EntityUid uid, FaxMachineComponent component, ref AppearanceChangeEvent args) | ||
{ | ||
if (args.Sprite == null) | ||
return; | ||
|
||
if (_appearance.TryGetData(uid, FaxMachineVisuals.VisualState, out FaxMachineVisualState visuals) && visuals == FaxMachineVisualState.Inserting) | ||
{ | ||
_player.Play(uid, new Animation() | ||
{ | ||
Length = TimeSpan.FromSeconds(2.4), | ||
AnimationTracks = | ||
{ | ||
new AnimationTrackSpriteFlick() | ||
{ | ||
LayerKey = FaxMachineVisuals.VisualState, | ||
KeyFrames = | ||
{ | ||
new AnimationTrackSpriteFlick.KeyFrame(component.InsertingState, 0f), | ||
new AnimationTrackSpriteFlick.KeyFrame("icon", 2.4f), | ||
} | ||
} | ||
} | ||
}, "faxecute"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Content.Client.Labels.UI; | ||
using Content.Shared.Labels; | ||
using Content.Shared.Labels.Components; | ||
using Content.Shared.Labels.EntitySystems; | ||
|
||
namespace Content.Client.Labels.EntitySystems; | ||
|
||
public sealed class HandLabelerSystem : SharedHandLabelerSystem | ||
{ | ||
protected override void UpdateUI(Entity<HandLabelerComponent> ent) | ||
{ | ||
if (UserInterfaceSystem.TryGetOpenUi(ent.Owner, HandLabelerUiKey.Key, out var bui) | ||
&& bui is HandLabelerBoundUserInterface cBui) | ||
{ | ||
cBui.Reload(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.