Roundstart antag role restrictions revival (#20108)

Co-authored-by: Ray <vigersray@gmail.com>
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-20 08:54:53 +01:00
committed by GitHub
parent 35246963c7
commit 4fbebb6917
14 changed files with 229 additions and 150 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.Mind.Commands;
using Content.Shared.Roles;
namespace Content.Server.Ghost.Roles.Components
{
@@ -12,6 +13,9 @@ namespace Content.Server.Ghost.Roles.Components
[DataField("rules")] private string _roleRules = "";
[DataField("requirements")]
public HashSet<JobRequirement>? Requirements;
/// <summary>
/// Whether the <see cref="MakeSentientCommand"/> should run on the mob.
/// </summary>

View File

@@ -240,7 +240,7 @@ namespace Content.Server.Ghost.Roles
if (metaQuery.GetComponent(uid).EntityPaused)
continue;
roles.Add(new GhostRoleInfo {Identifier = id, Name = role.RoleName, Description = role.RoleDescription, Rules = role.RoleRules});
roles.Add(new GhostRoleInfo {Identifier = id, Name = role.RoleName, Description = role.RoleDescription, Rules = role.RoleRules, Requirements = role.Requirements});
}
return roles.ToArray();