Refactor stations to properly use entity prototypes. (stationsv3) (#16570)
* Update StationSpawningSystem.cs Web-edit to allow feeding in an existing entity. * Update StationSpawningSystem.cs value type moment * Update StationSpawningSystem.cs * Oh goddamnit this is a refactor now. * awawawa * aaaaaaaaaaa * ee * forgot records. * no records? no records. * What's in a name? * Sloth forcing me to do the refactor properly smh. * e * optional evac in test. * tests pls work * awa --------- Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
@@ -32,6 +32,16 @@ public sealed class StationJobsComponent : Component
|
||||
/// </summary>
|
||||
[DataField("extendedAccess")] public bool ExtendedAccess;
|
||||
|
||||
/// <summary>
|
||||
/// If there are less than or equal this amount of players in the game at round start,
|
||||
/// people get extended access levels from job prototypes.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Set to -1 to disable extended access.
|
||||
/// </remarks>
|
||||
[DataField("extendedAccessThreshold")]
|
||||
public int ExtendedAccessThreshold { get; set; } = 15;
|
||||
|
||||
/// <summary>
|
||||
/// The percentage of jobs remaining.
|
||||
/// </summary>
|
||||
@@ -62,5 +72,10 @@ public sealed class StationJobsComponent : Component
|
||||
/// <summary>
|
||||
/// Overflow jobs that round-start can spawn infinitely many of.
|
||||
/// </summary>
|
||||
[DataField("overflowJobs", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<JobPrototype>))] public HashSet<string> OverflowJobs = new();
|
||||
[DataField("overflowJobs", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<JobPrototype>))]
|
||||
public HashSet<string> OverflowJobs = new();
|
||||
|
||||
[DataField("availableJobs", required: true,
|
||||
customTypeSerializer: typeof(PrototypeIdDictionarySerializer<List<int?>, JobPrototype>))]
|
||||
public readonly Dictionary<string, List<int?>> SetupAvailableJobs = default!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user