using JetBrains.Annotations;
using Robust.Shared.Maths;
namespace Robust.Server.Maps
{
[PublicAPI]
public sealed class MapLoadOptions
{
///
/// If true, UID components will be created for loaded entities
/// to maintain consistency upon subsequent savings.
///
public bool StoreMapUids { get; set; }
///
/// Offset to apply to the loaded objects.
///
public Vector2 Offset
{
get => _offset;
set
{
TransformMatrix = Matrix3.CreateTransform(value, Rotation);
_offset = value;
}
}
private Vector2 _offset = Vector2.Zero;
///
/// Rotation to apply to the loaded objects as a collective, around 0, 0.
///
/// Setting this overrides <
public Angle Rotation
{
get => _rotation;
set
{
TransformMatrix = Matrix3.CreateTransform(Offset, value);
_rotation = value;
}
}
private Angle _rotation = Angle.Zero;
public Matrix3 TransformMatrix { get; set; } = Matrix3.Identity;
}
}