Skip to content

Commit

Permalink
Merge branch 'wizden-mass-pick-2' of https://github.com/DEATHB4DEFEAT…
Browse files Browse the repository at this point in the history
…/Einstein-Engines into DEATHB4DEFEAT-wizden-mass-pick-2
  • Loading branch information
VMSolidus committed Sep 22, 2024
2 parents 900630c + 3c5433c commit 97da486
Show file tree
Hide file tree
Showing 2,722 changed files with 57,027 additions and 31,648 deletions.
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
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"
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
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
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
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 97da486

Please sign in to comment.