.NET 9 forward compatibility changes (#33421)
This doesn't switch the projects over to .NET 9, but it does make them work on .NET 9 when we decide to switch in the future.
This commit is contained in:
committed by
GitHub
parent
42ee90e53e
commit
c4e2eb9d02
@@ -28,7 +28,8 @@ namespace Content.Server.Announcements
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var message = string.Join(' ', new ArraySegment<string>(args, 1, args.Length-1));
|
// Explicit IEnumerable<string> due to overload ambiguity on .NET 9
|
||||||
|
var message = string.Join(' ', (IEnumerable<string>)new ArraySegment<string>(args, 1, args.Length-1));
|
||||||
chat.DispatchGlobalAnnouncement(message, args[0], colorOverride: Color.Gold);
|
chat.DispatchGlobalAnnouncement(message, args[0], colorOverride: Color.Gold);
|
||||||
}
|
}
|
||||||
shell.WriteLine("Sent!");
|
shell.WriteLine("Sent!");
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ public record struct PriceCalculationEvent()
|
|||||||
[ByRefEvent]
|
[ByRefEvent]
|
||||||
public record struct EstimatedPriceCalculationEvent()
|
public record struct EstimatedPriceCalculationEvent()
|
||||||
{
|
{
|
||||||
public EntityPrototype Prototype;
|
public required EntityPrototype Prototype;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The total price of the entity.
|
/// The total price of the entity.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ public sealed partial class PathfindingSystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public record struct BreadthPathArgs()
|
public record struct BreadthPathArgs()
|
||||||
{
|
{
|
||||||
public Vector2i Start;
|
public required Vector2i Start;
|
||||||
public List<Vector2i> Ends;
|
public required List<Vector2i> Ends;
|
||||||
|
|
||||||
public bool Diagonals = false;
|
public bool Diagonals = false;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public sealed partial class PathfindingSystem
|
|||||||
public List<Vector2i> Points = new();
|
public List<Vector2i> Points = new();
|
||||||
|
|
||||||
public List<Vector2i> Path = new();
|
public List<Vector2i> Path = new();
|
||||||
public Dictionary<Vector2i, Vector2i> CameFrom;
|
public Dictionary<Vector2i, Vector2i>? CameFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public record struct SplinePathArgs(SimplePathArgs Args)
|
public record struct SplinePathArgs(SimplePathArgs Args)
|
||||||
|
|||||||
@@ -84,6 +84,6 @@ public sealed partial class PathfindingSystem
|
|||||||
|
|
||||||
public float MaxWiden = 7f;
|
public float MaxWiden = 7f;
|
||||||
|
|
||||||
public List<Vector2i> Path;
|
public required List<Vector2i> Path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,5 +66,5 @@ public record struct GenerateDnaEvent()
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The generated DNA.
|
/// The generated DNA.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DNA;
|
public required string DNA;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public sealed class StationAiVisionSystem : EntitySystem
|
|||||||
EntManager = EntityManager,
|
EntManager = EntityManager,
|
||||||
Maps = _maps,
|
Maps = _maps,
|
||||||
System = this,
|
System = this,
|
||||||
|
VisibleTiles = _singleTiles,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,7 +279,7 @@ public sealed class StationAiVisionSystem : EntitySystem
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private record struct SeedJob() : IRobustJob
|
private record struct SeedJob() : IRobustJob
|
||||||
{
|
{
|
||||||
public StationAiVisionSystem System;
|
public required StationAiVisionSystem System;
|
||||||
|
|
||||||
public Entity<MapGridComponent> Grid;
|
public Entity<MapGridComponent> Grid;
|
||||||
public Box2 ExpandedBounds;
|
public Box2 ExpandedBounds;
|
||||||
@@ -293,14 +294,14 @@ public sealed class StationAiVisionSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
public int BatchSize => 1;
|
public int BatchSize => 1;
|
||||||
|
|
||||||
public IEntityManager EntManager;
|
public required IEntityManager EntManager;
|
||||||
public SharedMapSystem Maps;
|
public required SharedMapSystem Maps;
|
||||||
public StationAiVisionSystem System;
|
public required StationAiVisionSystem System;
|
||||||
|
|
||||||
public Entity<MapGridComponent> Grid;
|
public Entity<MapGridComponent> Grid;
|
||||||
public List<Entity<StationAiVisionComponent>> Data = new();
|
public List<Entity<StationAiVisionComponent>> Data = new();
|
||||||
|
|
||||||
public HashSet<Vector2i> VisibleTiles;
|
public required HashSet<Vector2i> VisibleTiles;
|
||||||
|
|
||||||
public readonly List<Dictionary<Vector2i, int>> Vis1 = new();
|
public readonly List<Dictionary<Vector2i, int>> Vis1 = new();
|
||||||
public readonly List<Dictionary<Vector2i, int>> Vis2 = new();
|
public readonly List<Dictionary<Vector2i, int>> Vis2 = new();
|
||||||
|
|||||||
Reference in New Issue
Block a user