Refactor serialization copying to use source generators (#19412)

This commit is contained in:
DrSmugleaf
2023-08-22 18:14:33 -07:00
committed by GitHub
parent 08b43990ab
commit a88e747a0b
1737 changed files with 2532 additions and 2521 deletions

View File

@@ -7,7 +7,7 @@ namespace Content.Shared.DoAfter;
/// </summary>
[Serializable, NetSerializable]
[ImplicitDataDefinitionForInheritors]
public abstract class DoAfterEvent : HandledEntityEventArgs
public abstract partial class DoAfterEvent : HandledEntityEventArgs
{
/// <summary>
/// The do after that triggered this event. This will be set by the do after system before the event is raised.
@@ -44,7 +44,7 @@ public abstract class DoAfterEvent : HandledEntityEventArgs
/// If an event actually contains data, it should actually override Clone().
/// </remarks>
[Serializable, NetSerializable]
public abstract class SimpleDoAfterEvent : DoAfterEvent
public abstract partial class SimpleDoAfterEvent : DoAfterEvent
{
// TODO: Find some way to enforce that inheritors don't store data?
// Alternatively, I just need to allow generics to be networked.
@@ -57,7 +57,7 @@ public abstract class SimpleDoAfterEvent : DoAfterEvent
// Placeholder for obsolete async do afters
[Serializable, NetSerializable]
[Obsolete("Dont use async DoAfters")]
public sealed class AwaitedDoAfterEvent : SimpleDoAfterEvent
public sealed partial class AwaitedDoAfterEvent : SimpleDoAfterEvent
{
}
@@ -65,7 +65,7 @@ public sealed class AwaitedDoAfterEvent : SimpleDoAfterEvent
/// This event will optionally get raised every tick while a do-after is in progress to check whether the do-after
/// should be canceled.
/// </summary>
public sealed class DoAfterAttemptEvent<TEvent> : CancellableEntityEventArgs where TEvent : DoAfterEvent
public sealed partial class DoAfterAttemptEvent<TEvent> : CancellableEntityEventArgs where TEvent : DoAfterEvent
{
/// <summary>
/// The do after that triggered this event.