Fix issue where round could reset all job priorities to high (#24340)

* Update job priorities when job requirements are getting updated

* Sort jobs by weight and then by the name

* Sort departments too
This commit is contained in:
Kot
2024-01-21 02:03:10 +04:00
committed by GitHub
parent 0312196887
commit 4f307a49be
3 changed files with 26 additions and 3 deletions

View File

@@ -30,4 +30,10 @@ public sealed partial class DepartmentPrototype : IPrototype
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Primary = true;
/// <summary>
/// Departments with a higher weight sorted before other departments in UI.
/// </summary>
[DataField("weight")]
public int Weight { get; private set; } = 0;
}