Skip to content

Commit

Permalink
Merge branch 'master' into muffled-gas-masks
Browse files Browse the repository at this point in the history
  • Loading branch information
sarcoph authored Nov 12, 2024
2 parents 4f0d5e3 + 39ae797 commit f8d1cfa
Show file tree
Hide file tree
Showing 4,701 changed files with 2,286,355 additions and 73,711 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 6 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ indent_style = space
tab_width = 4

# New line preferences
end_of_line = crlf:suggestion
#end_of_line = crlf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120

#### .NET Coding Conventions ####

Expand Down Expand Up @@ -104,7 +105,6 @@ csharp_preferred_modifier_order = public, private, protected, internal, new, abs

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:silent
csharp_style_namespace_declarations = file_scoped:suggestion

#### C# Formatting Rules ####

Expand Down Expand Up @@ -337,7 +337,11 @@ dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter

# ReSharper properties
resharper_braces_for_ifelse = required_for_multiline
resharper_csharp_wrap_arguments_style = chop_if_long
resharper_csharp_wrap_parameters_style = chop_if_long
resharper_keep_existing_attribute_arrangement = true
resharper_wrap_chained_binary_patterns = chop_if_long
resharper_wrap_chained_method_calls = chop_if_long

[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets,props}]
indent_size = 2
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Floofstation CODEOWNERS

* @Memeji @FoxxoTrystan
* @Fansana @Memeji @FoxxoTrystan
59 changes: 38 additions & 21 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,56 @@
"Changes: Audio":
- "**/*.ogg"

- changed-files:
- any-glob-to-any-file: "**/*.ogg"

"Changes: C#":
- "**/*.cs"
- changed-files:
- any-glob-to-any-file: "**/*.cs"

"Changes: Config":
- "**/*.toml"
- "**/*.config"
- "*.json"
- ".github/*.yml"
- ".github/*.json"
- ".vscode/*.json"
- ".editorconfig"
- changed-files:
- any-glob-to-any-file:
- "**/*.toml"
- "**/*.config"
- "*.json"
- ".github/*.yml"
- ".github/*.json"
- ".vscode/*.json"
- ".editorconfig"

"Changes: Documentation":
- "**/*.xml"
- "**/*.md"
- changed-files:
- any-glob-to-any-file:
- "**/*.xml"
- "**/*.md"

"Changes: Localization":
- 'Resources/Locale/**/*.ftl'
- changed-files:
- any-glob-to-any-file: 'Resources/Locale/**/*.ftl'

"Changes: Map":
- "Resources/Maps/**/*.yml"
- "Resources/Prototypes/Maps/**/*.yml"
- changed-files:
- any-glob-to-any-file:
- "Resources/Maps/**/*.yml"
- "Resources/Prototypes/Maps/**/*.yml"

"Changes: Sprite":
- "**/*.rsi/*.png"
- "**/*.rsi/*.json"
- changed-files:
- any-glob-to-any-file:
- "**/*.rsi/*.png"
- "**/*.rsi/*.json"

"Changes: UI":
- "**/*.xaml*"
- changed-files:
- any-glob-to-any-file: "**/*.xaml*"

"Changes: YML":
- any: ["**/*.yml"]
all: ["!Resources/Maps/**/*.yml", "!Resources/Prototypes/Maps/**/*.yml"]
- changed-files:
- any-glob-to-any-file:
- "**/*.yml"
- all-globs-to-all-files:
- "!Resources/Maps/**/*.yml"
- "!Resources/Prototypes/Maps/**/*.yml"

"Changes: Workflow":
- ".github/workflows/*.yml"
- changed-files:
- any-glob-to-any-file: ".github/workflows/*.yml"
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_TOKEN }}
ref: ${{ vars.CHANGELOG_BRANCH }}
ref: ${{ vars.CHANGELOG_BRANCH }}

- name: Setup Git
run: |
Expand All @@ -47,7 +47,7 @@ jobs:

