Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Content.Shared.Movement.Components;
|
||||
/// Added to an enabled jetpack. Tracks gas usage on server / effect spawning on client.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class ActiveJetpackComponent : Component
|
||||
public sealed partial class ActiveJetpackComponent : Component
|
||||
{
|
||||
public float EffectCooldown = 0.3f;
|
||||
public TimeSpan TargetTime = TimeSpan.Zero;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Movement.Components;
|
||||
/// Automatically rotates eye upon grid traversals.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class AutoOrientComponent : Component
|
||||
public sealed partial class AutoOrientComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Shared.Movement.Components
|
||||
/// Changes footstep sound
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class FootstepModifierComponent : Component
|
||||
public sealed partial class FootstepModifierComponent : Component
|
||||
{
|
||||
[DataField("footstepSoundCollection", required: true)]
|
||||
public SoundSpecifier Sound = default!;
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Shared.Movement.Components;
|
||||
/// Special component to allow an entity to navigate kudzu without slowdown.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class IgnoreKudzuComponent : Component
|
||||
public sealed partial class IgnoreKudzuComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Content.Shared.Movement.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent]
|
||||
public sealed class InputMoverComponent : Component
|
||||
public sealed partial class InputMoverComponent : Component
|
||||
{
|
||||
// This class has to be able to handle server TPS being lower than client FPS.
|
||||
// While still having perfectly responsive movement client side.
|
||||
|
||||
@@ -4,7 +4,7 @@ using Robust.Shared.GameStates;
|
||||
namespace Content.Shared.Movement.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class JetpackComponent : Component
|
||||
public sealed partial class JetpackComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("moleUsage")]
|
||||
public float MoleUsage = 0.012f;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Shared.Movement.Components;
|
||||
/// Added to someone using a jetpack for movement purposes
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class JetpackUserComponent : Component
|
||||
public sealed partial class JetpackUserComponent : Component
|
||||
{
|
||||
public EntityUid Jetpack;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Content.Shared.Movement.Components
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent()]
|
||||
public sealed class MobMoverComponent : Component
|
||||
public sealed partial class MobMoverComponent : Component
|
||||
{
|
||||
private float _stepSoundDistance;
|
||||
[DataField("grabRange")] public float GrabRange = 1.0f;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Shared.Movement.Components;
|
||||
/// i.e. when weightless they're floaty but still have free movement.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MovementAlwaysTouchingComponent : Component
|
||||
public sealed partial class MovementAlwaysTouchingComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@ using Robust.Shared.GameStates;
|
||||
namespace Content.Shared.Movement.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MovementBodyPartComponent : Component
|
||||
public sealed partial class MovementBodyPartComponent : Component
|
||||
{
|
||||
[DataField("walkSpeed")]
|
||||
public readonly float WalkSpeed = MovementSpeedModifierComponent.DefaultBaseWalkSpeed;
|
||||
public float WalkSpeed = MovementSpeedModifierComponent.DefaultBaseWalkSpeed;
|
||||
|
||||
[DataField("sprintSpeed")]
|
||||
public readonly float SprintSpeed = MovementSpeedModifierComponent.DefaultBaseSprintSpeed;
|
||||
public float SprintSpeed = MovementSpeedModifierComponent.DefaultBaseSprintSpeed;
|
||||
|
||||
[DataField("acceleration")]
|
||||
public float Acceleration = MovementSpeedModifierComponent.DefaultAcceleration;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Content.Shared.Movement.Components
|
||||
/// Ignores gravity entirely.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MovementIgnoreGravityComponent : Component
|
||||
public sealed partial class MovementIgnoreGravityComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not gravity is on or off for this object.
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Movement.Components
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent, Access(typeof(MovementSpeedModifierSystem))]
|
||||
public sealed class MovementSpeedModifierComponent : Component
|
||||
public sealed partial class MovementSpeedModifierComponent : Component
|
||||
{
|
||||
// Weightless
|
||||
public const float DefaultMinimumFrictionSpeed = 0.005f;
|
||||
|
||||
@@ -7,6 +7,6 @@ namespace Content.Shared.Movement.Components;
|
||||
/// Exists just to listen to a single event. What a life.
|
||||
/// </summary>
|
||||
[NetworkedComponent, RegisterComponent] // must be networked to properly predict adding & removal
|
||||
public sealed class SlowedByContactComponent : Component
|
||||
public sealed partial class SlowedByContactComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ namespace Content.Shared.Movement.Events;
|
||||
/// <summary>
|
||||
/// Raised on a jetpack whenever it is toggled.
|
||||
/// </summary>
|
||||
public sealed class ToggleJetpackEvent : InstantActionEvent {}
|
||||
public sealed partial class ToggleJetpackEvent : InstantActionEvent {}
|
||||
|
||||
Reference in New Issue
Block a user