Files
space-station-14/Content.Server/Objectives/Components/NumberObjectiveComponent.cs
T
ScarKy0 946a516d72 Make NumberObjective Max inclusive (#44228)
* yeah

* comment

* Apply suggestion from @slarticodefast

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2026-06-03 19:03:40 +00:00

42 lines
1.2 KiB
C#

using Content.Server.Objectives.Systems;
namespace Content.Server.Objectives.Components;
/// <summary>
/// Objective has a target number of something.
/// When the objective is assigned it randomly picks this target from a minimum to a maximum.
/// </summary>
[RegisterComponent, Access(typeof(NumberObjectiveSystem))]
public sealed partial class NumberObjectiveComponent : Component
{
/// <summary>
/// Number to use in the objective condition.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public int Target;
/// <summary>
/// Minimum number for target to roll. (Inclusive)
/// </summary>
[DataField(required: true)]
public int Min;
/// <summary>
/// Maximum number for target to roll. (Inclusive)
/// </summary>
[DataField(required: true)]
public int Max;
/// <summary>
/// Optional title locale id, passed "count" with <see cref="Target"/>.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string? Title;
/// <summary>
/// Optional description locale id, passed "count" with <see cref="Target"/>.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string? Description;
}