фиксы

This commit is contained in:
Vigers Ray 2024-11-13 05:18:48 +03:00
parent 38889342ad
commit c4af6e90af
11 changed files with 28 additions and 36 deletions

View file

@ -349,7 +349,7 @@ namespace Content.Client.Lobby
if (!_prototypeManager.TryIndex<LobbyAnimationPrototype>(lobbyAnimation, out var lobbyAnimationPrototype))
return;
Lobby!.LobbyAnimation.SetFromSpriteSpecifier(new SpriteSpecifier.Rsi(lobbyAnimationPrototype.Animation, lobbyAnimationPrototype.State));
Lobby!.LobbyAnimation.SetFromSpriteSpecifier(new SpriteSpecifier.Rsi(new ResPath(lobbyAnimationPrototype.Animation), lobbyAnimationPrototype.State));
Lobby!.LobbyAnimation.DisplayRect.TextureScale = lobbyAnimationPrototype.Scale;
}

View file

@ -1,12 +1,13 @@
<ui:ChoiceControl
<choice:ChoiceControl
xmlns="https://spacestation14.io"
xmlns:ui="clr-namespace:Content.Client._Sunrise">
xmlns:ui="clr-namespace:Content.Client._Sunrise"
xmlns:choice="clr-namespace:Content.Client._Sunrise.Choice">
<BoxContainer Orientation="Horizontal">
<Button Name="Button" Access="Public"
HorizontalExpand="True" VerticalExpand="False"
StyleClasses="ButtonSquare" Margin="0">
<BoxContainer Orientation="Horizontal" Margin="0">
<TextureRect Name="Texture" Access="Public"
<TextureRect Name="Icon" Access="Public"
HorizontalExpand="False" VerticalExpand="False"
Margin="1"/>
<Control MinWidth="5"/>
@ -14,4 +15,4 @@
</BoxContainer>
</Button>
</BoxContainer>
</ui:ChoiceControl>
</choice:ChoiceControl>

View file

@ -1,11 +1,12 @@
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Utility;
// Taken from RMC14 build.
// https://github.com/RMC-14/RMC-14
namespace Content.Client._Sunrise;
namespace Content.Client._Sunrise.Choice;
[GenerateTypedNameReferences]
[Virtual]
@ -13,15 +14,15 @@ public partial class ChoiceControl : Control
{
public ChoiceControl() => RobustXamlLoader.Load(this);
public void Set(string name, Texture? texture)
public void Set(string name, Robust.Client.Graphics.Texture? texture)
{
NameLabel.SetMessage(name);
Texture.Texture = texture;
Icon.Texture = texture;
}
public void Set(FormattedMessage msg, Texture? texture)
public void Set(FormattedMessage msg, Robust.Client.Graphics.Texture? texture)
{
NameLabel.SetMessage(msg);
Texture.Texture = texture;
Icon.Texture = texture;
}
}

View file

@ -1,10 +1,10 @@
using Content.Client.Administration.UI.CustomControls;
using Content.Client._Sunrise.Choice;
using Content.Client.Administration.UI.CustomControls;
using Content.Client.Hands.Systems;
using Content.Shared._Sunrise.Medical.Surgery;
using Content.Shared.Body.Part;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
@ -47,7 +47,7 @@ public sealed class SurgeryBui : BoundUserInterface
_lastRefresh = DateTime.UtcNow;
RefreshUI();
}
protected override void Open() => UpdateState(State);
protected override void Open() => UpdateState(State);
protected override void UpdateState(BoundUserInterfaceState? state)
{
if (state is SurgeryBuiState s)
@ -253,7 +253,7 @@ public sealed class SurgeryBui : BoundUserInterface
_window.Surgeries.DisposeAllChildren();
var surgeries = new List<(Entity<SurgeryComponent> Ent, EntProtoId Id, string Name, bool IsCompleted, Texture?)>();
var surgeries = new List<(Entity<SurgeryComponent> Ent, EntProtoId Id, string Name, bool IsCompleted, Robust.Client.Graphics.Texture?)>();
foreach (var (surgeryId, suffix, isCompleted) in surgeryIds)
{
if (_system.GetSingleton(surgeryId) is not { } surgery ||

View file

@ -1,4 +1,5 @@
using Robust.Client.AutoGenerated;
using Content.Client._Sunrise.Choice;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
namespace Content.Client._Sunrise.Medical.Surgery;

View file

@ -12,7 +12,7 @@ public sealed partial class LobbyAnimationPrototype : IPrototype
public string ID { get; set; } = default!;
[DataField("animation", required: true)]
public ResPath Animation = default!;
public string Animation = default!;
[DataField("scale")]
public Vector2 Scale = new(1f, 1f);

View file

@ -1,5 +1,2 @@
ent-ClothingBeltSheathSyndicateFilled = { ent-ClothingBeltSheathSyndicate }
.suffix = Заполнен
.desc = { ent-ClothingBeltSheathSyndicate.desc }
ent-BeltSheathSyndieFilledBox = обёрнутая рапира синдиката
.desc = Разверните.
.desc = Разверните.

View file

@ -30,17 +30,3 @@ ent-Cartridge556 = патрон (5.56 мм)
ent-Cartridge762x39 = патрон (.30 мм)
ent-Cartridge762x54 = патрон (7.62x54 мм)
ent-Cartridge050 = патрон (.50 мм)
ent-BaseMagazinePistolCaselessRifleExtended = расширенный пистолетный магазин (.20 безгильзовый)
ent-MagazinePPSH41Extended = расширенный магазин PPSH41
ent-MagazineMP5Extended = расширенный магазин MP5
ent-MagazineMP7Extended = расширенный магазин MP7
ent-MagazineP90Extended = расширенный магазин P90
ent-MagazineM16A4Extended = расширенный магазин M16A4
ent-MagazineAR18Extended = расширенный магазин AR18
ent-MagazineM28Extended = расширенный магазин M28
ent-MagazineG36Extended = расширенный магазин G36
ent-MagazineFamasExtended = расширенный магазин Famas
ent-MagazineV31Extended = расширенный магазин V31
ent-MagazineBauer127Extended = расширенный магазин Bauer127
ent-MagazineBR64Extended = расширенный магазин BR64
ent-MagazineDragunovExtended = расширенный магазин Dragunov

View file

@ -6,7 +6,7 @@
- type: lobbyAnimation
id: Billy
animation: _Sunrise/Lobby/Animations/billy
scale: 12, 12
scale: 13, 13
- type: lobbyAnimation
id: BlackHole

View file

@ -21,6 +21,9 @@
{
"name": "equipped-BELT",
"directions": 4
},
{
"name": "storage"
}
]
}

View file

@ -21,6 +21,9 @@
{
"name": "equipped-BELT",
"directions": 4
},
{
"name": "storage"
}
]
}