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,10 +1,8 @@
using Content.Server.Light.Components;
using Content.Server.Light.Events;
using Content.Shared.Destructible;
using Content.Shared.Light;
using Content.Shared.Throwing;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Player;
namespace Content.Server.Light.EntitySystems
@@ -17,6 +15,7 @@ namespace Content.Server.Light.EntitySystems
SubscribeLocalEvent<LightBulbComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<LightBulbComponent, LandEvent>(HandleLand);
SubscribeLocalEvent<LightBulbComponent, BreakageEventArgs>(OnBreak);
}
private void OnInit(EntityUid uid, LightBulbComponent bulb, ComponentInit args)
@@ -32,6 +31,11 @@ namespace Content.Server.Light.EntitySystems
SetState(uid, LightBulbState.Broken, bulb);
}
private void OnBreak(EntityUid uid, LightBulbComponent component, BreakageEventArgs args)
{
SetState(uid, LightBulbState.Broken, component);
}
/// <summary>
/// Set a new color for a light bulb and raise event about change
/// </summary>