diff --git a/.github/workflows/build-docfx.yml b/.github/workflows/build-docfx.yml index d37e37026d7..3201cbb05e8 100644 --- a/.github/workflows/build-docfx.yml +++ b/.github/workflows/build-docfx.yml @@ -21,7 +21,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.100 + dotnet-version: 9.0.100 - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/build-map-renderer.yml b/.github/workflows/build-map-renderer.yml index c1790feadb8..7c644baef84 100644 --- a/.github/workflows/build-map-renderer.yml +++ b/.github/workflows/build-map-renderer.yml @@ -36,7 +36,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.100 + dotnet-version: 9.0.100 - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/build-test-debug.yml b/.github/workflows/build-test-debug.yml index bb0624e3ba0..42931c3c5bd 100644 --- a/.github/workflows/build-test-debug.yml +++ b/.github/workflows/build-test-debug.yml @@ -36,7 +36,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.100 + dotnet-version: 9.0.100 - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d9cfd3b25b4..f38f94ae84e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.100 + dotnet-version: 9.0.100 - name: Get Engine Tag run: | diff --git a/.github/workflows/test-packaging.yml b/.github/workflows/test-packaging.yml index 27cf5d2d7b1..de0ed746c34 100644 --- a/.github/workflows/test-packaging.yml +++ b/.github/workflows/test-packaging.yml @@ -51,7 +51,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.100 + dotnet-version: 9.0.100 - name: Install dependencies run: dotnet restore diff --git a/.github/workflows/yaml-linter.yml b/.github/workflows/yaml-linter.yml index 8660ccc0407..000ae7b492a 100644 --- a/.github/workflows/yaml-linter.yml +++ b/.github/workflows/yaml-linter.yml @@ -26,7 +26,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 8.0.100 + dotnet-version: 9.0.100 - name: Install dependencies run: dotnet restore - name: Build diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/AlertsComponentTests.cs b/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/AlertsComponentTests.cs index ee2ddb2790c..2f02d930f24 100644 --- a/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/AlertsComponentTests.cs +++ b/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/AlertsComponentTests.cs @@ -35,7 +35,7 @@ await server.WaitAssertion(() => { playerUid = serverPlayerManager.Sessions.Single().AttachedEntity.GetValueOrDefault(); #pragma warning disable NUnit2045 // Interdependent assertions. - Assert.That(playerUid, Is.Not.EqualTo(default)); + Assert.That(playerUid, Is.Not.EqualTo(default(EntityUid))); // Making sure it exists Assert.That(entManager.HasComponent(playerUid)); #pragma warning restore NUnit2045 diff --git a/Content.IntegrationTests/Tests/PostMapInitTest.cs b/Content.IntegrationTests/Tests/PostMapInitTest.cs index bc3fedbd954..6eada564207 100644 --- a/Content.IntegrationTests/Tests/PostMapInitTest.cs +++ b/Content.IntegrationTests/Tests/PostMapInitTest.cs @@ -8,7 +8,6 @@ using Content.Server.Spawners.Components; using Content.Server.Station.Components; using Content.Shared.CCVar; -using Content.Shared.Roles; using Robust.Server.GameObjects; using Robust.Shared.Configuration; using Robust.Shared.ContentPack; @@ -16,7 +15,6 @@ using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Prototypes; -using FastAccessors; using Robust.Shared.Utility; using YamlDotNet.RepresentationModel; @@ -65,7 +63,8 @@ public sealed class PostMapInitTest "Submarine", //DeltaV "Gax", "Rad", - "Europa" + "Europa", + "Meta" }; /// diff --git a/Content.PatreonParser/Content.PatreonParser.csproj b/Content.PatreonParser/Content.PatreonParser.csproj index 3206ad42e9d..1724ec0cea2 100644 --- a/Content.PatreonParser/Content.PatreonParser.csproj +++ b/Content.PatreonParser/Content.PatreonParser.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net9.0 enable enable true diff --git a/Content.Server/Animals/Components/UdderComponent.cs b/Content.Server/Animals/Components/UdderComponent.cs index 620f4572a71..f01c11c5dd7 100644 --- a/Content.Server/Animals/Components/UdderComponent.cs +++ b/Content.Server/Animals/Components/UdderComponent.cs @@ -29,7 +29,7 @@ internal sealed partial class UdderComponent : Component /// /// The solution to add reagent to. /// - [DataField] + [ViewVariables] public Entity? Solution = null; /// diff --git a/Content.Server/Animals/Components/WoolyComponent.cs b/Content.Server/Animals/Components/WoolyComponent.cs index c09c6f5e089..77dbd903322 100644 --- a/Content.Server/Animals/Components/WoolyComponent.cs +++ b/Content.Server/Animals/Components/WoolyComponent.cs @@ -29,7 +29,7 @@ public sealed partial class WoolyComponent : Component /// /// The solution to add reagent to. /// - [DataField] + [ViewVariables(VVAccess.ReadOnly)] public Entity? Solution; /// diff --git a/Content.Server/Anomaly/Components/ReagentProducerAnomalyComponent.cs b/Content.Server/Anomaly/Components/ReagentProducerAnomalyComponent.cs index 49c62aec81d..3f63a0518cf 100644 --- a/Content.Server/Anomaly/Components/ReagentProducerAnomalyComponent.cs +++ b/Content.Server/Anomaly/Components/ReagentProducerAnomalyComponent.cs @@ -97,6 +97,6 @@ public sealed partial class ReagentProducerAnomalyComponent : Component /// /// Solution where the substance is generated /// - [DataField("solutionRef")] + [ViewVariables] public Entity? Solution = null; } diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasCondenserComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasCondenserComponent.cs index c25c010708f..e89bba1fd70 100644 --- a/Content.Server/Atmos/Piping/Unary/Components/GasCondenserComponent.cs +++ b/Content.Server/Atmos/Piping/Unary/Components/GasCondenserComponent.cs @@ -25,7 +25,7 @@ public sealed partial class GasCondenserComponent : Component /// /// The solution that gases are condensed into. /// - [DataField] + [ViewVariables] public Entity? Solution = null; /// diff --git a/Content.Server/Body/Components/BloodstreamComponent.cs b/Content.Server/Body/Components/BloodstreamComponent.cs index ee0de4aa4dc..0dacd1753a6 100644 --- a/Content.Server/Body/Components/BloodstreamComponent.cs +++ b/Content.Server/Body/Components/BloodstreamComponent.cs @@ -160,22 +160,22 @@ public sealed partial class BloodstreamComponent : Component /// /// Internal solution for blood storage /// - [DataField] - public Entity? BloodSolution = null; + [ViewVariables] + public Entity? BloodSolution; /// /// Internal solution for reagent storage /// - [DataField] - public Entity? ChemicalSolution = null; + [ViewVariables] + public Entity? ChemicalSolution; /// /// Temporary blood solution. /// When blood is lost, it goes to this solution, and when this /// solution hits a certain cap, the blood is actually spilled as a puddle. /// - [DataField] - public Entity? TemporarySolution = null; + [ViewVariables] + public Entity? TemporarySolution; /// /// Variable that stores the amount of status time added by having a low blood level. diff --git a/Content.Server/Body/Components/LungComponent.cs b/Content.Server/Body/Components/LungComponent.cs index 72af4d9e63a..4fb769d6702 100644 --- a/Content.Server/Body/Components/LungComponent.cs +++ b/Content.Server/Body/Components/LungComponent.cs @@ -26,7 +26,7 @@ public sealed partial class LungComponent : Component /// /// The solution on this entity that these lungs act on. /// - [DataField] + [ViewVariables] public Entity? Solution = null; /// diff --git a/Content.Server/Body/Components/StomachComponent.cs b/Content.Server/Body/Components/StomachComponent.cs index d541ca4d7c4..06f03482e7e 100644 --- a/Content.Server/Body/Components/StomachComponent.cs +++ b/Content.Server/Body/Components/StomachComponent.cs @@ -25,8 +25,8 @@ public sealed partial class StomachComponent : Component /// /// The solution inside of this stomach this transfers reagents to the body. /// - [DataField] - public Entity? Solution = null; + [ViewVariables] + public Entity? Solution; /// /// What solution should this stomach push reagents into, on the body? diff --git a/Content.Server/Botany/Components/PlantHolderComponent.cs b/Content.Server/Botany/Components/PlantHolderComponent.cs index 809af737ac6..84dcab2e04c 100644 --- a/Content.Server/Botany/Components/PlantHolderComponent.cs +++ b/Content.Server/Botany/Components/PlantHolderComponent.cs @@ -92,6 +92,6 @@ public sealed partial class PlantHolderComponent : Component [ViewVariables(VVAccess.ReadWrite), DataField("solution")] public string SoilSolutionName = "soil"; - [DataField] + [ViewVariables] public Entity? SoilSolution = null; } diff --git a/Content.Server/Botany/Systems/MutationSystem.cs b/Content.Server/Botany/Systems/MutationSystem.cs index 4780f8b3310..c4c826a03c5 100644 --- a/Content.Server/Botany/Systems/MutationSystem.cs +++ b/Content.Server/Botany/Systems/MutationSystem.cs @@ -5,7 +5,6 @@ using Content.Shared.Chemistry.Reagent; using System.Linq; using Content.Shared.Atmos; -using FastAccessors; namespace Content.Server.Botany; diff --git a/Content.Server/Cargo/Systems/PricingSystem.cs b/Content.Server/Cargo/Systems/PricingSystem.cs index d936451d524..119b7a5aab8 100644 --- a/Content.Server/Cargo/Systems/PricingSystem.cs +++ b/Content.Server/Cargo/Systems/PricingSystem.cs @@ -424,7 +424,7 @@ public record struct PriceCalculationEvent() [ByRefEvent] public record struct EstimatedPriceCalculationEvent() { - public EntityPrototype Prototype; + public required EntityPrototype Prototype; /// /// The total price of the entity. diff --git a/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs b/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs index 23bf6b21573..2daad5eb19f 100644 --- a/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs +++ b/Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs @@ -20,8 +20,8 @@ public sealed partial class SolutionRegenerationComponent : Component /// /// The solution to add reagents to. /// - [DataField("solutionRef")] - public Entity? Solution = null; + [ViewVariables] + public Entity? SolutionRef = null; /// /// The reagent(s) to be regenerated in the solution. diff --git a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs index 5af181e4af5..fdfacde3476 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionRegenerationSystem.cs @@ -24,7 +24,7 @@ public override void Update(float frameTime) // timer ignores if its full, it's just a fixed cycle regen.NextRegenTime = _timing.CurTime + regen.Duration; - if (_solutionContainer.ResolveSolution((uid, manager), regen.SolutionName, ref regen.Solution, out var solution)) + if (_solutionContainer.ResolveSolution((uid, manager), regen.SolutionName, ref regen.SolutionRef, out var solution)) { var amount = FixedPoint2.Min(solution.AvailableVolume, regen.Generated.Volume); if (amount <= FixedPoint2.Zero) @@ -41,7 +41,7 @@ public override void Update(float frameTime) generated = regen.Generated.Clone().SplitSolution(amount); } - _solutionContainer.TryAddSolution(regen.Solution.Value, generated); + _solutionContainer.TryAddSolution(regen.SolutionRef.Value, generated); } } } diff --git a/Content.Server/Power/Generator/ChemicalFuelGeneratorAdapterComponent.cs b/Content.Server/Power/Generator/ChemicalFuelGeneratorAdapterComponent.cs index 58e0e8b012a..d36828eb83a 100644 --- a/Content.Server/Power/Generator/ChemicalFuelGeneratorAdapterComponent.cs +++ b/Content.Server/Power/Generator/ChemicalFuelGeneratorAdapterComponent.cs @@ -29,7 +29,7 @@ public sealed partial class ChemicalFuelGeneratorAdapterComponent : Component /// /// The solution on the to use. /// - [DataField("solutionRef")] + [ViewVariables] public Entity? Solution = null; /// diff --git a/Content.Shared/Actions/Events/AnomalyPowerActionEvent.cs b/Content.Shared/Actions/Events/AnomalyPowerActionEvent.cs index 9184460153b..a234521ecb2 100644 --- a/Content.Shared/Actions/Events/AnomalyPowerActionEvent.cs +++ b/Content.Shared/Actions/Events/AnomalyPowerActionEvent.cs @@ -74,7 +74,7 @@ public sealed partial class AnomalyPowerActionEvent : InstantActionEvent [DataRecord] public partial record struct AnomalyPowerSettings() { - public string PowerName; + public string PowerName = string.Empty; public float ManaCost; diff --git a/Content.Shared/Announcements/Systems/SharedAnnouncerSystem.cs b/Content.Shared/Announcements/Systems/SharedAnnouncerSystem.cs index 5e02b602d06..1aad348a5ac 100644 --- a/Content.Shared/Announcements/Systems/SharedAnnouncerSystem.cs +++ b/Content.Shared/Announcements/Systems/SharedAnnouncerSystem.cs @@ -66,7 +66,7 @@ public string GetAnnouncementPath(string announcementId, AnnouncerPrototype anno public string GetAnnouncementId(string announcementId, bool ended = false) { // Replace the first letter with lowercase - var id = char.ToLowerInvariant(announcementId[0]) + announcementId[1..]; + var id = OopsConcat(char.ToLowerInvariant(announcementId[0]).ToString(), announcementId[1..]); // If the event has ended, add "Complete" to the end if (ended) @@ -75,6 +75,12 @@ public string GetAnnouncementId(string announcementId, bool ended = false) return id; } + private string OopsConcat(string a, string b) + { + // This exists to prevent Roslyn being clever and compiling something that fails sandbox checks. + return a + b; + } + /// /// Gets audio params from the announcer diff --git a/Content.Shared/Chemistry/Components/SmokeComponent.cs b/Content.Shared/Chemistry/Components/SmokeComponent.cs index f07a77c1ac6..db4ad37c7ab 100644 --- a/Content.Shared/Chemistry/Components/SmokeComponent.cs +++ b/Content.Shared/Chemistry/Components/SmokeComponent.cs @@ -16,7 +16,7 @@ public sealed partial class SmokeComponent : Component /// /// The solution on the entity with touch and ingestion reactions. /// - [DataField] + [ViewVariables] public Entity? Solution = null; /// diff --git a/Content.Shared/Chemistry/Components/SolutionContainerMixerComponent.cs b/Content.Shared/Chemistry/Components/SolutionContainerMixerComponent.cs index 8e4b6f52d87..58aba436278 100644 --- a/Content.Shared/Chemistry/Components/SolutionContainerMixerComponent.cs +++ b/Content.Shared/Chemistry/Components/SolutionContainerMixerComponent.cs @@ -33,7 +33,7 @@ public sealed partial class SolutionContainerMixerComponent : Component [DataField, AutoNetworkedField] public SoundSpecifier? MixingSound; - [DataField] + [ViewVariables] public Entity? MixingSoundEntity; } diff --git a/Content.Shared/Execution/DoafterEvent.cs b/Content.Shared/Execution/DoafterEvent.cs deleted file mode 100644 index 78549745276..00000000000 --- a/Content.Shared/Execution/DoafterEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Content.Shared.DoAfter; -using Robust.Shared.Serialization; - -namespace Content.Shared.Execution; - -[Serializable, NetSerializable] -public sealed partial class ExecutionDoAfterEvent : SimpleDoAfterEvent -{ -} diff --git a/Content.Shared/Execution/DoAfterEvent.cs b/Content.Shared/Execution/ExecutionDoAfterEvent.cs similarity index 100% rename from Content.Shared/Execution/DoAfterEvent.cs rename to Content.Shared/Execution/ExecutionDoAfterEvent.cs diff --git a/Content.Shared/Fluids/Components/DrainComponent.cs b/Content.Shared/Fluids/Components/DrainComponent.cs index 4fb4fe94383..3a7bb9c1d61 100644 --- a/Content.Shared/Fluids/Components/DrainComponent.cs +++ b/Content.Shared/Fluids/Components/DrainComponent.cs @@ -20,7 +20,7 @@ public sealed partial class DrainComponent : Component [ValidatePrototypeId] public const string PlungerTag = "Plunger"; - [DataField] + [ViewVariables] public Entity? Solution = null; [DataField("accumulator")] diff --git a/Content.Shared/Fluids/Components/PuddleComponent.cs b/Content.Shared/Fluids/Components/PuddleComponent.cs index b8a6fe0cb88..5434479fb71 100644 --- a/Content.Shared/Fluids/Components/PuddleComponent.cs +++ b/Content.Shared/Fluids/Components/PuddleComponent.cs @@ -19,7 +19,7 @@ public sealed partial class PuddleComponent : Component [DataField("solution")] public string SolutionName = "puddle"; - [DataField("solutionRef")] + [ViewVariables] public Entity? Solution; } } diff --git a/Content.Shared/Footprint/FootPrintComponent.cs b/Content.Shared/Footprint/FootPrintComponent.cs index e1f9716057f..ec9fbec021c 100644 --- a/Content.Shared/Footprint/FootPrintComponent.cs +++ b/Content.Shared/Footprint/FootPrintComponent.cs @@ -18,6 +18,6 @@ public sealed partial class FootPrintComponent : Component [DataField] public string SolutionName = "step"; - [DataField] + [ViewVariables] public Entity? Solution; } diff --git a/Content.Shared/Mind/MindComponent.cs b/Content.Shared/Mind/MindComponent.cs index 51a174c8465..e2ace2198b6 100644 --- a/Content.Shared/Mind/MindComponent.cs +++ b/Content.Shared/Mind/MindComponent.cs @@ -46,9 +46,9 @@ public sealed partial class MindComponent : Component /// The first entity that this mind controlled. Used for round end information. /// Might be relevant if the player has ghosted since. /// - [DataField, AutoNetworkedField] - public NetEntity? OriginalOwnedEntity; - // This is a net entity, because this field currently ddoes not get set to null when this entity is deleted. + [AutoNetworkedField] + public NetEntity? OriginalOwnedEntity; // TODO WeakEntityReference make this a Datafield again + // This is a net entity, because this field currently does not get set to null when this entity is deleted. // This is a lazy way to ensure that people check that the entity still exists. // TODO MIND Fix this properly by adding an OriginalMindContainerComponent or something like that. diff --git a/Content.Shared/Prototypes/LocalizedPrototype.cs b/Content.Shared/Prototypes/LocalizedPrototype.cs index acdd5fc180f..b2f79864d1b 100644 --- a/Content.Shared/Prototypes/LocalizedPrototype.cs +++ b/Content.Shared/Prototypes/LocalizedPrototype.cs @@ -26,10 +26,16 @@ public string ToLocalizationString(string field) ((PrototypeAttribute?) Attribute.GetCustomAttribute(GetType(), typeof(PrototypeAttribute)))?.Type ?? GetType().Name.Remove(GetType().Name.Length - 9); // Lowercase the first letter - type = char.ToLowerInvariant(type[0]) + type[1..]; + type = OopsConcat(char.ToLowerInvariant(type[0]).ToString(), type[1..]); // Replace every uppercase letter with a dash and the lowercase letter - type = type.Aggregate("", (current, c) => current + (char.IsUpper(c) ? "-" + char.ToLowerInvariant(c) : c.ToString())); + type = type.Aggregate("", (current, c) => current + (char.IsUpper(c) ? OopsConcat("-", char.ToLowerInvariant(c).ToString()) : c.ToString())); return string.Format(LocFormat, type, ID, field); } + + private static string OopsConcat(string a, string b) + { + // This exists to prevent Roslyn being clever and compiling something that fails sandbox checks. + return a + b; + } } diff --git a/Content.Shared/Silicons/StationAi/StationAiVisionSystem.cs b/Content.Shared/Silicons/StationAi/StationAiVisionSystem.cs index bdc62a6bb37..86fd5881fec 100644 --- a/Content.Shared/Silicons/StationAi/StationAiVisionSystem.cs +++ b/Content.Shared/Silicons/StationAi/StationAiVisionSystem.cs @@ -278,7 +278,7 @@ private bool IsCorner( /// private record struct SeedJob() : IRobustJob { - public StationAiVisionSystem System; + public required StationAiVisionSystem System; public Entity Grid; public Box2 ExpandedBounds; @@ -293,14 +293,14 @@ private record struct ViewJob() : IParallelRobustJob { public int BatchSize => 1; - public IEntityManager EntManager; - public SharedMapSystem Maps; - public StationAiVisionSystem System; + public required IEntityManager EntManager; + public required SharedMapSystem Maps; + public required StationAiVisionSystem System; public Entity Grid; public List> Data = new(); - public HashSet VisibleTiles; + public HashSet VisibleTiles = new(); public readonly List> Vis1 = new(); public readonly List> Vis2 = new(); diff --git a/RobustToolbox b/RobustToolbox index e47ba0faea6..e4190f4f290 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit e47ba0faea6b1143f4810547b3d617a110bdb6a5 +Subproject commit e4190f4f2900634e332208a77cd6df9cef75c29a diff --git a/global.json b/global.json index c8526b0a8ba..cdbb589edad 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", - "rollForward": "patch" + "version": "9.0.100", + "rollForward": "latestFeature" } }