2022-07-25 15:10:23 +10:00
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Parallax;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Handles per-map parallax
|
|
|
|
|
/// </summary>
|
2023-04-23 10:28:40 +00:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
|
2023-04-22 12:02:23 +00:00
|
|
|
public sealed partial class ParallaxComponent : Component
|
2022-07-25 15:10:23 +10:00
|
|
|
{
|
|
|
|
|
// I wish I could use a typeserializer here but parallax is extremely client-dependent.
|
2024-03-03 18:39:19 +11:00
|
|
|
[DataField, AutoNetworkedField]
|
2022-07-25 15:10:23 +10:00
|
|
|
public string Parallax = "Default";
|
|
|
|
|
|
|
|
|
|
[UsedImplicitly, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
// ReSharper disable once InconsistentNaming
|
|
|
|
|
public string ParallaxVV
|
|
|
|
|
{
|
|
|
|
|
get => Parallax;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value.Equals(Parallax)) return;
|
|
|
|
|
Parallax = value;
|
|
|
|
|
IoCManager.Resolve<IEntityManager>().Dirty(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|