Remove IDestroyAct, IBreakAct (#7876)

This commit is contained in:
Alex Evgrashin
2022-05-03 01:43:25 +03:00
committed by GitHub
parent 5d23100af3
commit 50ae467c76
21 changed files with 135 additions and 151 deletions

View File

@@ -1,5 +1,4 @@
using Content.Server.Light.EntitySystems;
using Content.Shared.Acts;
using Content.Shared.Light;
using Content.Shared.Sound;
using Robust.Shared.Analyzers;
@@ -13,7 +12,7 @@ namespace Content.Server.Light.Components
/// Component that represents a light bulb. Can be broken, or burned, which turns them mostly useless.
/// </summary>
[RegisterComponent, Friend(typeof(LightBulbSystem))]
public sealed class LightBulbComponent : Component, IBreakAct
public sealed class LightBulbComponent : Component
{
[DataField("color")]
public Color Color = Color.White;
@@ -41,12 +40,5 @@ namespace Content.Server.Light.Components
[DataField("breakSound")]
public SoundSpecifier BreakSound = new SoundCollectionSpecifier("GlassBreak");
// TODO: move me to ECS
public void OnBreak(BreakageEventArgs eventArgs)
{
EntitySystem.Get<LightBulbSystem>()
.SetState(Owner, LightBulbState.Broken, this);
}
}
}