@@ -1,18 +0,0 @@
|
||||
using Content.Server.Antag;
|
||||
using Content.Shared.Objectives.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Antag.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Gives antags selected by this rule a fixed list of objectives.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(AntagObjectivesSystem))]
|
||||
public sealed partial class AntagObjectivesComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// List of static objectives to give.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public List<EntProtoId<ObjectiveComponent>> Objectives = new();
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
using Content.Server.Antag;
|
||||
using Content.Shared.Random;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Antag.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Gives antags selected by this rule a random list of objectives.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(AntagRandomObjectivesSystem))]
|
||||
public sealed partial class AntagRandomObjectivesComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Each set of objectives to add.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public List<AntagObjectiveSet> Sets = new();
|
||||
|
||||
/// <summary>
|
||||
/// If the total difficulty of the currently given objectives exceeds, no more will be given.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public float MaxDifficulty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A set of objectives to try picking.
|
||||
/// Difficulty is checked over all sets, but each set has its own probability and pick count.
|
||||
/// </summary>
|
||||
[DataRecord]
|
||||
public record struct AntagObjectiveSet()
|
||||
{
|
||||
/// <summary>
|
||||
/// The grouping used by the objective system to pick random objectives.
|
||||
/// First a group is picked from these, then an objective from that group.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public ProtoId<WeightedRandomPrototype> Groups = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Probability of this set being used.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float Prob = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Number of times to try picking objectives from this set.
|
||||
/// Even if there is enough difficulty remaining, no more will be given after this.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public int MaxPicks = 20;
|
||||
}
|
||||
@@ -41,13 +41,6 @@ public sealed partial class AntagSelectionComponent : Component
|
||||
/// Is not serialized.
|
||||
/// </summary>
|
||||
public HashSet<ICommonSession> SelectedSessions = new();
|
||||
|
||||
/// <summary>
|
||||
/// Locale id for the name of the antag.
|
||||
/// If this is set then the antag is listed in the round-end summary.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId? AgentName;
|
||||
}
|
||||
|
||||
[DataDefinition]
|
||||
|
||||
Reference in New Issue
Block a user