[feat] donate

# Conflicts:
#	Content.Client/Entry/EntryPoint.cs
#	Content.Client/IoC/ClientContentIoC.cs
#	Content.Server/Chat/Managers/ChatManager.cs
#	Content.Server/Entry/EntryPoint.cs
#	Content.Server/GameTicking/GameTicker.Player.cs
#	Content.Server/GameTicking/GameTicker.StatusShell.cs
#	Content.Server/IoC/ServerContentIoC.cs
#	Content.Shared/Humanoid/HumanoidCharacterAppearance.cs
#	Content.Shared/Humanoid/Markings/MarkingPrototype.cs
#	Content.Shared/Preferences/HumanoidCharacterProfile.cs
This commit is contained in:
rhailrake
2023-04-25 19:46:20 +06:00
committed by Remuchi
parent 0cbb69d0a1
commit 4e85539ec6
29 changed files with 809 additions and 83 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq;
using Content.Client.White.Sponsors;
using Content.Shared.Humanoid;
using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes;
@@ -19,6 +20,10 @@ public sealed partial class MarkingPicker : Control
[Dependency] private readonly MarkingManager _markingManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
//WD-EDIT
[Dependency] private readonly SponsorsManager _sponsorsManager = default!;
//WD-EDIT
public Action<MarkingSet>? OnMarkingAdded;
public Action<MarkingSet>? OnMarkingRemoved;
public Action<MarkingSet>? OnMarkingColorChange;
@@ -202,6 +207,18 @@ public sealed partial class MarkingPicker : Control
var item = CMarkingsUnused.AddItem($"{GetMarkingName(marking)}", marking.Sprites[0].Frame0());
item.Metadata = marking;
//WD-EDIT
if (marking.SponsorOnly)
{
item.Disabled = true;
if (_sponsorsManager.TryGetInfo(out var sponsor))
{
item.Disabled = !sponsor.AllowedMarkings.Contains(marking.ID);
}
}
//WD-EDIT
}
CMarkingPoints.Visible = _currentMarkings.PointsLeft(_selectedMarkingCategory) != -1;