Downstream fixes for .net10

This commit is contained in:
BarryNorfolk 2026-02-03 06:29:50 +01:00
parent eb33b88067
commit 987361b5ce
17 changed files with 26 additions and 26 deletions

View File

@ -61,4 +61,4 @@ public sealed partial class StationStockMarketComponent : Component
}
[DataRecord]
public record struct MarketChange(float Chance, Vector2 Range);
public partial record struct MarketChange(float Chance, Vector2 Range);

View File

@ -88,7 +88,7 @@ namespace Content.Shared.Roles
/// Nyano/DV: For e.g. prisoners, they'll never use their latejoin spawner.
/// </summary>
[DataField("alwaysUseSpawner")]
public bool AlwaysUseSpawner { get; } = false;
public bool AlwaysUseSpawner { get; private set; } = false; // DeltaV - Added private set
/// <summary>
/// The "weight" or importance of this job. If this number is large, the job system will assign this job

View File

@ -10,7 +10,7 @@ public sealed partial class NukieOperationPrototype : IPrototype
{
/// <inheritdoc/>
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
[DataField(required: true)]
public List<EntProtoId> OperationObjectives = new();

View File

@ -61,7 +61,7 @@ public enum NanoChatUiMessageType : byte
// putting this here because i can
[Serializable, NetSerializable, DataRecord]
public struct NanoChatRecipient
public partial struct NanoChatRecipient
{
/// <summary>
/// The recipient's unique NanoChat number.
@ -100,7 +100,7 @@ public struct NanoChatRecipient
}
[Serializable, NetSerializable, DataRecord]
public struct NanoChatMessage
public partial struct NanoChatMessage
{
public const int MaxContentLength = 256;
@ -146,7 +146,7 @@ public struct NanoChatMessage
/// </summary>
/// <remarks>Used by the LogProbe</remarks>
[Serializable, NetSerializable, DataRecord]
public readonly struct NanoChatData(
public readonly partial struct NanoChatData(
Dictionary<uint, NanoChatRecipient> recipients,
Dictionary<uint, List<NanoChatMessage>> messages,
uint? cardNumber,

View File

@ -10,7 +10,7 @@ public sealed partial class FeedbackPopupPrototype : IPrototype
{
/// <inheritdoc/>
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
/// <summary>
/// Name of the popup. This is relayed in the discord webhook.

View File

@ -14,7 +14,7 @@ namespace Content.Shared._DV.Kitchen;
/// we can still reuse it for guidebook generation without duping the code.
/// </remarks>
[Prototype]
public sealed class DeepFryerRecipePrototype : IPrototype
public sealed partial class DeepFryerRecipePrototype : IPrototype
{
/// <inheritdoc/>
[IdDataField]

View File

@ -7,9 +7,9 @@ namespace Content.Shared._DV.Mail;
/// Generic random weighting dataset to use.
/// </summary>
[Prototype]
public sealed class MailDeliveryPoolPrototype : IPrototype
public sealed partial class MailDeliveryPoolPrototype : IPrototype
{
[IdDataField] public string ID { get; } = default!;
[IdDataField] public string ID { get; private set; } = default!;
/// <summary>
/// Mail that can be sent to everyone.

View File

@ -18,12 +18,12 @@ public sealed partial class QuickPhrasePrototype : IPrototype, IInheritingProtot
/// </summary>
[ViewVariables]
[ParentDataField(typeof(AbstractPrototypeIdArraySerializer<QuickPhrasePrototype>))]
public string[]? Parents { get; }
public string[]? Parents { get; private set; }
[ViewVariables]
[NeverPushInheritance]
[AbstractDataField]
public bool Abstract { get; }
public bool Abstract { get; private set; }
/// <summary>
/// The phrase that this prototype represents.

View File

@ -7,13 +7,13 @@ namespace Content.Shared.Shipyard.Prototypes;
/// Prevents making typos being silently ignored by the linter.
/// </summary>
[Prototype("vesselCategory")]
public sealed class VesselCategoryPrototype : IPrototype
public sealed partial class VesselCategoryPrototype : IPrototype
{
/// <summary>
/// The unique ID for the vessel category.
/// </summary>
[ViewVariables, IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
/// <summary>
/// The LocId containing the localization ID of the category name.

View File

@ -5,10 +5,10 @@ using Robust.Shared.Utility;
namespace Content.Shared.Shipyard.Prototypes;
[Prototype("vessel")]
public sealed class VesselPrototype : IPrototype
public sealed partial class VesselPrototype : IPrototype
{
[ViewVariables, IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
/// <summary>
/// Already localized name of the vessel.

View File

@ -6,7 +6,7 @@ namespace Content.Shared._DV.Speech.Prototypes;
public sealed partial class SyllableObfuscationAccentPrototype : IPrototype
{
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
[DataField]
public int MinSyllables = 1;

View File

@ -7,7 +7,7 @@ namespace Content.Shared._DV.VendingMachines;
/// Similar to <c>VendingMachineInventoryPrototype</c> but for <see cref="ShopVendorComponent"/>.
/// </summary>
[Prototype]
public sealed class ShopInventoryPrototype : IPrototype
public sealed partial class ShopInventoryPrototype : IPrototype
{
[IdDataField]
public string ID { get; private set; } = default!;
@ -20,4 +20,4 @@ public sealed class ShopInventoryPrototype : IPrototype
}
[DataRecord, Serializable]
public record struct ShopListing(EntProtoId Id, uint Cost);
public partial record struct ShopListing(EntProtoId Id, uint Cost);

View File

@ -4,10 +4,10 @@ using Robust.Shared.Prototypes;
namespace Content.Shared._DV.Whitelist;
[Prototype("whitelistTier")]
public sealed class WhitelistTierPrototype : IPrototype
public sealed partial class WhitelistTierPrototype : IPrototype
{
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!;
[DataField]
public string Name = string.Empty;

View File

@ -10,10 +10,10 @@ using Robust.Shared.Prototypes;
namespace Content.Shared._Goobstation.Devil.Contract;
[Prototype("clause")]
public sealed class DevilClausePrototype : IPrototype
public sealed partial class DevilClausePrototype : IPrototype // DeltaV - Added partial
{
[IdDataField]
public string ID { get; private init; } = default!;
public string ID { get; private set; } = default!; // DeltaV - Added private set
[DataField(required: true)]
public int ClauseWeight;

View File

@ -3,7 +3,7 @@ using Robust.Shared.Prototypes;
namespace Content.Shared._Goobstation.Devil;
[Prototype("devilBranchPrototype")]
public sealed class DevilBranchPrototype : IPrototype
public sealed partial class DevilBranchPrototype : IPrototype // DeltaV - Added partial
{
[IdDataField]
public string ID { get; set; } = default!;

View File

@ -11,7 +11,7 @@ namespace Content.Shared._Mono.CorticalBorer;
public sealed partial class CorticalBorerChemicalPrototype : IPrototype
{
[IdDataField]
public string ID { get; } = default!;
public string ID { get; private set; } = default!; // DeltaV - Added private set
/// <summary>
/// Chemical cost per u of reagent

View File

@ -20,4 +20,4 @@ public sealed partial class RMCClothingFoldableComponent : Component
/// </summary>
[DataRecord]
[Serializable, NetSerializable]
public readonly record struct FoldableType(string Prefix, LocId Name, int Priority, string? BlacklistedPrefix, LocId? BlacklistPopup);
public readonly partial record struct FoldableType(string Prefix, LocId Name, int Priority, string? BlacklistedPrefix, LocId? BlacklistPopup); // DeltaV - Added partial