- name: Commit Changelog
run: |
git pull origin master
git pull origin ${{ vars.CHANGELOG_BRANCH }}
git add *.yml
git commit -m "${{ vars.CHANGELOG_MESSAGE }} (#${{ env.PR_NUMBER }})"
git push
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/conflict-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Check Merge Conflicts

on:
push:
branches:
- master
pull_request_target:
types:
- opened
- synchronize
- reopened
- ready_for_review

jobs:
Label:
if: github.actor != 'PJBot' && github.actor != 'DeltaV-Bot' && github.actor != 'SimpleStation14'
if: ( github.event.pull_request.draft == false ) && ( github.actor != 'PJBot' && github.actor != 'DeltaV-Bot' && github.actor != 'SimpleStation14' )
runs-on: ubuntu-latest
steps:
- name: Check for Merge Conflicts
uses: ike709/actions-label-merge-conflict@9eefdd17e10566023c46d2dc6dc04fcb8ec76142
uses: eps1lon/actions-label-merge-conflict@v3.0.0
with:
dirtyLabel: "Status: Merge Conflict"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/discord-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3
with:
ref: master
ref: stable

- name: Publish changelog
run: Tools/actions_changelogs_since_last_run.py
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/labeler-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ on:
jobs:
labeler:
if: github.actor != 'PJBot' && github.actor != 'DeltaV-Bot' && github.actor != 'SimpleStation14'
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/labeler@v5
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:

- uses: actions/[email protected]
with:
ref: stable
submodules: 'recursive'
- name: Setup .NET Core
uses: actions/[email protected]
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/stable-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Close PRs to stable

on:
pull_request_target:
types: [ opened, ready_for_review ]

jobs:
run:
runs-on: ubuntu-latest
if: ${{ github.base_ref == 'stable' && github.actor != 'Fansana' && github.actor != 'Memeji' && github.actor != 'FoxxoTrystan' }}

steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: "Thank you for contributing to Floof Station repository. Unfortunately, it looks like you submitted your pull request to the stable branch, Please move this PR to the master Branch."
2 changes: 1 addition & 1 deletion Content.Benchmarks/SpawnEquipDeleteBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ await _pair.Server.WaitPost(() =>
for (var i = 0; i < N; i++)
{
_entity = server.EntMan.SpawnAttachedTo(Mob, _coords);
_spawnSys.EquipStartingGear(_entity, _gear, null);
_spawnSys.EquipStartingGear(_entity, _gear);
server.EntMan.DeleteEntity(_entity);
}
});
Expand Down
4 changes: 1 addition & 3 deletions Content.Client/Access/IdCardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace Content.Client.Access;

public sealed class IdCardSystem : SharedIdCardSystem
{
}
public sealed class IdCardSystem : SharedIdCardSystem;
6 changes: 3 additions & 3 deletions Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ private void OnJobChanged(string newJob)
SendMessage(new AgentIDCardJobChangedMessage(newJob));
}

public void OnJobIconChanged(string newJobIcon)
public void OnJobIconChanged(string newJobIconId)
{
SendMessage(new AgentIDCardJobIconChangedMessage(newJobIcon));
SendMessage(new AgentIDCardJobIconChangedMessage(newJobIconId));
}

/// <summary>
Expand All @@ -57,7 +57,7 @@ protected override void UpdateState(BoundUserInterfaceState state)

_window.SetCurrentName(cast.CurrentName);
_window.SetCurrentJob(cast.CurrentJob);
_window.SetAllowedIcons(cast.Icons);
_window.SetAllowedIcons(cast.Icons, cast.CurrentJobIconId);
}

protected override void Dispose(bool disposing)
Expand Down
6 changes: 5 additions & 1 deletion Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public AgentIDCardWindow(AgentIDCardBoundUserInterface bui)
JobLineEdit.OnFocusExit += e => OnJobChanged?.Invoke(e.Text);
}

