-
Notifications
You must be signed in to change notification settings - Fork 55
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 #32 from xtray85/upstream
Upstream
- Loading branch information
Showing
521 changed files
with
6,461 additions
and
2,987 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Update Contrib and Patreons in credits | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 0 * * 0 | ||
|
||
jobs: | ||
get_credits: | ||
runs-on: ubuntu-latest | ||
# Hey there fork dev! If you like to include your own contributors in this then you can probably just change this to your own repo | ||
# Do this in dump_github_contributors.ps1 too into your own repo | ||
if: github.repository == 'space-wizards/space-station-14' | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
ref: master | ||
|
||
- name: Get this week's Contributors | ||
shell: pwsh | ||
run: Tools/dump_github_contributors.ps1 > Resources/Credits/GitHub.txt | ||
|
||
# TODO | ||
#- name: Get this week's Patreons | ||
# run: Tools/script2dumppatreons > Resources/Credits/Patrons.yml | ||
|
||
- name: Commit new credit files | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Update Credits | ||
commit_author: PJBot <[email protected]> |
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 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: 6 additions & 0 deletions
6
Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerStatusWindow.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:PanicBunkerStatusWindow | ||
xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab" | ||
Title="{Loc admin-ui-panic-bunker-window-title}"> | ||
<Label Name="MessageLabel" Access="Public" Text="{Loc admin-ui-panic-bunker-is-enabled}" /> | ||
</controls:PanicBunkerStatusWindow> |
14 changes: 14 additions & 0 deletions
14
Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerStatusWindow.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,14 @@ | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.CustomControls; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client.Administration.UI.Tabs.PanicBunkerTab; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class PanicBunkerStatusWindow : DefaultWindow | ||
{ | ||
public PanicBunkerStatusWindow() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.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,43 @@ | ||
<controls:PanicBunkerTab | ||
xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab" | ||
xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls" | ||
Margin="4"> | ||
<BoxContainer Orientation="Vertical"> | ||
<cc:CommandButton Name="EnabledButton" Command="panicbunker" ToggleMode="True" | ||
Text="{Loc admin-ui-panic-bunker-disabled}" | ||
ToolTip="{Loc admin-ui-panic-bunker-tooltip}" /> | ||
<BoxContainer Orientation="Horizontal"> | ||
<cc:CommandButton Name="DisableAutomaticallyButton" HorizontalExpand="True" | ||
Command="panicbunker_disable_with_admins" | ||
ToggleMode="True" | ||
Text="{Loc admin-ui-panic-bunker-disable-automatically}" | ||
ToolTip="{Loc admin-ui-panic-bunker-disable-automatically-tooltip}" /> | ||
<cc:CommandButton Name="EnableAutomaticallyButton" HorizontalExpand="True" | ||
Command="panicbunker_enable_without_admins" | ||
ToggleMode="True" | ||
Text="{Loc admin-ui-panic-bunker-enable-automatically}" | ||
ToolTip="{Loc admin-ui-panic-bunker-enable-automatically-tooltip}" /> | ||
<cc:CommandButton Name="CountDeadminnedButton" HorizontalExpand="True" | ||
Command="panicbunker_count_deadminned_admins" | ||
ToggleMode="True" | ||
Text="{Loc admin-ui-panic-bunker-count-deadminned-admins}" | ||
ToolTip="{Loc admin-ui-panic-bunker-count-deadminned-admins-tooltip}" /> | ||
</BoxContainer> | ||
<cc:CommandButton Name="ShowReasonButton" Command="panicbunker_show_reason" | ||
ToggleMode="True" Text="{Loc admin-ui-panic-bunker-show-reason}" | ||
ToolTip="{Loc admin-ui-panic-bunker-show-reason-tooltip}" /> | ||
<BoxContainer Orientation="Vertical" Margin="0 10 0 0"> | ||
<BoxContainer Orientation="Horizontal" Margin="2"> | ||
<Label Text="{Loc admin-ui-panic-bunker-min-account-age}" MinWidth="175" /> | ||
<LineEdit Name="MinAccountAge" MinWidth="50" Margin="0 0 5 0" /> | ||
<Label Text="{Loc generic-hours}" /> | ||
</BoxContainer> | ||
<BoxContainer Orientation="Horizontal" Margin="2"> | ||
<Label Text="{Loc admin-ui-panic-bunker-min-overall-hours}" MinWidth="175" /> | ||
<LineEdit Name="MinOverallHours" MinWidth="50" Margin="0 0 5 0" /> | ||
<Label Text="{Loc generic-hours}" /> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</controls:PanicBunkerTab> |
54 changes: 54 additions & 0 deletions
54
Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.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,54 @@ | ||
using Content.Shared.Administration.Events; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface; | ||
using Robust.Client.UserInterface.XAML; | ||
using Robust.Shared.Console; | ||
|
||
namespace Content.Client.Administration.UI.Tabs.PanicBunkerTab; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class PanicBunkerTab : Control | ||
{ | ||
[Dependency] private readonly IConsoleHost _console = default!; | ||
|
||
public PanicBunkerTab() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
IoCManager.InjectDependencies(this); | ||
|
||
DisableAutomaticallyButton.ToolTip = Loc.GetString("admin-ui-panic-bunker-disable-automatically-tooltip"); | ||
|
||
MinAccountAge.OnTextEntered += args => | ||
{ | ||
if (string.IsNullOrWhiteSpace(args.Text) || !int.TryParse(args.Text, out var minutes)) | ||
return; | ||
|
||
_console.ExecuteCommand($"panicbunker_min_account_age {minutes}"); | ||
}; | ||
|
||
MinOverallHours.OnTextEntered += args => | ||
{ | ||
if (string.IsNullOrWhiteSpace(args.Text) || !int.TryParse(args.Text, out var hours)) | ||
return; | ||
|
||
_console.ExecuteCommand($"panicbunker_min_overall_hours {hours}"); | ||
}; | ||
} | ||
|
||
public void UpdateStatus(PanicBunkerStatus status) | ||
{ | ||
EnabledButton.Pressed = status.Enabled; | ||
EnabledButton.Text = Loc.GetString(status.Enabled | ||
? "admin-ui-panic-bunker-enabled" | ||
: "admin-ui-panic-bunker-disabled" | ||
); | ||
EnabledButton.ModulateSelfOverride = status.Enabled ? Color.Red : null; | ||
|
||
DisableAutomaticallyButton.Pressed = status.DisableWithAdmins; | ||
EnableAutomaticallyButton.Pressed = status.EnableWithoutAdmins; | ||
CountDeadminnedButton.Pressed = status.CountDeadminnedAdmins; | ||
ShowReasonButton.Pressed = status.ShowReason; | ||
MinAccountAge.Text = status.MinAccountAgeHours.ToString(); | ||
MinOverallHours.Text = status.MinOverallHours.ToString(); | ||
} | ||
} |
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
Oops, something went wrong.