Skip to content

Commit 1df36be

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Home-Run-Bat
2 parents 6ed75bb + 6d701a7 commit 1df36be

File tree

1,778 files changed

+352581
-280097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,778 files changed

+352581
-280097
lines changed

.github/CODEOWNERS

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
# Last match in file takes precedence.
22

3-
/Content.*/ @DebugOk
43
/Content.*/SimpleStation14/ @DEATHB4DEFEAT
54

6-
/Resources/ @DebugOk
7-
/Resources/ConfigPresets/ @DebugOk
8-
/Resources/*.yml @DebugOk @Colin-Tel
5+
/Resources/*.yml @Colin-Tel
96
/Resources/*/SimpleStation14/ @DEATHB4DEFEAT
107
/Resources/Maps/ @IamVelcroboy
118
/Resources/Prototypes/Maps/ @IamVelcroboy
12-
13-
/Tools/ @DebugOk
14-
15-
/* @DebugOk # Standalone files in root, shouldn't apply to subdirectories
16-
/.github/ @DebugOk # Workflows, codeowners, templates, etc

.github/workflows/check-crlf.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CRLF Check
2+
3+
on:
4+
pull_request:
5+
types: [ opened, reopened, synchronize, ready_for_review ]
6+
7+
jobs:
8+
build:
9+
name: CRLF Check
10+
if: github.event.pull_request.draft == false
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/[email protected]
14+
- name: Check for CRLF
15+
run: Tools/check_crlf.py

.github/workflows/close-master-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Close PR's on master
1+
name: Close PRs on master
22

33
on:
44
pull_request_target:
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Labels: Untriaged"
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
add_label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions-ecosystem/action-add-labels@v1
12+
with:
13+
labels: "Status: Untriaged"

Content.Client/Actions/ActionsSystem.cs

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ private void BaseHandleState<T>(EntityUid uid, BaseActionComponent component, Ba
9595
component.Container = EnsureEntity<T>(state.Container, uid);
9696
component.EntityIcon = EnsureEntity<T>(state.EntityIcon, uid);
9797
component.CheckCanInteract = state.CheckCanInteract;
98+
component.CheckConsciousness = state.CheckConsciousness;
9899
component.ClientExclusive = state.ClientExclusive;
99100
component.Priority = state.Priority;
100101
component.AttachedEntity = EnsureEntity<T>(state.AttachedEntity, uid);

Content.Client/Administration/UI/AdminRemarks/AdminMessageEui.cs

+11-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Content.Shared.Administration.Notes;
33
using Content.Shared.Eui;
44
using JetBrains.Annotations;
5+
using Robust.Client.UserInterface.Controls;
56
using static Content.Shared.Administration.Notes.AdminMessageEuiMsg;
67

78
namespace Content.Client.Administration.UI.AdminRemarks;
@@ -14,9 +15,8 @@ public sealed class AdminMessageEui : BaseEui
1415
public AdminMessageEui()
1516
{
1617
_popup = new AdminMessagePopupWindow();
17-
_popup.OnAcceptPressed += () => SendMessage(new Accept());
18-
_popup.OnDismissPressed += () => SendMessage(new Dismiss());
19-
_popup.OnClose += () => SendMessage(new CloseEuiMessage());
18+
_popup.OnAcceptPressed += () => SendMessage(new Dismiss(true));
19+
_popup.OnDismissPressed += () => SendMessage(new Dismiss(false));
2020
}
2121

2222
public override void HandleState(EuiStateBase state)
@@ -26,13 +26,17 @@ public override void HandleState(EuiStateBase state)
2626
return;
2727
}
2828

29-
_popup.SetMessage(s.Message);
30-
_popup.SetDetails(s.AdminName, s.AddedOn);
31-
_popup.Timer = s.Time;
29+
_popup.SetState(s);
3230
}
3331

3432
public override void Opened()
3533
{
36-
_popup.OpenCentered();
34+
_popup.UserInterfaceManager.WindowRoot.AddChild(_popup);
35+
LayoutContainer.SetAnchorPreset(_popup, LayoutContainer.LayoutPreset.Wide);
36+
}
37+
38+
public override void Closed()
39+
{
40+
_popup.Orphan();
3741
}
3842
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Control xmlns="https://spacestation14.io" Margin="0 0 0 8">
2+
<BoxContainer Orientation="Vertical">
3+
<RichTextLabel Name="Admin" Margin="0 0 0 4" />
4+
<RichTextLabel Name="Message" Margin="2 0 0 0" />
5+
</BoxContainer>
6+
</Control>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Content.Shared.Administration.Notes;
2+
using Robust.Client.AutoGenerated;
3+
using Robust.Client.UserInterface;
4+
using Robust.Client.UserInterface.XAML;
5+
using Robust.Shared.Utility;
6+
7+
namespace Content.Client.Administration.UI.AdminRemarks;
8+
9+
[GenerateTypedNameReferences]
10+
public sealed partial class AdminMessagePopupMessage : Control
11+
{
12+
public AdminMessagePopupMessage(AdminMessageEuiState.Message message)
13+
{
14+
RobustXamlLoader.Load(this);
15+
16+
Admin.SetMessage(FormattedMessage.FromMarkup(Loc.GetString(
17+
"admin-notes-message-admin",
18+
("admin", message.AdminName),
19+
("date", message.AddedOn.ToLocalTime()))));
20+
21+
Message.SetMessage(message.Text);
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1-
<ui:FancyWindow xmlns="https://spacestation14.io"
2-
xmlns:ui="clr-namespace:Content.Client.UserInterface.Controls"
3-
VerticalExpand="True" HorizontalExpand="True"
4-
Title="{Loc admin-notes-message-window-title}"
5-
MinSize="600 170">
6-
<PanelContainer VerticalExpand="True" HorizontalExpand="True" StyleClasses="BackgroundDark">
7-
<ScrollContainer HScrollEnabled="False" VerticalExpand="True" HorizontalExpand="True" Margin="4">
8-
<BoxContainer Orientation="Vertical" SeparationOverride="10" VerticalAlignment="Bottom">
9-
<Label Name="AdminLabel" Text="Loading..." />
10-
<RichTextLabel Name="MessageLabel" />
1+
<Control xmlns="https://spacestation14.io"
2+
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client">
3+
<PanelContainer MouseFilter="Stop">
4+
<PanelContainer.PanelOverride>
5+
<!-- semi-transparent background -->
6+
<gfx:StyleBoxFlat BackgroundColor="#000000AA" />
7+
</PanelContainer.PanelOverride>
8+
9+
<Control HorizontalAlignment="Center" VerticalAlignment="Center" MaxWidth="600">
10+
<PanelContainer StyleClasses="AngleRect" />
11+
12+
<BoxContainer Orientation="Vertical" Margin="4">
13+
<RichTextLabel Name="Description" />
14+
15+
<!-- Contains actual messages -->
16+
<ScrollContainer HScrollEnabled="False" Margin="4" VerticalExpand="True" ReturnMeasure="True" MaxHeight="400">
17+
<BoxContainer Orientation="Vertical" Name="MessageContainer" Margin="0 2 0 0" />
18+
</ScrollContainer>
19+
1120
<Label Name="WaitLabel" />
1221
<BoxContainer Orientation="Horizontal">
1322
<Button Name="DismissButton"
14-
Text="{Loc 'admin-notes-message-dismiss'}" />
23+
Text="{Loc 'admin-notes-message-dismiss'}"
24+
Disabled="True"
25+
HorizontalExpand="True"
26+
StyleClasses="OpenRight" />
1527
<Button Name="AcceptButton"
1628
Text="{Loc 'admin-notes-message-accept'}"
17-
Disabled="True" />
29+
Disabled="True"
30+
HorizontalExpand="True"
31+
StyleClasses="OpenLeft" />
1832
</BoxContainer>
1933
</BoxContainer>
20-
</ScrollContainer>
34+
</Control>
2135
</PanelContainer>
22-
</ui:FancyWindow>
36+
</Control>
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,65 @@
1-
using Content.Client.UserInterface.Controls;
1+
using Content.Client.Stylesheets;
2+
using Content.Shared.Administration.Notes;
23
using Robust.Client.AutoGenerated;
4+
using Robust.Client.UserInterface;
35
using Robust.Client.UserInterface.Controls;
46
using Robust.Client.UserInterface.XAML;
57
using Robust.Shared.Timing;
8+
using Robust.Shared.Utility;
69

710
namespace Content.Client.Administration.UI.AdminRemarks;
811

912
[GenerateTypedNameReferences]
10-
public sealed partial class AdminMessagePopupWindow : FancyWindow
13+
public sealed partial class AdminMessagePopupWindow : Control
1114
{
1215
private float _timer = float.MaxValue;
13-
public float Timer
14-
{
15-
get => _timer;
16-
set
17-
{
18-
WaitLabel.Text = Loc.GetString("admin-notes-message-wait", ("time", MathF.Floor(value)));
19-
_timer = value;
20-
}
21-
}
2216

2317
public event Action? OnDismissPressed;
18+
2419
public event Action? OnAcceptPressed;
2520

2621
public AdminMessagePopupWindow()
2722
{
2823
RobustXamlLoader.Load(this);
2924

25+
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;
26+
3027
AcceptButton.OnPressed += OnAcceptButtonPressed;
3128
DismissButton.OnPressed += OnDismissButtonPressed;
3229
}
3330

34-
public void SetMessage(string message)
31+
public float Timer
3532
{
36-
MessageLabel.SetMessage(message);
33+
get => _timer;
34+
private set
35+
{
36+
WaitLabel.Text = Loc.GetString("admin-notes-message-wait", ("time", MathF.Floor(value)));
37+
_timer = value;
38+
}
3739
}
3840

39-
public void SetDetails(string adminName, DateTime addedOn)
41+
public void SetState(AdminMessageEuiState state)
4042
{
41-
AdminLabel.Text = Loc.GetString("admin-notes-message-admin", ("admin", adminName), ("date", addedOn));
43+
Timer = (float) state.Time.TotalSeconds;
44+
45+
MessageContainer.RemoveAllChildren();
46+
47+
foreach (var message in state.Messages)
48+
{
49+
MessageContainer.AddChild(new AdminMessagePopupMessage(message));
50+
}
51+
52+
Description.SetMessage(FormattedMessage.FromMarkup(Loc.GetString("admin-notes-message-desc", ("count", state.Messages.Length))));
4253
}
4354

4455
private void OnDismissButtonPressed(BaseButton.ButtonEventArgs obj)
4556
{
4657
OnDismissPressed?.Invoke();
47-
Close();
4858
}
4959

5060
private void OnAcceptButtonPressed(BaseButton.ButtonEventArgs obj)
5161
{
5262
OnAcceptPressed?.Invoke();
53-
Close();
5463
}
5564

5665
protected override void FrameUpdate(FrameEventArgs args)
@@ -70,6 +79,7 @@ protected override void FrameUpdate(FrameEventArgs args)
7079
else
7180
{
7281
AcceptButton.Disabled = false;
82+
DismissButton.Disabled = false;
7383
}
7484
}
7585
}

Content.Client/Administration/UI/ManageSolutions/EditSolutionsWindow.xaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<BoxContainer Name="VolumeBox" Orientation="Vertical" HorizontalExpand="True" Margin="0 4"/>
1313

1414
<!-- The temperature / heat capacity / thermal energy of the solution -->
15-
<Collapsible Orientation="Vertical">
15+
<Collapsible>
1616
<CollapsibleHeading Name="ThermalHeading" Title="{Loc 'admin-solutions-window-thermals'}" />
1717
<CollapsibleBody>
1818
<BoxContainer Name="ThermalBox" Orientation="Vertical" HorizontalExpand="True" Margin="0 4"/>
@@ -23,7 +23,7 @@
2323
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" Margin="0 4">
2424
<BoxContainer Name="ReagentList" Orientation="Vertical"/>
2525
</ScrollContainer>
26-
26+
2727
<Button Name="AddButton" Text="{Loc 'admin-solutions-window-add-new-button'}" HorizontalExpand="True" Margin="0 4"/>
2828
</BoxContainer>
2929
</DefaultWindow>

Content.Client/Alerts/ClientAlertsSystem.cs

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Robust.Client.Player;
55
using Robust.Shared.Player;
66
using Robust.Shared.Prototypes;
7+
using Robust.Shared.Timing;
78

89
namespace Content.Client.Alerts;
910

@@ -12,6 +13,7 @@ public sealed class ClientAlertsSystem : AlertsSystem
1213
{
1314
public AlertOrderPrototype? AlertOrder { get; set; }
1415

16+
[Dependency] private readonly IGameTiming _timing = default!;
1517
[Dependency] private readonly IPlayerManager _playerManager = default!;
1618
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
1719

@@ -33,7 +35,7 @@ protected override void LoadPrototypes()
3335

3436
AlertOrder = _prototypeManager.EnumeratePrototypes<AlertOrderPrototype>().FirstOrDefault();
3537
if (AlertOrder == null)
36-
Log.Error("alert", "no alertOrder prototype found, alerts will be in random order");
38+
Log.Error("No alertOrder prototype found, alerts will be in random order");
3739
}
3840

3941
public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts
@@ -49,24 +51,23 @@ public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts
4951

5052
protected override void AfterShowAlert(Entity<AlertsComponent> alerts)
5153
{
52-
if (_playerManager.LocalEntity != alerts.Owner)
53-
return;
54-
55-
SyncAlerts?.Invoke(this, alerts.Comp.Alerts);
54+
UpdateHud(alerts);
5655
}
5756

58-
protected override void AfterClearAlert(Entity<AlertsComponent> alertsComponent)
57+
protected override void AfterClearAlert(Entity<AlertsComponent> alerts)
5958
{
60-
if (_playerManager.LocalEntity != alertsComponent.Owner)
61-
return;
59+
UpdateHud(alerts);
60+
}
6261

63-
SyncAlerts?.Invoke(this, alertsComponent.Comp.Alerts);
62+
private void ClientAlertsHandleState(Entity<AlertsComponent> alerts, ref AfterAutoHandleStateEvent args)
63+
{
64+
UpdateHud(alerts);
6465
}
6566

66-
private void ClientAlertsHandleState(EntityUid uid, AlertsComponent component, ref AfterAutoHandleStateEvent args)
67+
private void UpdateHud(Entity<AlertsComponent> entity)
6768
{
68-
if (_playerManager.LocalEntity == uid)
69-
SyncAlerts?.Invoke(this, component.Alerts);
69+
if (_playerManager.LocalEntity == entity.Owner)
70+
SyncAlerts?.Invoke(this, entity.Comp.Alerts);
7071
}
7172

7273
private void OnPlayerAttached(EntityUid uid, AlertsComponent component, LocalPlayerAttachedEvent args)

Content.Client/Antag/AntagStatusIconSystem.cs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public override void Initialize()
2222
SubscribeLocalEvent<RevolutionaryComponent, GetStatusIconsEvent>(GetRevIcon);
2323
SubscribeLocalEvent<ZombieComponent, GetStatusIconsEvent>(GetIcon);
2424
SubscribeLocalEvent<HeadRevolutionaryComponent, GetStatusIconsEvent>(GetIcon);
25+
SubscribeLocalEvent<InitialInfectedComponent, GetStatusIconsEvent>(GetIcon);
2526
}
2627

2728
/// <summary>

Content.Client/Atmos/Monitor/UI/Widgets/PumpControl.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<BoxContainer xmlns="https://spacestation14.io"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
Orientation="Vertical" Margin="2 0 2 4">
4-
<Collapsible Orientation="Vertical">
4+
<Collapsible>
55
<CollapsibleHeading Name="CAddress" />
66
<!-- Upper row: toggle, direction, checks -->
77
<CollapsibleBody Margin="20 0 0 0">

Content.Client/Atmos/Monitor/UI/Widgets/ScrubberControl.xaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<BoxContainer xmlns="https://spacestation14.io"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
Orientation="Vertical" Margin="2 0 2 4">
4-
<Collapsible Orientation="Vertical">
4+
<Collapsible>
55
<CollapsibleHeading Name="CAddress" />
66
<CollapsibleBody Margin="20 0 0 0">
77
<BoxContainer Orientation="Vertical">
@@ -26,7 +26,7 @@
2626
<Button Name="CCopySettings" Text="{Loc 'air-alarm-ui-widget-copy'}" ToolTip="{Loc 'air-alarm-ui-widget-copy-tooltip'}" />
2727
</BoxContainer>
2828
<!-- Lower row: every single gas -->
29-
<Collapsible Orientation="Vertical" Margin="2 2 2 2">
29+
<Collapsible Margin="2 2 2 2">
3030
<CollapsibleHeading Title="Gas filters" />
3131
<CollapsibleBody Margin="20 0 0 0">
3232
<GridContainer HorizontalExpand="True" Name="CGasContainer" Columns="3" />

0 commit comments

Comments
 (0)