Remove IDestroyAct, IBreakAct (#7876)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user