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

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
@@ -15,10 +16,11 @@ namespace Content.Shared.Preferences
{
private Dictionary<int, ICharacterProfile> _characters;
public PlayerPreferences(IEnumerable<KeyValuePair<int, ICharacterProfile>> characters, int selectedCharacterIndex)
public PlayerPreferences(IEnumerable<KeyValuePair<int, ICharacterProfile>> characters, int selectedCharacterIndex, Color adminOOCColor)
{
_characters = new Dictionary<int, ICharacterProfile>(characters);
SelectedCharacterIndex = selectedCharacterIndex;
AdminOOCColor = adminOOCColor;
}
/// <summary>
@@ -41,6 +43,8 @@ namespace Content.Shared.Preferences
/// </summary>
public ICharacterProfile SelectedCharacter => Characters[SelectedCharacterIndex];
public Color AdminOOCColor { get; set; }
public int FirstEmptySlot()
{
var firstEmpty = IndexOfCharacter(null);