add limits to steal objectives (#22672)

* add ObjectiveLimit comp/system

* give ian and disk limits

* all

* up limit

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-12-25 01:20:55 +00:00
committed by GitHub
parent b20fcf5141
commit 2ca649edfa
3 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
using Content.Server.Objectives.Systems;
namespace Content.Server.Objectives.Components;
/// <summary>
/// Limits the number of traitors that can have the same objective.
/// Checked by the prototype id, so only considers the exact same objectives.
/// </summary>
/// <remarks>
/// Only works for traitors so don't use for anything else.
/// </remarks>
[RegisterComponent, Access(typeof(ObjectiveLimitSystem))]
public sealed partial class ObjectiveLimitComponent : Component
{
/// <summary>
/// Max number of players
/// </summary>
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
public uint Limit;
}