Remove IDestroyAct, IBreakAct (#7876)
This commit is contained in:
@@ -8,7 +8,6 @@ using Content.Server.Power.Components;
|
||||
using Content.Server.Temperature.Components;
|
||||
using Content.Server.Temperature.Systems;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Acts;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Body.Part;
|
||||
using Content.Shared.FixedPoint;
|
||||
@@ -26,7 +25,7 @@ using Robust.Shared.Player;
|
||||
namespace Content.Server.Kitchen.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class MicrowaveComponent : SharedMicrowaveComponent, ISuicideAct, IBreakAct
|
||||
public sealed class MicrowaveComponent : SharedMicrowaveComponent, ISuicideAct
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entities = default!;
|
||||
|
||||
@@ -178,7 +177,7 @@ namespace Content.Server.Kitchen.Components
|
||||
}
|
||||
}
|
||||
|
||||
private void SetAppearance(MicrowaveVisualState state)
|
||||
public void SetAppearance(MicrowaveVisualState state)
|
||||
{
|
||||
var finalState = state;
|
||||
if (Broken)
|
||||
@@ -192,11 +191,6 @@ namespace Content.Server.Kitchen.Components
|
||||
}
|
||||
}
|
||||
|
||||
public void OnBreak(BreakageEventArgs eventArgs)
|
||||
{
|
||||
Broken = true;
|
||||
SetAppearance(MicrowaveVisualState.Broken);
|
||||
}
|
||||
// ReSharper disable once InconsistentNaming
|
||||
// ReSharper disable once IdentifierTypo
|
||||
private void Wzhzhzh()
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Kitchen.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Destructible;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Kitchen.Components;
|
||||
using Robust.Shared.Player;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
@@ -18,6 +20,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
|
||||
SubscribeLocalEvent<MicrowaveComponent, SolutionChangedEvent>(OnSolutionChange);
|
||||
SubscribeLocalEvent<MicrowaveComponent, InteractUsingEvent>(OnInteractUsing);
|
||||
SubscribeLocalEvent<MicrowaveComponent, BreakageEventArgs>(OnBreak);
|
||||
}
|
||||
|
||||
private void OnSolutionChange(EntityUid uid, MicrowaveComponent component, SolutionChangedEvent args)
|
||||
@@ -57,5 +60,11 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
component.Storage.Insert(args.Used);
|
||||
component.DirtyUi();
|
||||
}
|
||||
|
||||
private void OnBreak(EntityUid uid, MicrowaveComponent component, BreakageEventArgs args)
|
||||
{
|
||||
component.Broken = true;
|
||||
component.SetAppearance(MicrowaveVisualState.Broken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user