Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Content.Shared.Sound.Components
|
||||
/// Base sound emitter which defines most of the data fields.
|
||||
/// Accepts both single sounds and sound collections.
|
||||
/// </summary>
|
||||
public abstract class BaseEmitSoundComponent : Component
|
||||
public abstract partial class BaseEmitSoundComponent : Component
|
||||
{
|
||||
public static readonly AudioParams DefaultParams = AudioParams.Default.WithVolume(-2f);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Sound.Components;
|
||||
/// Simple sound emitter that emits sound on ActivateInWorld
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnActivateComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnActivateComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not to mark an interaction as handled after playing the sound. Useful if this component is
|
||||
|
||||
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnCollideComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnCollideComponent : BaseEmitSoundComponent
|
||||
{
|
||||
public static readonly TimeSpan CollideCooldown = TimeSpan.FromSeconds(0.2);
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Shared.Sound.Components;
|
||||
/// Simple sound emitter that emits sound on entity drop
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnDropComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnDropComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Shared.Sound.Components;
|
||||
/// Simple sound emitter that emits sound on LandEvent
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnLandComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnLandComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Shared.Sound.Components;
|
||||
/// Simple sound emitter that emits sound on entity pickup
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnPickupComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnPickupComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Shared.Sound.Components;
|
||||
/// Simple sound emitter that emits sound on entity spawn.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnSpawnComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnSpawnComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Shared.Sound.Components;
|
||||
/// Simple sound emitter that emits sound on ThrowEvent
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnThrowComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnThrowComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Sound.Components;
|
||||
/// Simple sound emitter that emits sound on UseInHand
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class EmitSoundOnUseComponent : BaseEmitSoundComponent
|
||||
public sealed partial class EmitSoundOnUseComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not to mark an interaction as handled after playing the sound. Useful if this component is
|
||||
|
||||
Reference in New Issue
Block a user