public void SetAllowedIcons(HashSet<string> icons)
public void SetAllowedIcons(HashSet<string> icons, string currentJobIconId)
{
IconGrid.DisposeAllChildren();

Expand Down Expand Up @@ -79,6 +79,10 @@ public void SetAllowedIcons(HashSet<string> icons)
jobIconButton.AddChild(jobIconTexture);
jobIconButton.OnPressed += _ => _bui.OnJobIconChanged(jobIcon.ID);
IconGrid.AddChild(jobIconButton);

if (jobIconId.Equals(currentJobIconId))
jobIconButton.Pressed = true;

i++;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Content.Shared.Access;
using Content.Shared.Access.Components;
using Content.Shared.Access;
using Content.Shared.Access.Systems;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.CrewManifest;
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ public void TriggerAction(EntityUid actionId, BaseActionComponent action)
if (action.ClientExclusive)
{
if (instantAction.Event != null)
{
instantAction.Event.Performer = user;
instantAction.Event.Action = actionId;
}

PerformAction(user, actions, actionId, instantAction, instantAction.Event, GameTiming.CurTime);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Content.Client.Administration.Components;

[RegisterComponent, NetworkedComponent]
[RegisterComponent]
public sealed partial class HeadstandComponent : SharedHeadstandComponent
{

Expand Down
5 changes: 2 additions & 3 deletions Content.Client/Administration/Components/KillSignComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@

namespace Content.Client.Administration.Components;

[NetworkedComponent, RegisterComponent]
public sealed partial class KillSignComponent : SharedKillSignComponent
{ }
[RegisterComponent]
public sealed partial class KillSignComponent : SharedKillSignComponent;
7 changes: 5 additions & 2 deletions Content.Client/Administration/Managers/ClientAdminManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,15 @@ void IPostInjectInit.PostInject()

public AdminData? GetAdminData(EntityUid uid, bool includeDeAdmin = false)
{
return uid == _player.LocalEntity ? _adminData : null;
if (uid == _player.LocalEntity && (_adminData?.Active ?? includeDeAdmin))
return _adminData;

return null;
}

public AdminData? GetAdminData(ICommonSession session, bool includeDeAdmin = false)
{
if (_player.LocalUser == session.UserId)
if (_player.LocalUser == session.UserId && (_adminData?.Active ?? includeDeAdmin))
return _adminData;

return null;
Expand Down
23 changes: 23 additions & 0 deletions Content.Client/Administration/Systems/AdminVerbSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Content.Shared.Administration;
using Content.Shared.Administration.Managers;
using Content.Shared.Mind.Components;
using Content.Shared.Verbs;
using Robust.Client.Console;
using Robust.Shared.Utility;
Expand All @@ -11,10 +14,12 @@ sealed class AdminVerbSystem : EntitySystem
{
[Dependency] private readonly IClientConGroupController _clientConGroupController = default!;
[Dependency] private readonly IClientConsoleHost _clientConsoleHost = default!;
[Dependency] private readonly ISharedAdminManager _admin = default!;

public override void Initialize()
{
SubscribeLocalEvent<GetVerbsEvent<Verb>>(AddAdminVerbs);

}

private void AddAdminVerbs(GetVerbsEvent<Verb> args)
Expand All @@ -33,6 +38,24 @@ private void AddAdminVerbs(GetVerbsEvent<Verb> args)
};
args.Verbs.Add(verb);
}

if (!_admin.IsAdmin(args.User))
return;

if (_admin.HasAdminFlag(args.User, AdminFlags.Admin))
args.ExtraCategories.Add(VerbCategory.Admin);

if (_admin.HasAdminFlag(args.User, AdminFlags.Fun) && HasComp<MindContainerComponent>(args.Target))
args.ExtraCategories.Add(VerbCategory.Antag);

if (_admin.HasAdminFlag(args.User, AdminFlags.Debug))
args.ExtraCategories.Add(VerbCategory.Debug);

if (_admin.HasAdminFlag(args.User, AdminFlags.Fun))
args.ExtraCategories.Add(VerbCategory.Smite);

if (_admin.HasAdminFlag(args.User, AdminFlags.Admin))
args.ExtraCategories.Add(VerbCategory.Tricks);
}
}
}
Loading

0 comments on commit f8d1cfa

Please sign in to comment.