Files
tbd-station-14/Content.Shared/Parallax/ParallaxComponent.cs
metalgearsloth bfac53e7bc Per-map parallax support (#9786)
* Per-map parallax support

* Comments for future sloth

* c

* bet

* Fix exception

* VV support

* Fix parallax

* mem

* weightless sounds

* Gravity stuff

* placeholder coz im too lazy to stash don't @ me son

* decent clouds

* sky

* Fast parallax

* Imagine spelling

* Loicense

* perish

* Fix weightless status

Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-07-25 00:10:23 -05:00

29 lines
754 B
C#

using JetBrains.Annotations;
using Robust.Shared.GameStates;
namespace Content.Shared.Parallax;
/// <summary>
/// Handles per-map parallax
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed class ParallaxComponent : Component
{
// I wish I could use a typeserializer here but parallax is extremely client-dependent.
[DataField("parallax")]
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);
}
}
}