Disable warnings that would be refactored anyway (#5047)
This commit is contained in:
@@ -21,7 +21,9 @@ namespace Content.Server.Power.Components
|
||||
/// so that it can receive power from a <see cref="IApcNet"/>.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
#pragma warning disable 618
|
||||
public class ApcPowerReceiverComponent : Component, IExamine
|
||||
#pragma warning restore 618
|
||||
{
|
||||
public override string Name => "ApcPowerReceiver";
|
||||
|
||||
@@ -84,7 +86,9 @@ namespace Content.Server.Power.Components
|
||||
|
||||
private void OnNewPowerState()
|
||||
{
|
||||
#pragma warning disable 618
|
||||
SendMessage(new PowerChangedMessage(Powered));
|
||||
#pragma warning restore 618
|
||||
Owner.EntityManager.EventBus.RaiseLocalEvent(Owner.Uid, new PowerChangedEvent(Powered));
|
||||
|
||||
if (Owner.TryGetComponent<AppearanceComponent>(out var appearance))
|
||||
@@ -104,7 +108,9 @@ namespace Content.Server.Power.Components
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable 618
|
||||
public class PowerChangedMessage : ComponentMessage
|
||||
#pragma warning restore 618
|
||||
{
|
||||
public readonly bool Powered;
|
||||
|
||||
|
||||
@@ -47,9 +47,12 @@ namespace Content.Server.Power.Components
|
||||
// Default state in the visualizer is OFF, so when this gets powered on during initialization it will generally show empty
|
||||
}
|
||||
|
||||
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
#pragma warning disable 618
|
||||
base.HandleMessage(message, component);
|
||||
#pragma warning restore 618
|
||||
switch (message)
|
||||
{
|
||||
case PowerChangedMessage powerChanged:
|
||||
|
||||
@@ -7,7 +7,9 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.Power.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
#pragma warning disable 618
|
||||
public class ExaminableBatteryComponent : Component, IExamine
|
||||
#pragma warning restore 618
|
||||
{
|
||||
public override string Name => "ExaminableBattery";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user