diff --git a/Content.Client/Access/UI/IdCardConsoleWindow.xaml b/Content.Client/Access/UI/IdCardConsoleWindow.xaml
index a2f5f3382b..0a695a3dce 100644
--- a/Content.Client/Access/UI/IdCardConsoleWindow.xaml
+++ b/Content.Client/Access/UI/IdCardConsoleWindow.xaml
@@ -1,6 +1,7 @@
+
@@ -16,6 +17,7 @@
+
@@ -26,10 +28,19 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs b/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
index 202653f700..30a7d969b6 100644
--- a/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
+++ b/Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs
@@ -79,6 +79,18 @@ namespace Content.Client.Access.UI
JobPresetOptionButton.AddItem(Loc.GetString(job.Name), _jobPrototypeIds.Count - 1);
}
+ SelectAllButton.OnPressed += _ =>
+ {
+ SetAllAccess(true);
+ SubmitData();
+ };
+
+ DeselectAllButton.OnPressed += _ =>
+ {
+ SetAllAccess(false);
+ SubmitData();
+ };
+
JobPresetOptionButton.OnItemSelected += SelectJobPreset;
_accessButtons.Populate(accessLevels, prototypeManager);
AccessLevelControlContainer.AddChild(_accessButtons);
@@ -89,14 +101,13 @@ namespace Content.Client.Access.UI
}
}
- private void ClearAllAccess()
+ /// If true, every individual access button will be pressed. If false, each will be depressed.
+ private void SetAllAccess(bool enabled)
{
foreach (var button in _accessButtons.ButtonsList.Values)
{
- if (button.Pressed)
- {
- button.Pressed = false;
- }
+ if (!button.Disabled && button.Pressed != enabled)
+ button.Pressed = enabled;
}
}
@@ -110,7 +121,7 @@ namespace Content.Client.Access.UI
JobTitleLineEdit.Text = Loc.GetString(job.Name);
args.Button.SelectId(args.Id);
- ClearAllAccess();
+ SetAllAccess(false);
// this is a sussy way to do this
foreach (var access in job.Access)
diff --git a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
index d20c741673..7566942506 100644
--- a/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
+++ b/Content.Client/Administration/UI/BanPanel/BanPanel.xaml.cs
@@ -226,7 +226,7 @@ public sealed partial class BanPanel : DefaultWindow
var roleGroupCheckbox = new Button
{
Name = $"{groupName}GroupCheckbox",
- Text = "Ban all",
+ Text = Loc.GetString("role-bans-ban-group"),
Margin = new Thickness(0, 0, 5, 0),
ToggleMode = true,
};
@@ -391,7 +391,7 @@ public sealed partial class BanPanel : DefaultWindow
TimeLine.Text = args.Text;
if (!double.TryParse(args.Text, out var result))
{
- ExpiresLabel.Text = "err";
+ ExpiresLabel.Text = Loc.GetString("ban-panel-expiry-error");
ErrorLevel |= ErrorLevelEnum.Minutes;
TimeLine.ModulateSelfOverride = Color.Red;
UpdateSubmitEnabled();
diff --git a/Content.Client/Administration/UI/Logs/AdminLogsEui.cs b/Content.Client/Administration/UI/Logs/AdminLogsEui.cs
index 1544b827ae..28aca23f75 100644
--- a/Content.Client/Administration/UI/Logs/AdminLogsEui.cs
+++ b/Content.Client/Administration/UI/Logs/AdminLogsEui.cs
@@ -166,7 +166,7 @@ public sealed class AdminLogsEui : BaseEui
ClydeWindow = _clyde.CreateWindow(new WindowCreateParameters
{
Maximized = false,
- Title = "Admin Logs",
+ Title = Loc.GetString("admin-logs-title"),
Monitor = monitor,
Width = 1100,
Height = 400
diff --git a/Content.Client/Crayon/CrayonComponent.cs b/Content.Client/Crayon/CrayonComponent.cs
deleted file mode 100644
index 5729c616c2..0000000000
--- a/Content.Client/Crayon/CrayonComponent.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Content.Shared.Crayon;
-using Robust.Shared.GameObjects;
-using Robust.Shared.ViewVariables;
-
-namespace Content.Client.Crayon
-{
- [RegisterComponent]
- public sealed partial class CrayonComponent : SharedCrayonComponent
- {
- [ViewVariables(VVAccess.ReadWrite)] public bool UIUpdateNeeded;
- [ViewVariables] public int Charges { get; set; }
- [ViewVariables] public int Capacity { get; set; }
- }
-}
diff --git a/Content.Client/Crayon/CrayonSystem.cs b/Content.Client/Crayon/CrayonSystem.cs
index dc03979481..e990263bf3 100644
--- a/Content.Client/Crayon/CrayonSystem.cs
+++ b/Content.Client/Crayon/CrayonSystem.cs
@@ -1,67 +1,52 @@
using Content.Client.Items;
using Content.Client.Message;
using Content.Client.Stylesheets;
+using Content.Shared.Charges.Components;
+using Content.Shared.Charges.Systems;
using Content.Shared.Crayon;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
-using Robust.Shared.GameObjects;
-using Robust.Shared.GameStates;
-using Robust.Shared.Localization;
using Robust.Shared.Timing;
namespace Content.Client.Crayon;
public sealed class CrayonSystem : SharedCrayonSystem
{
- // Didn't do in shared because I don't think most of the server stuff can be predicted.
+ [Dependency] private readonly SharedChargesSystem _charges = default!;
+ [Dependency] private readonly EntityManager _entityManager = default!;
+
public override void Initialize()
{
base.Initialize();
- SubscribeLocalEvent(OnCrayonHandleState);
- Subs.ItemStatus(ent => new StatusControl(ent));
- }
- private static void OnCrayonHandleState(EntityUid uid, CrayonComponent component, ref ComponentHandleState args)
- {
- if (args.Current is not CrayonComponentState state) return;
-
- component.Color = state.Color;
- component.SelectedState = state.State;
- component.Charges = state.Charges;
- component.Capacity = state.Capacity;
-
- component.UIUpdateNeeded = true;
+ Subs.ItemStatus(ent => new StatusControl(ent, _charges, _entityManager));
}
private sealed class StatusControl : Control
{
- private readonly CrayonComponent _parent;
+ private readonly Entity _crayon;
+ private readonly SharedChargesSystem _charges;
private readonly RichTextLabel _label;
+ private readonly int _capacity;
- public StatusControl(CrayonComponent parent)
+ public StatusControl(Entity crayon, SharedChargesSystem charges, EntityManager entityManage)
{
- _parent = parent;
+ _crayon = crayon;
+ _charges = charges;
+ _capacity = entityManage.GetComponent(_crayon.Owner).MaxCharges;
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
AddChild(_label);
-
- parent.UIUpdateNeeded = true;
}
protected override void FrameUpdate(FrameEventArgs args)
{
base.FrameUpdate(args);
- if (!_parent.UIUpdateNeeded)
- {
- return;
- }
-
- _parent.UIUpdateNeeded = false;
_label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label",
- ("color",_parent.Color),
- ("state",_parent.SelectedState),
- ("charges", _parent.Charges),
- ("capacity",_parent.Capacity)));
+ ("color",_crayon.Comp.Color),
+ ("state",_crayon.Comp.SelectedState),
+ ("charges", _charges.GetCurrentCharges(_crayon.Owner)),
+ ("capacity", _capacity)));
}
}
}
diff --git a/Content.Client/Credits/CreditsWindow.xaml.cs b/Content.Client/Credits/CreditsWindow.xaml.cs
index 050d801170..6035bcc2bd 100644
--- a/Content.Client/Credits/CreditsWindow.xaml.cs
+++ b/Content.Client/Credits/CreditsWindow.xaml.cs
@@ -100,11 +100,11 @@ public sealed partial class CreditsWindow : DefaultWindow
var container = new BoxContainer { Orientation = LayoutOrientation.Horizontal };
- var previousPageButton = new Button { Text = "Previous Page" };
+ var previousPageButton = new Button { Text = Loc.GetString("credits-window-previous-page-button") };
previousPageButton.OnPressed +=
_ => PopulateAttributions(attributionsContainer, count - AttributionsSourcesPerPage);
- var nextPageButton = new Button { Text = "Next Page" };
+ var nextPageButton = new Button { Text = Loc.GetString("credits-window-next-page-button") };
nextPageButton.OnPressed +=
_ => PopulateAttributions(attributionsContainer, count + AttributionsSourcesPerPage);
diff --git a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
index 179304a978..f88fa07f5a 100644
--- a/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
+++ b/Content.Client/CriminalRecords/CriminalRecordsConsoleWindow.xaml
@@ -58,7 +58,7 @@
StyleClasses="LabelBig" />
-
-
-
+
+
-
+
diff --git a/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs b/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs
index 4cde587c58..4d9d6a90ba 100644
--- a/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs
+++ b/Content.Client/Humanoid/HumanoidMarkingModifierWindow.xaml.cs
@@ -118,7 +118,7 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
});
_enable = new CheckBox
{
- Text = "Enable",
+ Text = Loc.GetString("humanoid-marking-modifier-enable"),
HorizontalAlignment = HAlignment.Right
};
@@ -134,8 +134,8 @@ public sealed partial class HumanoidMarkingModifierWindow : DefaultWindow
OnStateChanged!();
};
- var lineEditBox = new BoxContainer();
- lineEditBox.AddChild(new Label { Text = "Prototype id: "});
+ var lineEditBox = new BoxContainer { SeparationOverride = 4 };
+ lineEditBox.AddChild(new Label { Text = Loc.GetString("humanoid-marking-modifier-prototype-id") });
// TODO: This line edit should really be an options / dropdown selector, not text.
_lineEdit = new() { MinWidth = 200 };
diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
index 821722ec35..b568491b67 100644
--- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
+++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
@@ -607,6 +607,7 @@ namespace Content.Client.Lobby.UI
_species.Clear();
_species.AddRange(_prototypeManager.EnumeratePrototypes().Where(o => o.RoundStart));
+ _species.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.CurrentCultureIgnoreCase));
var speciesIds = _species.Select(o => o.ID).ToList();
for (var i = 0; i < _species.Count; i++)
diff --git a/Content.Client/Medical/CrewMonitoring/CrewMonitoringNavMapControl.cs b/Content.Client/Medical/CrewMonitoring/CrewMonitoringNavMapControl.cs
index 651c76e61f..1a68099de0 100644
--- a/Content.Client/Medical/CrewMonitoring/CrewMonitoringNavMapControl.cs
+++ b/Content.Client/Medical/CrewMonitoring/CrewMonitoringNavMapControl.cs
@@ -62,7 +62,7 @@ public sealed partial class CrewMonitoringNavMapControl : NavMapControl
continue;
if (!LocalizedNames.TryGetValue(netEntity, out var name))
- name = "Unknown";
+ name = Loc.GetString("navmap-unknown-entity");
var message = name + "\n" + Loc.GetString("navmap-location",
("x", MathF.Round(blip.Coordinates.X)),
diff --git a/Content.Client/Medical/CrewMonitoring/CrewMonitoringWindow.xaml b/Content.Client/Medical/CrewMonitoring/CrewMonitoringWindow.xaml
index dd40749d33..86e1ce689a 100644
--- a/Content.Client/Medical/CrewMonitoring/CrewMonitoringWindow.xaml
+++ b/Content.Client/Medical/CrewMonitoring/CrewMonitoringWindow.xaml
@@ -1,7 +1,7 @@
@@ -11,12 +11,12 @@
-
+
+ PlaceHolder="{Loc crew-monitoring-ui-filter-line-placeholder}" />