Add multi-job exclusion support to objectives, and add more appropriate job restrictions to certain thief objectives. (#40065)

* multi exclusion!

* quick correction

* migrate all job: fields to jobs fields to avoid test fails. breaking change!!!
This commit is contained in:
Super
2025-10-31 09:26:25 +00:00
committed by GitHub
parent c30321d886
commit dd61991b1c
4 changed files with 49 additions and 47 deletions

View File

@@ -2,6 +2,7 @@ using Content.Server.Objectives.Systems;
using Content.Shared.Roles;
using Content.Shared.Roles.Jobs;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Prototypes;
/// <summary>
/// Requires that the player not have a certain job to have this objective.
@@ -9,9 +10,10 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
[RegisterComponent, Access(typeof(NotJobRequirementSystem))]
public sealed partial class NotJobRequirementComponent : Component
{
/// <summary>
/// ID of the job to ban from having this objective.
/// List of job prototype IDs to ban from having this objective.
/// </summary>
[DataField(required: true, customTypeSerializer: typeof(PrototypeIdSerializer<JobPrototype>))]
public string Job = string.Empty;
[DataField]
public List<ProtoId<JobPrototype>> Jobs = new List<ProtoId<JobPrototype>>();
}