-
Notifications
You must be signed in to change notification settings - Fork 85
[WIР][Feature] Xeno markings only for ArtLead #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ReWAFFlution
wants to merge
9
commits into
ArcaneSS14:master
Choose a base branch
from
ReWAFFlution:bulbocustom
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
aea3a37
Artlead patron added
ReWAFFlution 64a7eb5
ren marking
ReWAFFlution 83a9066
marking only for ArtLead
ReWAFFlution 8e11950
old new metod
ReWAFFlution b7e67e3
Merge branch 'master' into bulbocustom
ReWAFFlution 5bf52cd
fix p.1
ReWAFFlution d4b81ed
Merge branch 'master' into bulbocustom
ReWAFFlution e53a0b9
Merge branch 'master' into bulbocustom
ReWAFFlution d5cbda2
Merge branch 'master' into bulbocustom
ReWAFFlution File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,24 @@ | ||
| // SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
|
||
| using System.Diagnostics.CodeAnalysis; | ||
| using Content.Shared._Arcane.DiscordRoles; | ||
| using Robust.Shared.Player; | ||
| using Robust.Shared.Utility; | ||
|
|
||
| namespace Content.Shared.Humanoid.Markings.Effects; | ||
|
|
||
| /// <summary> | ||
| /// Base class for effects that gate whether a marking may be used by a given session. | ||
| /// </summary> | ||
| [ImplicitDataDefinitionForInheritors] | ||
| public abstract partial class MarkingEffect | ||
| { | ||
| /// <summary> | ||
| /// Tries to validate whether the marking is available to the session. | ||
| /// </summary> | ||
| public abstract bool Validate( | ||
| MarkingPrototype marking, | ||
| ICommonSession? session, | ||
| ISharedDiscordRoleManager? discordRoles, | ||
| [NotNullWhen(false)] out FormattedMessage? reason); | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ public enum DiscordRole : byte | |
| SponsorTier1, | ||
| SponsorTier2, | ||
| AdminBenefit, | ||
| ArtLead, | ||
| UnlockRoles, | ||
| } | ||
|
|
||
|
|
||
32 changes: 32 additions & 0 deletions
32
Content.Shared/_Arcane/Humanoid/Markings/Effects/SponsorRequirementMarkingEffect.cs
This file contains hidden or 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 @@ | ||
| using System.Diagnostics.CodeAnalysis; | ||
| using System.Linq; | ||
| using Content.Shared._Arcane.DiscordRoles; | ||
| using Content.Shared.Humanoid.Markings; | ||
| using Content.Shared.Humanoid.Markings.Effects; | ||
| using Robust.Shared.Player; | ||
| using Robust.Shared.Utility; | ||
|
|
||
| namespace Content.Shared._Arcane.Humanoid.Markings.Effects; | ||
|
|
||
| /// <summary> | ||
| /// Verifies possession of a specific Discord role that unlocks the sponsor marking | ||
| /// </summary> | ||
| public sealed partial class SponsorRequirementMarkingEffect : MarkingEffect | ||
| { | ||
| [DataField(required: true)] | ||
| public HashSet<DiscordRole> Roles; | ||
|
|
||
| public override bool Validate( | ||
| MarkingPrototype marking, | ||
| ICommonSession? session, | ||
| ISharedDiscordRoleManager? discordRoles, | ||
| [NotNullWhen(false)] out FormattedMessage? reason) | ||
| { | ||
| reason = FormattedMessage.FromUnformatted(Loc.GetString("marking-sponsor-requirement")); | ||
|
|
||
| if (session == null || discordRoles == null) | ||
| return true; | ||
|
|
||
| return Roles.Any(role => discordRoles.HasRole(session, role)); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.