Move scale command to content and turn it into a toolshed command (#39349)

* scale command

* fix namespaces
This commit is contained in:
slarticodefast
2025-08-06 14:33:21 +02:00
committed by GitHub
parent 87b0ec090f
commit 71f21d96f7
7 changed files with 224 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
using System.Numerics;
using Robust.Shared.GameStates;
namespace Content.Shared.Sprite;
/// <summary>
/// Used to set the <see cref="Robust.Client.GameObjects.SpriteComponent.Scale"/> datafield to a certain value from the server.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedScaleVisualsSystem))]
public sealed partial class ScaleVisualsComponent : Component
{
/// <summary>
/// The current sprite scale.
/// </summary>
[DataField, AutoNetworkedField]
[ViewVariables]
public Vector2 Scale = Vector2.One;
/// <summary>
/// The original sprite scale, which we revert to if this component is removed.
/// Only set on the client.
/// </summary>
[DataField]
[ViewVariables]
public Vector2? OriginalScale;
}