Placeholder pAIs, ghost role rules window (#4972)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.Ghost.Roles.Components
|
||||
{
|
||||
@@ -11,6 +12,8 @@ namespace Content.Server.Ghost.Roles.Components
|
||||
|
||||
[DataField("description")] private string _roleDescription = "Unknown";
|
||||
|
||||
[DataField("rules")] private string _roleRules = "";
|
||||
|
||||
// We do this so updating RoleName and RoleDescription in VV updates the open EUIs.
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
@@ -35,6 +38,17 @@ namespace Content.Server.Ghost.Roles.Components
|
||||
}
|
||||
}
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public string RoleRules
|
||||
{
|
||||
get => _roleRules;
|
||||
set
|
||||
{
|
||||
_roleRules = value;
|
||||
EntitySystem.Get<GhostRoleSystem>().UpdateAllEui();
|
||||
}
|
||||
}
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public bool Taken { get; protected set; }
|
||||
|
||||
@@ -44,7 +58,8 @@ namespace Content.Server.Ghost.Roles.Components
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
if (_roleRules == "")
|
||||
_roleRules = Loc.GetString("ghost-role-component-default-rules");
|
||||
EntitySystem.Get<GhostRoleSystem>().RegisterGhostRole(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user