Add pipe coloring (#4261)

This commit is contained in:
Vera Aguilera Puerto
2021-07-12 09:59:45 +02:00
committed by GitHub
parent 6bbcf305bd
commit 077f158dda
17 changed files with 163 additions and 35 deletions

View File

@@ -0,0 +1,25 @@
using Content.Server.Atmos.Piping.EntitySystems;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Atmos.Piping.Components
{
[RegisterComponent]
public class AtmosPipeColorComponent : Component
{
public override string Name => "AtmosPipeColor";
[DataField("color")]
public Color Color { get; set; } = Color.White;
[ViewVariables(VVAccess.ReadWrite), UsedImplicitly]
public Color ColorVV
{
get => Color;
set => EntitySystem.Get<AtmosPipeColorSystem>().SetColor(Owner.Uid, this, value);
}
}
}