forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master-ru' into 'master-ru'
Upstream sync (Some locale fixes) See merge request Workbench-Team/space-station-14!126
- Loading branch information
Showing
83 changed files
with
5,489 additions
and
5,002 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
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
Content.Client/AirlockPainter/UI/AirlockPainterBoundUserInterface.cs
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
Content.Client/AirlockPainter/UI/AirlockPainterWindow.xaml
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
Content.Client/AirlockPainter/UI/AirlockPainterWindow.xaml.cs
This file was deleted.
Oops, something went wrong.
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,53 @@ | ||
using Content.Shared.SprayPainter; | ||
using Robust.Client.Graphics; | ||
using Robust.Client.ResourceManagement; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations; | ||
using Robust.Shared.Utility; | ||
using System.Linq; | ||
|
||
namespace Content.Client.SprayPainter; | ||
|
||
public sealed class SprayPainterSystem : SharedSprayPainterSystem | ||
{ | ||
[Dependency] private readonly IResourceCache _resourceCache = default!; | ||
|
||
public List<SprayPainterEntry> Entries { get; private set; } = new(); | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
foreach (string style in Styles) | ||
{ | ||
string? iconPath = Groups | ||
.FindAll(x => x.StylePaths.ContainsKey(style))? | ||
.MaxBy(x => x.IconPriority)?.StylePaths[style]; | ||
if (iconPath == null) | ||
{ | ||
Entries.Add(new SprayPainterEntry(style, null)); | ||
continue; | ||
} | ||
|
||
RSIResource doorRsi = _resourceCache.GetResource<RSIResource>(SpriteSpecifierSerializer.TextureRoot / new ResPath(iconPath)); | ||
if (!doorRsi.RSI.TryGetState("closed", out var icon)) | ||
{ | ||
Entries.Add(new SprayPainterEntry(style, null)); | ||
continue; | ||
} | ||
|
||
Entries.Add(new SprayPainterEntry(style, icon.Frame0)); | ||
} | ||
} | ||
} | ||
|
||
public sealed class SprayPainterEntry | ||
{ | ||
public string Name; | ||
public Texture? Icon; | ||
|
||
public SprayPainterEntry(string name, Texture? icon) | ||
{ | ||
Name = name; | ||
Icon = icon; | ||
} | ||
} |
Oops, something went wrong.