feat: смена значков в консоли ID карт

This commit is contained in:
Remuchi
2024-01-24 15:15:13 +07:00
parent cf8709f1ea
commit e09cc7b802
5 changed files with 213 additions and 28 deletions

View File

@@ -29,13 +29,20 @@ public sealed partial class IdCardConsoleComponent : Component
public readonly string JobTitle;
public readonly List<string> AccessList;
public readonly string JobPrototype;
public readonly string? SelectedIcon; //WD-EDIT
public WriteToTargetIdMessage(string fullName, string jobTitle, List<string> accessList, string jobPrototype)
public WriteToTargetIdMessage(
string fullName,
string jobTitle,
List<string> accessList,
string jobPrototype,
string? selectedIcon) //WD-EDIT (selectedIcon)
{
FullName = fullName;
JobTitle = jobTitle;
AccessList = accessList;
JobPrototype = jobPrototype;
SelectedIcon = "JobIcon" + selectedIcon;
}
}
@@ -72,9 +79,61 @@ public sealed partial class IdCardConsoleComponent : Component
"Salvage",
"Security",
"Service",
"Theatre",
"Theatre"
};
//WD-EDIT
[DataField("jobIcons")]
public List<string> JobIcons = new()
{
"AtmosphericTechnician",
"Bartender",
"Botanist",
"Boxer",
"Brigmedic",
"Captain",
"CargoTechnician",
"Chaplain",
"Chef",
"Chemist",
"ChiefEngineer",
"ChiefMedicalOfficer",
"Clown",
"Detective",
"Geneticist",
"HeadOfPersonnel",
"HeadOfSecurity",
"Janitor",
"Lawyer",
"Librarian",
"MedicalDoctor",
"MedicalIntern",
"Mime",
"Musician",
"Paramedic",
"Passenger",
"Psychologist",
"QuarterMaster",
"Reporter",
"ResearchAssistant",
"ResearchDirector",
"Roboticist",
"Scientist",
"SecurityCadet",
"SecurityOfficer",
"SeniorEngineer",
"SeniorOfficer",
"SeniorResearcher",
"ServiceWorker",
"ShaftMiner",
"StationEngineer",
"TechnicalAssistant",
"Virologist",
"Warden",
"Zookeeper"
};
// WD EDIT END
[Serializable, NetSerializable]
public sealed class IdCardConsoleBoundUserInterfaceState : BoundUserInterfaceState
{
@@ -88,8 +147,10 @@ public sealed partial class IdCardConsoleComponent : Component
public readonly string[]? TargetIdAccessList;
public readonly string[]? AllowedModifyAccessList;
public readonly string TargetIdJobPrototype;
public readonly string? TargetIdJobIcon; //WD-EDIT
public IdCardConsoleBoundUserInterfaceState(bool isPrivilegedIdPresent,
public IdCardConsoleBoundUserInterfaceState(
bool isPrivilegedIdPresent,
bool isPrivilegedIdAuthorized,
bool isTargetIdPresent,
string? targetIdFullName,
@@ -98,7 +159,8 @@ public sealed partial class IdCardConsoleComponent : Component
string[]? allowedModifyAccessList,
string targetIdJobPrototype,
string privilegedIdName,
string targetIdName)
string targetIdName,
string? targetIdJobIcon) // #WD EDIT (targetIdJobIcon)
{
IsPrivilegedIdPresent = isPrivilegedIdPresent;
IsPrivilegedIdAuthorized = isPrivilegedIdAuthorized;
@@ -110,12 +172,13 @@ public sealed partial class IdCardConsoleComponent : Component
TargetIdJobPrototype = targetIdJobPrototype;
PrivilegedIdName = privilegedIdName;
TargetIdName = targetIdName;
TargetIdJobIcon = targetIdJobIcon; //WD-EDIT
}
}
[Serializable, NetSerializable]
public enum IdCardConsoleUiKey : byte
{
Key,
Key
}
}