mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
# Description ## **!!! DO NOT "Squash and commit", ONLY "Create a merge commit" !!!** Merges some PRs from The Den, YML changes only: - https://github.com/TheDenSS14/TheDen/pull/168 - Change: Added the new Loadout items to the appropriate CharacterItemGroup prototypes. - https://github.com/TheDenSS14/TheDen/pull/202 - Change: Converted owl hooting from stereo to mono to fix console errors. - https://github.com/TheDenSS14/TheDen/pull/203 - https://github.com/TheDenSS14/TheDen/pull/205 - https://github.com/TheDenSS14/TheDen/pull/220 - https://github.com/TheDenSS14/TheDen/pull/224 - https://github.com/TheDenSS14/TheDen/pull/236 - https://github.com/TheDenSS14/TheDen/pull/246 Mapper-only PRs: - https://github.com/TheDenSS14/TheDen/pull/247 - https://github.com/TheDenSS14/TheDen/pull/250 ## Changelog 🆑 The Den Contributors - add: Added a Trooper Uniform and Hat for Security use. (by Rosycup) - add: Harpies have gained the ability to hoot. (by KyuPolaris) - add: Added ability for Arachne to produce silk. (by KyuPolaris) - tweak: Tweaked tool belts to take more tools and mantis belts to be able to fit certain epistemics tools. (by Rosycup) - add: Hopping, that's it. *hop and *hops now triggers the jump emote. (by KyuPolaris) - fix: Shadowkin are now able to select Psionic Power traits without taking the Latent Psychic trait. (by Rosycup) --------- Co-authored-by: Rosycup <178287475+Rosycup@users.noreply.github.com> Co-authored-by: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: Tabitha <64847293+KyuPolaris@users.noreply.github.com> Co-authored-by: KyuPolaris <tabi@kyuudev.me> (cherry picked from commit 19ea863353222d210c1b646fe7333dc98ed0cf3b)
140 lines
5.1 KiB
C#
140 lines
5.1 KiB
C#
using Content.Shared.Access.Systems;
|
|
using Content.Shared.Containers.ItemSlots;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Access.Components;
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
[Access(typeof(SharedIdCardConsoleSystem))]
|
|
public sealed partial class IdCardConsoleComponent : Component
|
|
{
|
|
public const int MaxFullNameLength = 30;
|
|
public const int MaxJobTitleLength = 30;
|
|
|
|
public static string PrivilegedIdCardSlotId = "IdCardConsole-privilegedId";
|
|
public static string TargetIdCardSlotId = "IdCardConsole-targetId";
|
|
|
|
[DataField]
|
|
public ItemSlot PrivilegedIdSlot = new();
|
|
|
|
[DataField]
|
|
public ItemSlot TargetIdSlot = new();
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class WriteToTargetIdMessage : BoundUserInterfaceMessage
|
|
{
|
|
public readonly string FullName;
|
|
public readonly string JobTitle;
|
|
public readonly List<ProtoId<AccessLevelPrototype>> AccessList;
|
|
public readonly ProtoId<AccessLevelPrototype> JobPrototype;
|
|
|
|
public WriteToTargetIdMessage(string fullName, string jobTitle, List<ProtoId<AccessLevelPrototype>> accessList, ProtoId<AccessLevelPrototype> jobPrototype)
|
|
{
|
|
FullName = fullName;
|
|
JobTitle = jobTitle;
|
|
AccessList = accessList;
|
|
JobPrototype = jobPrototype;
|
|
}
|
|
}
|
|
|
|
// Put this on shared so we just send the state once in PVS range rather than every time the UI updates.
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public List<ProtoId<AccessLevelPrototype>> AccessLevels = new()
|
|
{
|
|
"Armory",
|
|
"Atmospherics",
|
|
"Bar",
|
|
//"Brig", Delta V: Removed Brig Access
|
|
"Boxer", // DeltaV - Add Boxer access
|
|
"Detective",
|
|
"Captain",
|
|
"Cargo",
|
|
"Chapel",
|
|
"Chemistry",
|
|
"ChiefEngineer",
|
|
"ChiefMedicalOfficer",
|
|
"Clown", // DeltaV - Add Clown access
|
|
"Corpsman", // DeltaV - Add Corpsman access
|
|
"Command",
|
|
"Cryogenics",
|
|
"Engineering",
|
|
"External",
|
|
"HeadOfPersonnel",
|
|
"HeadOfSecurity",
|
|
"Hydroponics",
|
|
"Janitor",
|
|
"Kitchen",
|
|
"Lawyer",
|
|
"Library", // DeltaV - Add Library access
|
|
"Maintenance",
|
|
"Medical",
|
|
"Mime", // DeltaV - Add Mime access
|
|
"Musician", // DeltaV - Add Musician access
|
|
"Paramedic", // DeltaV - Add Paramedic access
|
|
"Psychologist", // DeltaV - Add Psychologist access
|
|
"Quartermaster",
|
|
"Reporter", // DeltaV - Add Reporter access
|
|
"Research",
|
|
"ResearchDirector",
|
|
"Salvage",
|
|
"Security",
|
|
"Service",
|
|
"Theatre",
|
|
"Orders", // DeltaV - Orders, see Resources/Prototypes/DeltaV/Access/cargo.yml
|
|
"Mail", // Nyanotrasen - Mail, see Resources/Prototypes/Nyanotrasen/Access/cargo.yml
|
|
"Mantis", // DeltaV - Psionic Mantis, see Resources/Prototypes/DeltaV/Access/epistemics.yml
|
|
"Zookeeper", // DeltaV - Add Zookeeper access
|
|
"ChiefJustice", // DeltaV - Add Chief Justice access
|
|
"Justice", // DeltaV - Add Justice access
|
|
"Prosecutor", // Delta V - Add Prosecutor access
|
|
"Clerk", // Delta V - Add Clerk access
|
|
};
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class IdCardConsoleBoundUserInterfaceState : BoundUserInterfaceState
|
|
{
|
|
public readonly string PrivilegedIdName;
|
|
public readonly bool IsPrivilegedIdPresent;
|
|
public readonly bool IsPrivilegedIdAuthorized;
|
|
public readonly bool IsTargetIdPresent;
|
|
public readonly string TargetIdName;
|
|
public readonly string? TargetIdFullName;
|
|
public readonly string? TargetIdJobTitle;
|
|
public readonly List<ProtoId<AccessLevelPrototype>>? TargetIdAccessList;
|
|
public readonly List<ProtoId<AccessLevelPrototype>>? AllowedModifyAccessList;
|
|
public readonly ProtoId<AccessLevelPrototype> TargetIdJobPrototype;
|
|
|
|
public IdCardConsoleBoundUserInterfaceState(bool isPrivilegedIdPresent,
|
|
bool isPrivilegedIdAuthorized,
|
|
bool isTargetIdPresent,
|
|
string? targetIdFullName,
|
|
string? targetIdJobTitle,
|
|
List<ProtoId<AccessLevelPrototype>>? targetIdAccessList,
|
|
List<ProtoId<AccessLevelPrototype>>? allowedModifyAccessList,
|
|
ProtoId<AccessLevelPrototype> targetIdJobPrototype,
|
|
string privilegedIdName,
|
|
string targetIdName)
|
|
{
|
|
IsPrivilegedIdPresent = isPrivilegedIdPresent;
|
|
IsPrivilegedIdAuthorized = isPrivilegedIdAuthorized;
|
|
IsTargetIdPresent = isTargetIdPresent;
|
|
TargetIdFullName = targetIdFullName;
|
|
TargetIdJobTitle = targetIdJobTitle;
|
|
TargetIdAccessList = targetIdAccessList;
|
|
AllowedModifyAccessList = allowedModifyAccessList;
|
|
TargetIdJobPrototype = targetIdJobPrototype;
|
|
PrivilegedIdName = privilegedIdName;
|
|
TargetIdName = targetIdName;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum IdCardConsoleUiKey : byte
|
|
{
|
|
Key,
|
|
}
|
|
}
|