VV attributes for Job and Role.
This commit is contained in:
@@ -2,18 +2,23 @@ using Content.Server.Chat.Managers;
|
|||||||
using Content.Shared.Roles;
|
using Content.Shared.Roles;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
namespace Content.Server.Roles
|
namespace Content.Server.Roles
|
||||||
{
|
{
|
||||||
public class Job : Role
|
public class Job : Role
|
||||||
{
|
{
|
||||||
|
[ViewVariables]
|
||||||
public JobPrototype Prototype { get; }
|
public JobPrototype Prototype { get; }
|
||||||
|
|
||||||
public override string Name { get; }
|
public override string Name { get; }
|
||||||
|
|
||||||
public override bool Antagonist => false;
|
public override bool Antagonist => false;
|
||||||
|
|
||||||
|
[ViewVariables]
|
||||||
public string? StartingGear => Prototype.StartingGear;
|
public string? StartingGear => Prototype.StartingGear;
|
||||||
|
|
||||||
|
[ViewVariables]
|
||||||
public bool CanBeAntag;
|
public bool CanBeAntag;
|
||||||
|
|
||||||
public Job(Mind.Mind mind, JobPrototype jobPrototype) : base(mind)
|
public Job(Mind.Mind mind, JobPrototype jobPrototype) : base(mind)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// Hey look,
|
// Hey look,
|
||||||
// Antag Datums.
|
// Antag Datums.
|
||||||
|
|
||||||
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
namespace Content.Server.Roles
|
namespace Content.Server.Roles
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -13,16 +15,19 @@ namespace Content.Server.Roles
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mind owning this role instance.
|
/// The mind owning this role instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[ViewVariables]
|
||||||
public Mind.Mind Mind { get; }
|
public Mind.Mind Mind { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A friendly name for this role type.
|
/// A friendly name for this role type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[ViewVariables]
|
||||||
public abstract string Name { get; }
|
public abstract string Name { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this role should be considered antagonistic or not.
|
/// Whether this role should be considered antagonistic or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[ViewVariables]
|
||||||
public abstract bool Antagonist { get; }
|
public abstract bool Antagonist { get; }
|
||||||
|
|
||||||
protected Role(Mind.Mind mind)
|
protected Role(Mind.Mind mind)
|
||||||
|
|||||||
Reference in New Issue
Block a user