OOC sent by an admin will have a different color (#3117)

* Admin OOC is sent with a different color than regular OOC

- Also adds the OOC color to the database

* Command to set the color

* Ooc -> OOC

* Change default color to Red (`#ff0000`)

* Outdated namespace
This commit is contained in:
Leo
2021-02-14 11:59:56 -03:00
committed by GitHub
parent 54f48aa6a9
commit a3d0e3f6a7
17 changed files with 1324 additions and 30 deletions

View File

@@ -14,6 +14,7 @@ using Robust.Shared.Configuration;
using Robust.Shared.ContentPack;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Network;
using LogLevel = Robust.Shared.Log.LogLevel;
using MSLogLevel = Microsoft.Extensions.Logging.LogLevel;
@@ -32,6 +33,8 @@ namespace Content.Server.Database
Task SaveCharacterSlotAsync(NetUserId userId, ICharacterProfile? profile, int slot);
Task SaveAdminOOCColorAsync(NetUserId userId, Color color);
// Single method for two operations for transaction.
Task DeleteSlotAndSetSelectedIndex(NetUserId userId, int deleteSlot, int newSlot);
Task<PlayerPreferences?> GetPlayerPreferencesAsync(NetUserId userId);
@@ -151,6 +154,11 @@ namespace Content.Server.Database
return _db.DeleteSlotAndSetSelectedIndex(userId, deleteSlot, newSlot);
}
public Task SaveAdminOOCColorAsync(NetUserId userId, Color color)
{
return _db.SaveAdminOOCColorAsync(userId, color);
}
public Task<PlayerPreferences?> GetPlayerPreferencesAsync(NetUserId userId)
{
return _db.GetPlayerPreferencesAsync(userId);