-
Notifications
You must be signed in to change notification settings - Fork 617
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 #2414 from space-syndicate/upstream-sync
Upstream sync
- Loading branch information
Showing
382 changed files
with
5,648 additions
and
4,665 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,33 +60,22 @@ jobs: | |
- name: Package client | ||
run: dotnet run --project Content.Packaging client --no-wipe-release | ||
|
||
- name: Update Build Info | ||
env: | ||
FORK_ID: ${{ vars.FORK_ID }} | ||
run: Tools/gen_build_info.py | ||
|
||
- name: Shuffle files around | ||
run: | | ||
mkdir "release/${{ github.sha }}" | ||
mv release/*.zip "release/${{ github.sha }}" | ||
- name: Upload files to mothership | ||
uses: burnett01/[email protected] | ||
with: | ||
switches: -avzr --ignore-existing | ||
path: "release/${{ github.sha }}" | ||
remote_path: ${{ secrets.BUILDS_PATH }} | ||
remote_host: ${{ secrets.BUILDS_HOST }} | ||
remote_user: ${{ secrets.BUILDS_USERNAME }} | ||
remote_key: ${{ secrets.BUILDS_SSH_KEY }} | ||
|
||
- name: Update manifest JSON | ||
uses: appleboy/ssh-action@master | ||
- name: Upload build artifact | ||
id: artifact-upload-step | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
host: ${{ secrets.BUILDS_HOST }} | ||
username: ${{ secrets.BUILDS_USERNAME }} | ||
key: ${{ secrets.BUILDS_SSH_KEY }} | ||
script: node ~/scripts/push_to_manifest.js -fork ${{ vars.FORK_ID }} -id ${{ github.sha }} | ||
name: build | ||
path: release/*.zip | ||
compression-level: 0 | ||
retention-days: 0 | ||
|
||
- name: Publish version | ||
run: Tools/publish_github_artifact.py | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | ||
ARTIFACT_ID: ${{ steps.artifact-upload-step.outputs.artifact-id }} | ||
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }} | ||
|
||
# - name: Publish changelog (Discord) | ||
# run: Tools/actions_changelogs_since_last_run.py | ||
|
@@ -99,3 +88,8 @@ jobs: | |
# run: Tools/actions_changelog_rss.py | ||
# env: | ||
# CHANGELOG_RSS_KEY: ${{ secrets.CHANGELOG_RSS_KEY }} | ||
|
||
- uses: geekyeggo/delete-artifact@v5 | ||
if: always() | ||
with: | ||
name: build |
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
6 changes: 3 additions & 3 deletions
6
Content.Client/Administration/UI/Notes/AdminNotesLinePopup.xaml
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
6 changes: 6 additions & 0 deletions
6
Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml
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,6 @@ | ||
<controls:BabyJailStatusWindow | ||
xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab" | ||
Title="{Loc admin-ui-baby-jail-window-title}"> | ||
<RichTextLabel Name="MessageLabel" Access="Public" /> | ||
</controls:BabyJailStatusWindow> |
21 changes: 21 additions & 0 deletions
21
Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs
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,21 @@ | ||
using Content.Client.Message; | ||
using Content.Client.UserInterface.Controls; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.CustomControls; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client.Administration.UI.Tabs.BabyJailTab; | ||
|
||
/* | ||
* TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. | ||
*/ | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class BabyJailStatusWindow : FancyWindow | ||
{ | ||
public BabyJailStatusWindow() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
MessageLabel.SetMarkup(Loc.GetString("admin-ui-baby-jail-is-enabled")); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml
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,26 @@ | ||
<controls:BabyJailTab | ||
xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab" | ||
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls" | ||
Margin="4"> | ||
<BoxContainer Orientation="Vertical"> | ||
<cc:CommandButton Name="EnabledButton" Command="babyjail" ToggleMode="True" | ||
Text="{Loc admin-ui-baby-jail-disabled}" | ||
ToolTip="{Loc admin-ui-baby-jail-tooltip}" /> | ||
<cc:CommandButton Name="ShowReasonButton" Command="babyjail_show_reason" | ||
ToggleMode="True" Text="{Loc admin-ui-baby-jail-show-reason}" | ||
ToolTip="{Loc admin-ui-baby-jail-show-reason-tooltip}" /> | ||
<BoxContainer Orientation="Vertical" Margin="0 10 0 0"> | ||
<BoxContainer Orientation="Horizontal" Margin="2"> | ||
<Label Text="{Loc admin-ui-baby-jail-max-account-age}" MinWidth="175" /> | ||
<LineEdit Name="MaxAccountAge" MinWidth="50" Margin="0 0 5 0" /> | ||
<Label Text="{Loc generic-minutes}" /> | ||
</BoxContainer> | ||
<BoxContainer Orientation="Horizontal" Margin="2"> | ||
<Label Text="{Loc admin-ui-baby-jail-max-overall-minutes}" MinWidth="175" /> | ||
<LineEdit Name="MaxOverallMinutes" MinWidth="50" Margin="0 0 5 0" /> | ||
<Label Text="{Loc generic-minutes}" /> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</controls:BabyJailTab> |
75 changes: 75 additions & 0 deletions
75
Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml.cs
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,75 @@ | ||
using Content.Shared.Administration.Events; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface; | ||
using Robust.Client.UserInterface.XAML; | ||
using Robust.Shared.Console; | ||
|
||
/* | ||
* TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. | ||
*/ | ||
|
||
namespace Content.Client.Administration.UI.Tabs.BabyJailTab; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class BabyJailTab : Control | ||
{ | ||
[Dependency] private readonly IConsoleHost _console = default!; | ||
|
||
private string _maxAccountAge; | ||
private string _maxOverallMinutes; | ||
|
||
public BabyJailTab() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
IoCManager.InjectDependencies(this); | ||
|
||
MaxAccountAge.OnTextEntered += args => SendMaxAccountAge(args.Text); | ||
MaxAccountAge.OnFocusExit += args => SendMaxAccountAge(args.Text); | ||
_maxAccountAge = MaxAccountAge.Text; | ||
|
||
MaxOverallMinutes.OnTextEntered += args => SendMaxOverallMinutes(args.Text); | ||
MaxOverallMinutes.OnFocusExit += args => SendMaxOverallMinutes(args.Text); | ||
_maxOverallMinutes = MaxOverallMinutes.Text; | ||
} | ||
|
||
private void SendMaxAccountAge(string text) | ||
{ | ||
if (string.IsNullOrWhiteSpace(text) || | ||
text == _maxAccountAge || | ||
!int.TryParse(text, out var minutes)) | ||
{ | ||
return; | ||
} | ||
|
||
_console.ExecuteCommand($"babyjail_max_account_age {minutes}"); | ||
} | ||
|
||
private void SendMaxOverallMinutes(string text) | ||
{ | ||
if (string.IsNullOrWhiteSpace(text) || | ||
text == _maxOverallMinutes || | ||
!int.TryParse(text, out var minutes)) | ||
{ | ||
return; | ||
} | ||
|
||
_console.ExecuteCommand($"babyjail_max_overall_minutes {minutes}"); | ||
} | ||
|
||
public void UpdateStatus(BabyJailStatus status) | ||
{ | ||
EnabledButton.Pressed = status.Enabled; | ||
EnabledButton.Text = Loc.GetString(status.Enabled | ||
? "admin-ui-baby-jail-enabled" | ||
: "admin-ui-baby-jail-disabled" | ||
); | ||
EnabledButton.ModulateSelfOverride = status.Enabled ? Color.Red : null; | ||
ShowReasonButton.Pressed = status.ShowReason; | ||
|
||
MaxAccountAge.Text = status.MaxAccountAgeMinutes.ToString(); | ||
_maxAccountAge = MaxAccountAge.Text; | ||
|
||
MaxOverallMinutes.Text = status.MaxOverallMinutes.ToString(); | ||
_maxOverallMinutes = MaxOverallMinutes.Text; | ||
} | ||
} |
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,26 @@ | ||
using Content.Shared.Clock; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.Clock; | ||
|
||
public sealed class ClockSystem : SharedClockSystem | ||
{ | ||
public override void Update(float frameTime) | ||
{ | ||
base.Update(frameTime); | ||
|
||
var query = EntityQueryEnumerator<ClockComponent, SpriteComponent>(); | ||
while (query.MoveNext(out var uid, out var comp, out var sprite)) | ||
{ | ||
if (!sprite.LayerMapTryGet(ClockVisualLayers.HourHand, out var hourLayer) || | ||
!sprite.LayerMapTryGet(ClockVisualLayers.MinuteHand, out var minuteLayer)) | ||
continue; | ||
|
||
var time = GetClockTime((uid, comp)); | ||
var hourState = $"{comp.HoursBase}{time.Hours % 12}"; | ||
var minuteState = $"{comp.MinutesBase}{time.Minutes / 5}"; | ||
sprite.LayerSetState(hourLayer, hourState); | ||
sprite.LayerSetState(minuteLayer, minuteState); | ||
} | ||
} | ||
} |
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.
Oops, something went wrong.