* 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>
29 lines
754 B
C#
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);
|
|
}
|
|
}
|
|
}
|