[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:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Client.White.Sponsors;
|
||||
using Content.Shared.Preferences;
|
||||
using Robust.Client;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -19,6 +20,10 @@ namespace Content.Client.Preferences
|
||||
[Dependency] private readonly IClientNetManager _netManager = default!;
|
||||
[Dependency] private readonly IBaseClient _baseClient = default!;
|
||||
|
||||
//WD-EDIT
|
||||
[Dependency] private readonly SponsorsManager _sponsorsManager = default!;
|
||||
//WD-EDIT
|
||||
|
||||
public event Action? OnServerDataLoaded;
|
||||
|
||||
public GameSettings Settings { get; private set; } = default!;
|
||||
@@ -60,7 +65,10 @@ namespace Content.Client.Preferences
|
||||
|
||||
public void UpdateCharacter(ICharacterProfile profile, int slot)
|
||||
{
|
||||
profile.EnsureValid();
|
||||
//WD-EDIT
|
||||
var allowedMarkings = _sponsorsManager.TryGetInfo(out var sponsor) ? sponsor.AllowedMarkings : new string[]{};
|
||||
profile.EnsureValid(allowedMarkings);
|
||||
//WD-EDIT
|
||||
var characters = new Dictionary<int, ICharacterProfile>(Preferences.Characters) {[slot] = profile};
|
||||
Preferences = new PlayerPreferences(characters, Preferences.SelectedCharacterIndex, Preferences.AdminOOCColor);
|
||||
var msg = new MsgUpdateCharacter
|
||||
|
||||
Reference in New Issue
Block a user