Make energy swords use RgbLightController (#7344)

This commit is contained in:
Leon Friedrich
2022-04-16 17:11:48 +12:00
committed by GitHub
parent 1dcaa2d44b
commit a231429cb4
35 changed files with 240 additions and 583 deletions

View File

@@ -64,23 +64,6 @@ namespace Content.Shared.Item
[DataField("EquipSound")]
public SoundSpecifier? EquipSound { get; set; } = default!;
// TODO REMOVE. Currently nonfunctional and only used by RGB system. #6253 Fixes this but requires #6252
/// <summary>
/// Color of the sprite shown on the player when this item is in their hands.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public Color Color
{
get => _color;
set
{
_color = value;
Dirty();
}
}
[DataField("color")]
private Color _color = Color.White;
/// <summary>
/// Rsi of the sprite shown on the player when this item is in their hands. Used to generate a default entry for <see cref="InhandVisuals"/>
/// </summary>

View File

@@ -0,0 +1,11 @@
using Robust.Shared.Serialization;
namespace Content.Shared.Toggleable;
// Appearance Data key
[Serializable, NetSerializable]
public enum ToggleableLightVisuals
{
Enabled,
Color
}

View File

@@ -1,20 +0,0 @@
using System;
using Robust.Shared.Serialization;
namespace Content.Shared.Weapons.Melee;
[Serializable, NetSerializable, Flags]
public enum EnergySwordStatus : byte
{
Off = 0,
On = 1 << 0,
Hacked = 1 << 1,
}
[Serializable, NetSerializable]
public enum EnergySwordVisuals : byte
{
State,
Color,
}