Disable warnings that would be refactored anyway (#5047)
This commit is contained in:
@@ -113,7 +113,9 @@ namespace Content.Client.Actions
|
|||||||
{
|
{
|
||||||
case BehaviorType.Instant:
|
case BehaviorType.Instant:
|
||||||
// for instant actions, we immediately tell the server we're doing it
|
// for instant actions, we immediately tell the server we're doing it
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(attempt.PerformInstantActionMessage());
|
SendNetworkMessage(attempt.PerformInstantActionMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
break;
|
break;
|
||||||
case BehaviorType.Toggle:
|
case BehaviorType.Toggle:
|
||||||
// for toggle actions, we immediately tell the server we're toggling it.
|
// for toggle actions, we immediately tell the server we're toggling it.
|
||||||
@@ -123,7 +125,9 @@ namespace Content.Client.Actions
|
|||||||
// even if it sometimes may not (it will be reset by the server if wrong).
|
// even if it sometimes may not (it will be reset by the server if wrong).
|
||||||
attempt.ToggleAction(this, !actionState.ToggledOn);
|
attempt.ToggleAction(this, !actionState.ToggledOn);
|
||||||
slot.ToggledOn = !actionState.ToggledOn;
|
slot.ToggledOn = !actionState.ToggledOn;
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(attempt.PerformToggleActionMessage(!actionState.ToggledOn));
|
SendNetworkMessage(attempt.PerformToggleActionMessage(!actionState.ToggledOn));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -178,7 +182,9 @@ namespace Content.Client.Actions
|
|||||||
case BehaviorType.TargetPoint:
|
case BehaviorType.TargetPoint:
|
||||||
{
|
{
|
||||||
// send our action to the server, we chose our target
|
// send our action to the server, we chose our target
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(attempt.PerformTargetPointActionMessage(args));
|
SendNetworkMessage(attempt.PerformTargetPointActionMessage(args));
|
||||||
|
#pragma warning restore 618
|
||||||
if (!attempt.Action.Repeat)
|
if (!attempt.Action.Repeat)
|
||||||
{
|
{
|
||||||
_ui.StopTargeting();
|
_ui.StopTargeting();
|
||||||
@@ -189,7 +195,9 @@ namespace Content.Client.Actions
|
|||||||
case BehaviorType.TargetEntity when args.EntityUid != EntityUid.Invalid:
|
case BehaviorType.TargetEntity when args.EntityUid != EntityUid.Invalid:
|
||||||
{
|
{
|
||||||
// send our action to the server, we chose our target
|
// send our action to the server, we chose our target
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(attempt.PerformTargetEntityActionMessage(args));
|
SendNetworkMessage(attempt.PerformTargetEntityActionMessage(args));
|
||||||
|
#pragma warning restore 618
|
||||||
if (!attempt.Action.Repeat)
|
if (!attempt.Action.Repeat)
|
||||||
{
|
{
|
||||||
_ui.StopTargeting();
|
_ui.StopTargeting();
|
||||||
|
|||||||
@@ -208,7 +208,9 @@ namespace Content.Client.Alerts
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new ClickAlertMessage(alert.Alert.AlertType));
|
SendNetworkMessage(new ClickAlertMessage(alert.Alert.AlertType));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void AfterShowAlert()
|
protected override void AfterShowAlert()
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ namespace Content.Client.Camera
|
|||||||
_updateEye();
|
_updateEye();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, channel, session);
|
base.HandleNetworkMessage(message, channel, session);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using Content.Client.CharacterInterface;
|
using Content.Client.CharacterInterface;
|
||||||
using Content.Client.HUD.UI;
|
using Content.Client.HUD.UI;
|
||||||
using Content.Client.Stylesheets;
|
using Content.Client.Stylesheets;
|
||||||
@@ -35,9 +36,12 @@ namespace Content.Client.CharacterInfo.Components
|
|||||||
|
|
||||||
public void Opened()
|
public void Opened()
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new RequestCharacterInfoMessage());
|
SendNetworkMessage(new RequestCharacterInfoMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, netChannel, session);
|
base.HandleNetworkMessage(message, netChannel, session);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ namespace Content.Client.DoAfter
|
|||||||
|
|
||||||
public DoAfterGui? Gui { get; set; }
|
public DoAfterGui? Gui { get; set; }
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, netChannel, session);
|
base.HandleNetworkMessage(message, netChannel, session);
|
||||||
|
|||||||
@@ -229,7 +229,9 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
if (!fromStateChange)
|
if (!fromStateChange)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentStartMidiMessage());
|
SendNetworkMessage(new InstrumentStartMidiMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +260,9 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
if (!fromStateChange && IoCManager.Resolve<INetManager>().IsConnected)
|
if (!fromStateChange && IoCManager.Resolve<INetManager>().IsConnected)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,6 +272,7 @@ namespace Content.Client.Instruments
|
|||||||
EndRenderer();
|
EndRenderer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, channel, session);
|
base.HandleNetworkMessage(message, channel, session);
|
||||||
@@ -472,7 +477,9 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
if (eventCount == 0) return;
|
if (eventCount == 0) return;
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentMidiEventMessage(events));
|
SendNetworkMessage(new InstrumentMidiEventMessage(events));
|
||||||
|
#pragma warning restore 618
|
||||||
|
|
||||||
_sentWithinASec += eventCount;
|
_sentWithinASec += eventCount;
|
||||||
|
|
||||||
|
|||||||
@@ -232,23 +232,31 @@ namespace Content.Client.Inventory
|
|||||||
public void SendEquipMessage(Slots slot)
|
public void SendEquipMessage(Slots slot)
|
||||||
{
|
{
|
||||||
var equipMessage = new ClientInventoryMessage(slot, ClientInventoryUpdate.Equip);
|
var equipMessage = new ClientInventoryMessage(slot, ClientInventoryUpdate.Equip);
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(equipMessage);
|
SendNetworkMessage(equipMessage);
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendUseMessage(Slots slot)
|
public void SendUseMessage(Slots slot)
|
||||||
{
|
{
|
||||||
var equipmessage = new ClientInventoryMessage(slot, ClientInventoryUpdate.Use);
|
var equipmessage = new ClientInventoryMessage(slot, ClientInventoryUpdate.Use);
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(equipmessage);
|
SendNetworkMessage(equipmessage);
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendHoverMessage(Slots slot)
|
public void SendHoverMessage(Slots slot)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new ClientInventoryMessage(slot, ClientInventoryUpdate.Hover));
|
SendNetworkMessage(new ClientInventoryMessage(slot, ClientInventoryUpdate.Hover));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendOpenStorageUIMessage(Slots slot)
|
public void SendOpenStorageUIMessage(Slots slot)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new OpenSlotStorageUIMessage(slot));
|
SendNetworkMessage(new OpenSlotStorageUIMessage(slot));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlayerDetached()
|
public void PlayerDetached()
|
||||||
|
|||||||
@@ -395,7 +395,9 @@ namespace Content.Client.Light.Components
|
|||||||
|
|
||||||
if (Owner.TryGetComponent(out AnimationPlayerComponent? animation))
|
if (Owner.TryGetComponent(out AnimationPlayerComponent? animation))
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
animation.AnimationCompleted += OnAnimationCompleted;
|
animation.AnimationCompleted += OnAnimationCompleted;
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var container in _animations)
|
foreach (var container in _animations)
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ namespace Content.Client.Singularity.Components
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
_spriteComponent.Directional = false;
|
_spriteComponent.Directional = false;
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.Animations;
|
using Content.Client.Animations;
|
||||||
@@ -79,6 +80,7 @@ namespace Content.Client.Storage
|
|||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, channel, session);
|
base.HandleNetworkMessage(message, channel, session);
|
||||||
@@ -180,7 +182,9 @@ namespace Content.Client.Storage
|
|||||||
{
|
{
|
||||||
if (buttonEventArgs.Event.Function == EngineKeyFunctions.UIClick)
|
if (buttonEventArgs.Event.Function == EngineKeyFunctions.UIClick)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new RemoveEntityMessage(entityUid));
|
SendNetworkMessage(new RemoveEntityMessage(entityUid));
|
||||||
|
#pragma warning restore 618
|
||||||
buttonEventArgs.Event.Handle();
|
buttonEventArgs.Event.Handle();
|
||||||
}
|
}
|
||||||
else if (Owner.EntityManager.TryGetEntity(entityUid, out var entity))
|
else if (Owner.EntityManager.TryGetEntity(entityUid, out var entity))
|
||||||
@@ -281,7 +285,9 @@ namespace Content.Client.Storage
|
|||||||
|
|
||||||
if (controlledEntity?.TryGetComponent(out HandsComponent? hands) ?? false)
|
if (controlledEntity?.TryGetComponent(out HandsComponent? hands) ?? false)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
StorageEntity.SendNetworkMessage(new InsertEntityMessage());
|
StorageEntity.SendNetworkMessage(new InsertEntityMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -316,7 +322,9 @@ namespace Content.Client.Storage
|
|||||||
|
|
||||||
public override void Close()
|
public override void Close()
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
StorageEntity.SendNetworkMessage(new CloseStorageUIMessage());
|
StorageEntity.SendNetworkMessage(new CloseStorageUIMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
base.Close();
|
base.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ namespace Content.Client.Weapons.Ranged.Barrels.Components
|
|||||||
_statusControl?.Update();
|
_statusControl?.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, channel, session);
|
base.HandleNetworkMessage(message, channel, session);
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ namespace Content.Client.Weapons.Ranged
|
|||||||
|
|
||||||
public void SyncFirePos(GridId targetGrid, Vector2 targetPosition)
|
public void SyncFirePos(GridId targetGrid, Vector2 targetPosition)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new FirePosComponentMessage(targetGrid, targetPosition));
|
SendNetworkMessage(new FirePosComponentMessage(targetGrid, targetPosition));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.Hands.Components;
|
using Content.Server.Hands.Components;
|
||||||
@@ -62,9 +63,12 @@ namespace Content.Server.AME.Components
|
|||||||
_jarSlot = ContainerHelpers.EnsureContainer<ContainerSlot>(Owner, $"{Name}-fuelJarContainer");
|
_jarSlot = ContainerHelpers.EnsureContainer<ContainerSlot>(Owner, $"{Name}-fuelJarContainer");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ namespace Content.Server.Actions
|
|||||||
{
|
{
|
||||||
[Dependency] private readonly IServerGameStateManager _stateManager = default!;
|
[Dependency] private readonly IServerGameStateManager _stateManager = default!;
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, netChannel, session);
|
base.HandleNetworkMessage(message, netChannel, session);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ namespace Content.Server.Alert
|
|||||||
base.OnRemove();
|
base.OnRemove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, netChannel, session);
|
base.HandleNetworkMessage(message, netChannel, session);
|
||||||
|
|||||||
@@ -33,9 +33,12 @@ namespace Content.Server.Arcade.Components
|
|||||||
private IPlayerSession? _player;
|
private IPlayerSession? _player;
|
||||||
private readonly List<IPlayerSession> _spectators = new();
|
private readonly List<IPlayerSession> _spectators = new();
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Server.UserInterface;
|
using Content.Server.UserInterface;
|
||||||
@@ -101,9 +102,12 @@ namespace Content.Server.Arcade.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Server.UserInterface;
|
using Content.Server.UserInterface;
|
||||||
using Content.Shared.ActionBlocker;
|
using Content.Shared.ActionBlocker;
|
||||||
@@ -82,9 +83,12 @@ namespace Content.Server.GameObjects.Components
|
|||||||
// Nothing!
|
// Nothing!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ namespace Content.Server.Atmos.Components
|
|||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(IActivate))]
|
[ComponentReference(typeof(IActivate))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class GasTankComponent : Component, IExamine, IGasMixtureHolder, IUse, IDropped, IActivate
|
public class GasTankComponent : Component, IExamine, IGasMixtureHolder, IUse, IDropped, IActivate
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "GasTank";
|
public override string Name => "GasTank";
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,9 @@ namespace Content.Server.Body.Surgery.Components
|
|||||||
|
|
||||||
var message = new SurgeryWindowOpenMessage(this);
|
var message = new SurgeryWindowOpenMessage(this);
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(message);
|
SendMessage(message);
|
||||||
|
#pragma warning restore 618
|
||||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, message);
|
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ using Robust.Shared.GameObjects;
|
|||||||
|
|
||||||
namespace Content.Server.Body.Surgery.Messages
|
namespace Content.Server.Body.Surgery.Messages
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
public class SurgeryWindowOpenMessage : ComponentMessage
|
public class SurgeryWindowOpenMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public SurgeryWindowOpenMessage(SurgeryToolComponent tool)
|
public SurgeryWindowOpenMessage(SurgeryToolComponent tool)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Botany.Components
|
namespace Content.Server.Botany.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class PlantHolderComponent : Component, IInteractUsing, IInteractHand, IActivate, IExamine
|
public class PlantHolderComponent : Component, IInteractUsing, IInteractHand, IActivate, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public const float HydroponicsSpeedMultiplier = 1f;
|
public const float HydroponicsSpeedMultiplier = 1f;
|
||||||
public const float HydroponicsConsumptionMultiplier = 4f;
|
public const float HydroponicsConsumptionMultiplier = 4f;
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Botany.Components
|
namespace Content.Server.Botany.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class SeedComponent : Component, IExamine
|
public class SeedComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "Seed";
|
public override string Name => "Seed";
|
||||||
|
|
||||||
|
|||||||
@@ -251,7 +251,9 @@ namespace Content.Server.Buckle.Components
|
|||||||
|
|
||||||
UpdateBuckleStatus();
|
UpdateBuckleStatus();
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(new BuckleMessage(Owner, to));
|
SendMessage(new BuckleMessage(Owner, to));
|
||||||
|
#pragma warning restore 618
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out SharedPullableComponent? ownerPullable))
|
if (Owner.TryGetComponent(out SharedPullableComponent? ownerPullable))
|
||||||
{
|
{
|
||||||
@@ -340,7 +342,9 @@ namespace Content.Server.Buckle.Components
|
|||||||
oldBuckledTo.Remove(this);
|
oldBuckledTo.Remove(this);
|
||||||
SoundSystem.Play(Filter.Pvs(Owner), oldBuckledTo.UnbuckleSound.GetSound(), Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), oldBuckledTo.UnbuckleSound.GetSound(), Owner);
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(new UnbuckleMessage(Owner, oldBuckledTo.Owner));
|
SendMessage(new UnbuckleMessage(Owner, oldBuckledTo.Owner));
|
||||||
|
#pragma warning restore 618
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ namespace Content.Server.Buckle.Components
|
|||||||
|
|
||||||
buckle.Appearance?.SetData(StrapVisuals.RotationAngle, _rotation);
|
buckle.Appearance?.SetData(StrapVisuals.RotationAngle, _rotation);
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(new StrapMessage(buckle.Owner, Owner));
|
SendMessage(new StrapMessage(buckle.Owner, Owner));
|
||||||
|
#pragma warning restore 618
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -124,7 +126,9 @@ namespace Content.Server.Buckle.Components
|
|||||||
if (_buckledEntities.Remove(buckle.Owner))
|
if (_buckledEntities.Remove(buckle.Owner))
|
||||||
{
|
{
|
||||||
_occupiedSize -= buckle.Size;
|
_occupiedSize -= buckle.Size;
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(new UnStrapMessage(buckle.Owner, Owner));
|
SendMessage(new UnStrapMessage(buckle.Owner, Owner));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ namespace Content.Server.Camera
|
|||||||
public override void Kick(Vector2 recoil)
|
public override void Kick(Vector2 recoil)
|
||||||
{
|
{
|
||||||
var msg = new RecoilKickMessage(recoil);
|
var msg = new RecoilKickMessage(recoil);
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(msg);
|
SendNetworkMessage(msg);
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
using Content.Shared.Cargo;
|
using Content.Shared.Cargo;
|
||||||
@@ -24,9 +25,12 @@ namespace Content.Server.Cargo.Components
|
|||||||
private CargoTelepadState _currentState = CargoTelepadState.Unpowered;
|
private CargoTelepadState _currentState = CargoTelepadState.Unpowered;
|
||||||
[DataField("teleportSound")] private SoundSpecifier _teleportSound = new SoundPathSpecifier("/Audio/Machines/phasein.ogg");
|
[DataField("teleportSound")] private SoundSpecifier _teleportSound = new SoundPathSpecifier("/Audio/Machines/phasein.ogg");
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Content.Server.Mind.Components;
|
using Content.Server.Mind.Components;
|
||||||
using Content.Server.Roles;
|
using Content.Server.Roles;
|
||||||
using Content.Shared.CharacterInfo;
|
using Content.Shared.CharacterInfo;
|
||||||
@@ -12,6 +13,7 @@ namespace Content.Server.CharacterInfo
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public class CharacterInfoComponent : SharedCharacterInfoComponent
|
public class CharacterInfoComponent : SharedCharacterInfoComponent
|
||||||
{
|
{
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
if(session?.AttachedEntity != Owner) return;
|
if(session?.AttachedEntity != Owner) return;
|
||||||
@@ -50,7 +52,9 @@ namespace Content.Server.CharacterInfo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new CharacterInfoMessage(jobTitle, conditions));
|
SendNetworkMessage(new CharacterInfoMessage(jobTitle, conditions));
|
||||||
|
#pragma warning restore 618
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,9 +81,12 @@ namespace Content.Server.Chemistry.Components
|
|||||||
UpdateUserInterface();
|
UpdateUserInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage:
|
case PowerChangedMessage:
|
||||||
|
|||||||
@@ -90,9 +90,12 @@ namespace Content.Server.Chemistry.Components
|
|||||||
UpdateUserInterface();
|
UpdateUserInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Shared.Buckle.Components;
|
using Content.Shared.Buckle.Components;
|
||||||
using Content.Shared.Climbing;
|
using Content.Shared.Climbing;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -52,9 +52,12 @@ namespace Content.Server.Climbing.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case BuckleMessage msg:
|
case BuckleMessage msg:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using Content.Server.Construction;
|
using Content.Server.Construction;
|
||||||
using Content.Server.Construction.Components;
|
using Content.Server.Construction.Components;
|
||||||
using Content.Server.Power.Components;
|
using Content.Server.Power.Components;
|
||||||
@@ -32,9 +33,12 @@ namespace Content.Server.Computer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -107,7 +107,9 @@ namespace Content.Server.Configurable
|
|||||||
_config[key] = value;
|
_config[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(new ConfigUpdatedComponentMessage(config));
|
SendMessage(new ConfigUpdatedComponentMessage(config));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Construction.Components
|
namespace Content.Server.Construction.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class MachineBoardComponent : Component, IExamine
|
public class MachineBoardComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Construction.Components
|
namespace Content.Server.Construction.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class MachinePartComponent : Component, IExamine
|
public class MachinePartComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
// I'm so sorry for hard-coding this. But trust me, it should make things less painful.
|
// I'm so sorry for hard-coding this. But trust me, it should make things less painful.
|
||||||
public static IReadOnlyDictionary<MachinePart, string> Prototypes { get; } = new Dictionary<MachinePart, string>()
|
public static IReadOnlyDictionary<MachinePart, string> Prototypes { get; } = new Dictionary<MachinePart, string>()
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ namespace Content.Server.DoAfter
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
_doAfters.Remove(doAfter);
|
_doAfters.Remove(doAfter);
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new CancelledDoAfterMessage(index));
|
SendNetworkMessage(new CancelledDoAfterMessage(index));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ namespace Content.Server.Electrocution
|
|||||||
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
||||||
[Dependency] private readonly NodeGroupSystem _nodeGroupSystem = default!;
|
[Dependency] private readonly NodeGroupSystem _nodeGroupSystem = default!;
|
||||||
|
|
||||||
protected const string StatusEffectKey = "Electrocution";
|
private const string StatusEffectKey = "Electrocution";
|
||||||
protected const string DamageType = "Shock";
|
private const string DamageType = "Shock";
|
||||||
|
|
||||||
// Yes, this is absurdly small for a reason.
|
// Yes, this is absurdly small for a reason.
|
||||||
private const float ElectrifiedDamagePerWatt = 0.0015f;
|
private const float ElectrifiedDamagePerWatt = 0.0015f;
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ namespace Content.Server.Hands.Components
|
|||||||
[ComponentReference(typeof(IHandsComponent))]
|
[ComponentReference(typeof(IHandsComponent))]
|
||||||
[ComponentReference(typeof(ISharedHandsComponent))]
|
[ComponentReference(typeof(ISharedHandsComponent))]
|
||||||
[ComponentReference(typeof(SharedHandsComponent))]
|
[ComponentReference(typeof(SharedHandsComponent))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class HandsComponent : SharedHandsComponent, IHandsComponent, IBodyPartAdded, IBodyPartRemoved, IDisarmedAct
|
public class HandsComponent : SharedHandsComponent, IHandsComponent, IBodyPartAdded, IBodyPartRemoved, IDisarmedAct
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ namespace Content.Server.Headset
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(IRadio))]
|
[ComponentReference(typeof(IRadio))]
|
||||||
[ComponentReference(typeof(IListen))]
|
[ComponentReference(typeof(IListen))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class HeadsetComponent : Component, IListen, IRadio, IExamine
|
public class HeadsetComponent : Component, IListen, IRadio, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IServerNetManager _netManager = default!;
|
[Dependency] private readonly IServerNetManager _netManager = default!;
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ namespace Content.Server.Instruments
|
|||||||
return new InstrumentState(Playing, InstrumentProgram, InstrumentBank, AllowPercussion, AllowProgramChange, RespectMidiLimits, _lastSequencerTick);
|
return new InstrumentState(Playing, InstrumentProgram, InstrumentBank, AllowPercussion, AllowProgramChange, RespectMidiLimits, _lastSequencerTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, channel, session);
|
base.HandleNetworkMessage(message, channel, session);
|
||||||
@@ -227,7 +228,9 @@ namespace Content.Server.Instruments
|
|||||||
|
|
||||||
if (send || !_respectMidiLimits)
|
if (send || !_respectMidiLimits)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(midiEventMsg);
|
SendNetworkMessage(midiEventMsg);
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
var maxTick = midiEventMsg.MidiEvent.Max(x => x.Tick);
|
var maxTick = midiEventMsg.MidiEvent.Max(x => x.Tick);
|
||||||
@@ -258,7 +261,9 @@ namespace Content.Server.Instruments
|
|||||||
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
void IDropped.Dropped(DroppedEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
Clean();
|
Clean();
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
InstrumentPlayer = null;
|
InstrumentPlayer = null;
|
||||||
UserInterface?.CloseAll();
|
UserInterface?.CloseAll();
|
||||||
}
|
}
|
||||||
@@ -266,7 +271,9 @@ namespace Content.Server.Instruments
|
|||||||
void IThrown.Thrown(ThrownEventArgs eventArgs)
|
void IThrown.Thrown(ThrownEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
Clean();
|
Clean();
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
InstrumentPlayer = null;
|
InstrumentPlayer = null;
|
||||||
UserInterface?.CloseAll();
|
UserInterface?.CloseAll();
|
||||||
}
|
}
|
||||||
@@ -286,7 +293,9 @@ namespace Content.Server.Instruments
|
|||||||
void IHandDeselected.HandDeselected(HandDeselectedEventArgs eventArgs)
|
void IHandDeselected.HandDeselected(HandDeselectedEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
Clean();
|
Clean();
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
UserInterface?.CloseAll();
|
UserInterface?.CloseAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +333,9 @@ namespace Content.Server.Instruments
|
|||||||
|
|
||||||
Clean();
|
Clean();
|
||||||
InstrumentPlayer = null;
|
InstrumentPlayer = null;
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenUserInterface(IPlayerSession session)
|
private void OpenUserInterface(IPlayerSession session)
|
||||||
@@ -354,7 +365,9 @@ namespace Content.Server.Instruments
|
|||||||
{
|
{
|
||||||
var mob = InstrumentPlayer.AttachedEntity;
|
var mob = InstrumentPlayer.AttachedEntity;
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
Playing = false;
|
Playing = false;
|
||||||
|
|
||||||
UserInterface?.CloseAll();
|
UserInterface?.CloseAll();
|
||||||
|
|||||||
@@ -411,7 +411,9 @@ namespace Content.Server.Interaction
|
|||||||
foreach (var interactHandComp in interactHandComps)
|
foreach (var interactHandComp in interactHandComps)
|
||||||
{
|
{
|
||||||
// If an InteractHand returns a status completion we finish our interaction
|
// If an InteractHand returns a status completion we finish our interaction
|
||||||
|
#pragma warning disable 618
|
||||||
if (interactHandComp.InteractHand(interactHandEventArgs))
|
if (interactHandComp.InteractHand(interactHandEventArgs))
|
||||||
|
#pragma warning restore 618
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,7 +444,9 @@ namespace Content.Server.Interaction
|
|||||||
foreach (var t in rangedInteractions)
|
foreach (var t in rangedInteractions)
|
||||||
{
|
{
|
||||||
// If an InteractUsingRanged returns a status completion we finish our interaction
|
// If an InteractUsingRanged returns a status completion we finish our interaction
|
||||||
|
#pragma warning disable 618
|
||||||
if (t.RangedInteract(rangedInteractionEventArgs))
|
if (t.RangedInteract(rangedInteractionEventArgs))
|
||||||
|
#pragma warning restore 618
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -528,6 +528,7 @@ namespace Content.Server.Inventory.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel,
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel,
|
||||||
ICommonSession? session = null)
|
ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ namespace Content.Server.Light.Components
|
|||||||
/// Component that represents an emergency light, it has an internal battery that charges when the power is on.
|
/// Component that represents an emergency light, it has an internal battery that charges when the power is on.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class EmergencyLightComponent : SharedEmergencyLightComponent, IExamine
|
public class EmergencyLightComponent : SharedEmergencyLightComponent, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
private EmergencyLightState State
|
private EmergencyLightState State
|
||||||
@@ -127,9 +129,14 @@ namespace Content.Server.Light.Components
|
|||||||
appearance.SetData(EmergencyLightVisuals.On, true);
|
appearance.SetData(EmergencyLightVisuals.On, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ namespace Content.Server.Light.Components
|
|||||||
/// Component that represents a powered handheld light source which can be toggled on and off.
|
/// Component that represents a powered handheld light source which can be toggled on and off.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
internal sealed class HandheldLightComponent : SharedHandheldLightComponent, IUse, IExamine, IInteractUsing
|
internal sealed class HandheldLightComponent : SharedHandheldLightComponent, IUse, IExamine, IInteractUsing
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[ViewVariables(VVAccess.ReadWrite)] [DataField("wattage")] public float Wattage { get; set; } = 3f;
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("wattage")] public float Wattage { get; set; } = 3f;
|
||||||
[ViewVariables] private PowerCellSlotComponent _cellSlot = default!;
|
[ViewVariables] private PowerCellSlotComponent _cellSlot = default!;
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ namespace Content.Server.Mind.Components
|
|||||||
/// Stores a <see cref="Server.Mind.Mind"/> on a mob.
|
/// Stores a <see cref="Server.Mind.Mind"/> on a mob.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class MindComponent : Component, IExamine
|
public class MindComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string Name => "Mind";
|
public override string Name => "Mind";
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ namespace Content.Server.Morgue.Components
|
|||||||
[ComponentReference(typeof(EntityStorageComponent))]
|
[ComponentReference(typeof(EntityStorageComponent))]
|
||||||
[ComponentReference(typeof(IActivate))]
|
[ComponentReference(typeof(IActivate))]
|
||||||
[ComponentReference(typeof(IStorageComponent))]
|
[ComponentReference(typeof(IStorageComponent))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class BodyBagEntityStorageComponent : EntityStorageComponent, IExamine, IInteractUsing
|
public class BodyBagEntityStorageComponent : EntityStorageComponent, IExamine, IInteractUsing
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "BodyBagEntityStorage";
|
public override string Name => "BodyBagEntityStorage";
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ namespace Content.Server.Morgue.Components
|
|||||||
[ComponentReference(typeof(EntityStorageComponent))]
|
[ComponentReference(typeof(EntityStorageComponent))]
|
||||||
[ComponentReference(typeof(IActivate))]
|
[ComponentReference(typeof(IActivate))]
|
||||||
[ComponentReference(typeof(IStorageComponent))]
|
[ComponentReference(typeof(IStorageComponent))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class CrematoriumEntityStorageComponent : MorgueEntityStorageComponent, IExamine, ISuicideAct
|
public class CrematoriumEntityStorageComponent : MorgueEntityStorageComponent, IExamine, ISuicideAct
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "CrematoriumEntityStorage";
|
public override string Name => "CrematoriumEntityStorage";
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ namespace Content.Server.Morgue.Components
|
|||||||
[ComponentReference(typeof(EntityStorageComponent))]
|
[ComponentReference(typeof(EntityStorageComponent))]
|
||||||
[ComponentReference(typeof(IActivate))]
|
[ComponentReference(typeof(IActivate))]
|
||||||
[ComponentReference(typeof(IStorageComponent))]
|
[ComponentReference(typeof(IStorageComponent))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class MorgueEntityStorageComponent : EntityStorageComponent, IExamine
|
public class MorgueEntityStorageComponent : EntityStorageComponent, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "MorgueEntityStorage";
|
public override string Name => "MorgueEntityStorage";
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ namespace Content.Server.NodeContainer
|
|||||||
/// Creates and maintains a set of <see cref="Node"/>s.
|
/// Creates and maintains a set of <see cref="Node"/>s.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class NodeContainerComponent : Component, IExamine
|
public class NodeContainerComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "NodeContainer";
|
public override string Name => "NodeContainer";
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ using System.Threading.Tasks;
|
|||||||
namespace Content.Server.Nutrition.Components
|
namespace Content.Server.Nutrition.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class DrinkComponent : Component, IUse, IAfterInteract, IExamine
|
public class DrinkComponent : Component, IUse, IAfterInteract, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[DataField("solution")]
|
[DataField("solution")]
|
||||||
public string SolutionName { get; set; } = DefaultSolutionName;
|
public string SolutionName { get; set; } = DefaultSolutionName;
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Nutrition.Components
|
namespace Content.Server.Nutrition.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
class SliceableFoodComponent : Component, IInteractUsing, IExamine
|
class SliceableFoodComponent : Component, IInteractUsing, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "SliceableFood";
|
public override string Name => "SliceableFood";
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Paper
|
namespace Content.Server.Paper
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class PaperComponent : SharedPaperComponent, IExamine, IInteractUsing, IUse
|
public class PaperComponent : SharedPaperComponent, IExamine, IInteractUsing, IUse
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
private PaperAction _mode;
|
private PaperAction _mode;
|
||||||
[DataField("content")]
|
[DataField("content")]
|
||||||
|
|||||||
@@ -112,9 +112,12 @@ namespace Content.Server.ParticleAccelerator.Components
|
|||||||
_apcPowerReceiverComponent!.Load = 250;
|
_apcPowerReceiverComponent!.Load = 250;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ namespace Content.Server.Power.Components
|
|||||||
/// so that it can receive power from a <see cref="IApcNet"/>.
|
/// so that it can receive power from a <see cref="IApcNet"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class ApcPowerReceiverComponent : Component, IExamine
|
public class ApcPowerReceiverComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "ApcPowerReceiver";
|
public override string Name => "ApcPowerReceiver";
|
||||||
|
|
||||||
@@ -84,7 +86,9 @@ namespace Content.Server.Power.Components
|
|||||||
|
|
||||||
private void OnNewPowerState()
|
private void OnNewPowerState()
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(new PowerChangedMessage(Powered));
|
SendMessage(new PowerChangedMessage(Powered));
|
||||||
|
#pragma warning restore 618
|
||||||
Owner.EntityManager.EventBus.RaiseLocalEvent(Owner.Uid, new PowerChangedEvent(Powered));
|
Owner.EntityManager.EventBus.RaiseLocalEvent(Owner.Uid, new PowerChangedEvent(Powered));
|
||||||
|
|
||||||
if (Owner.TryGetComponent<AppearanceComponent>(out var appearance))
|
if (Owner.TryGetComponent<AppearanceComponent>(out var appearance))
|
||||||
@@ -104,7 +108,9 @@ namespace Content.Server.Power.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public class PowerChangedMessage : ComponentMessage
|
public class PowerChangedMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public readonly bool Powered;
|
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
|
// 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)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Power.Components
|
namespace Content.Server.Power.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class ExaminableBatteryComponent : Component, IExamine
|
public class ExaminableBatteryComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "ExaminableBattery";
|
public override string Name => "ExaminableBattery";
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ namespace Content.Server.PowerCell.Components
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(BatteryComponent))]
|
[ComponentReference(typeof(BatteryComponent))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class PowerCellComponent : BatteryComponent, IExamine
|
public class PowerCellComponent : BatteryComponent, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "PowerCell";
|
public override string Name => "PowerCell";
|
||||||
public const string SolutionName = "powerCell";
|
public const string SolutionName = "powerCell";
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ namespace Content.Server.PowerCell.Components
|
|||||||
/// <see cref="PowerCellSize"/>. Intended to supplement other components, not very useful by itself.
|
/// <see cref="PowerCellSize"/>. Intended to supplement other components, not very useful by itself.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class PowerCellSlotComponent : Component, IExamine, IMapInit
|
public class PowerCellSlotComponent : Component, IExamine, IMapInit
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "PowerCellSlot";
|
public override string Name => "PowerCellSlot";
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ namespace Content.Server.Radio.Components
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(IRadio))]
|
[ComponentReference(typeof(IRadio))]
|
||||||
[ComponentReference(typeof(IListen))]
|
[ComponentReference(typeof(IListen))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class HandheldRadioComponent : Component, IUse, IListen, IRadio, IActivate, IExamine
|
public class HandheldRadioComponent : Component, IUse, IListen, IRadio, IActivate, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IChatManager _chatManager = default!;
|
[Dependency] private readonly IChatManager _chatManager = default!;
|
||||||
public override string Name => "Radio";
|
public override string Name => "Radio";
|
||||||
|
|||||||
@@ -274,7 +274,9 @@ namespace Content.Server.Storage.Components
|
|||||||
Logger.DebugS(LoggerName, $"Storage (UID {Owner.Uid}) \"used\" by player session (UID {userSession.AttachedEntityUid}).");
|
Logger.DebugS(LoggerName, $"Storage (UID {Owner.Uid}) \"used\" by player session (UID {userSession.AttachedEntityUid}).");
|
||||||
|
|
||||||
SubscribeSession(userSession);
|
SubscribeSession(userSession);
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new OpenStorageUIMessage(), userSession.ConnectedClient);
|
SendNetworkMessage(new OpenStorageUIMessage(), userSession.ConnectedClient);
|
||||||
|
#pragma warning restore 618
|
||||||
UpdateClientInventory(userSession);
|
UpdateClientInventory(userSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +321,9 @@ namespace Content.Server.Storage.Components
|
|||||||
|
|
||||||
var stored = StoredEntities.Select(e => e.Uid).ToArray();
|
var stored = StoredEntities.Select(e => e.Uid).ToArray();
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new StorageHeldItemsMessage(stored, _storageUsed, _storageCapacityMax), session.ConnectedClient);
|
SendNetworkMessage(new StorageHeldItemsMessage(stored, _storageUsed, _storageCapacityMax), session.ConnectedClient);
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -352,7 +356,9 @@ namespace Content.Server.Storage.Components
|
|||||||
Logger.DebugS(LoggerName, $"Storage (UID {Owner.Uid}) unsubscribed player session (UID {session.AttachedEntityUid}).");
|
Logger.DebugS(LoggerName, $"Storage (UID {Owner.Uid}) unsubscribed player session (UID {session.AttachedEntityUid}).");
|
||||||
|
|
||||||
SubscribedSessions.Remove(session);
|
SubscribedSessions.Remove(session);
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new CloseStorageUIMessage(), session.ConnectedClient);
|
SendNetworkMessage(new CloseStorageUIMessage(), session.ConnectedClient);
|
||||||
|
#pragma warning restore 618
|
||||||
|
|
||||||
UpdateDoorState();
|
UpdateDoorState();
|
||||||
}
|
}
|
||||||
@@ -385,6 +391,7 @@ namespace Content.Server.Storage.Components
|
|||||||
_storage.OccludesLight = _occludesLight;
|
_storage.OccludesLight = _occludesLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, channel, session);
|
base.HandleNetworkMessage(message, channel, session);
|
||||||
@@ -499,7 +506,9 @@ namespace Content.Server.Storage.Components
|
|||||||
|
|
||||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
((IUse) this).UseEntity(new UseEntityEventArgs(eventArgs.User));
|
((IUse) this).UseEntity(new UseEntityEventArgs(eventArgs.User));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -562,7 +571,9 @@ namespace Content.Server.Storage.Components
|
|||||||
if (successfullyInserted.Count > 0)
|
if (successfullyInserted.Count > 0)
|
||||||
{
|
{
|
||||||
PlaySoundCollection();
|
PlaySoundCollection();
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(
|
SendNetworkMessage(
|
||||||
|
#pragma warning restore 618
|
||||||
new AnimateInsertingEntitiesMessage(
|
new AnimateInsertingEntitiesMessage(
|
||||||
successfullyInserted,
|
successfullyInserted,
|
||||||
successfullyInsertedPositions
|
successfullyInsertedPositions
|
||||||
@@ -582,7 +593,9 @@ namespace Content.Server.Storage.Components
|
|||||||
var position = EntityCoordinates.FromMap(Owner.Transform.Parent?.Owner ?? Owner, eventArgs.Target.Transform.MapPosition);
|
var position = EntityCoordinates.FromMap(Owner.Transform.Parent?.Owner ?? Owner, eventArgs.Target.Transform.MapPosition);
|
||||||
if (PlayerInsertEntityInWorld(eventArgs.User, eventArgs.Target))
|
if (PlayerInsertEntityInWorld(eventArgs.User, eventArgs.Target))
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new AnimateInsertingEntitiesMessage(
|
SendNetworkMessage(new AnimateInsertingEntitiesMessage(
|
||||||
|
#pragma warning restore 618
|
||||||
new List<EntityUid>() { eventArgs.Target.Uid },
|
new List<EntityUid>() { eventArgs.Target.Uid },
|
||||||
new List<EntityCoordinates>() { position }
|
new List<EntityCoordinates>() { position }
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Suspicion
|
namespace Content.Server.Suspicion
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class SuspicionRoleComponent : SharedSuspicionRoleComponent, IExamine
|
public class SuspicionRoleComponent : SharedSuspicionRoleComponent, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
private Role? _role;
|
private Role? _role;
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
|
|||||||
@@ -31,8 +31,10 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Toilet
|
namespace Content.Server.Toilet
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class ToiletComponent : Component, IInteractUsing,
|
public class ToiletComponent : Component, IInteractUsing,
|
||||||
IInteractHand, IMapInit, IExamine, ISuicideAct
|
IInteractHand, IMapInit, IExamine, ISuicideAct
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public sealed override string Name => "Toilet";
|
public sealed override string Name => "Toilet";
|
||||||
|
|
||||||
|
|||||||
@@ -117,9 +117,12 @@ namespace Content.Server.VendingMachines
|
|||||||
InitializeFromPrototype();
|
InitializeFromPrototype();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case PowerChangedMessage powerChanged:
|
case PowerChangedMessage powerChanged:
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.Warps
|
namespace Content.Server.Warps
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public sealed class WarpPointComponent : Component, IExamine
|
public sealed class WarpPointComponent : Component, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "WarpPoint";
|
public override string Name => "WarpPoint";
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ using Robust.Shared.Utility;
|
|||||||
namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public sealed class AmmoBoxComponent : Component, IInteractUsing, IUse, IInteractHand, IMapInit, IExamine
|
public sealed class AmmoBoxComponent : Component, IInteractUsing, IUse, IInteractHand, IMapInit, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "AmmoBox";
|
public override string Name => "AmmoBox";
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
|||||||
/// Generally used for bullets but can be used for other things like bananas
|
/// Generally used for bullets but can be used for other things like bananas
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class AmmoComponent : Component, IExamine, ISerializationHooks
|
public class AmmoComponent : Component, IExamine, ISerializationHooks
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.Weapon.Ranged.Barrels.Components;
|
using Content.Server.Weapon.Ranged.Barrels.Components;
|
||||||
@@ -17,9 +18,12 @@ namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
|||||||
[DataField("solution")]
|
[DataField("solution")]
|
||||||
public string SolutionName { get; set; } = DefaultSolutionName;
|
public string SolutionName { get; set; } = DefaultSolutionName;
|
||||||
|
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
base.HandleMessage(message, component);
|
base.HandleMessage(message, component);
|
||||||
|
#pragma warning restore 618
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case BarrelFiredMessage barrelFired:
|
case BarrelFiredMessage barrelFired:
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ using Robust.Shared.Utility;
|
|||||||
namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
namespace Content.Server.Weapon.Ranged.Ammunition.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class RangedMagazineComponent : Component, IMapInit, IInteractUsing, IUse, IExamine
|
public class RangedMagazineComponent : Component, IMapInit, IInteractUsing, IUse, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "RangedMagazine";
|
public override string Name => "RangedMagazine";
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[NetworkedComponent()]
|
[NetworkedComponent()]
|
||||||
|
#pragma warning disable 618
|
||||||
public sealed class BoltActionBarrelComponent : ServerRangedBarrelComponent, IMapInit, IExamine
|
public sealed class BoltActionBarrelComponent : ServerRangedBarrelComponent, IMapInit, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
// Originally I had this logic shared with PumpBarrel and used a couple of variables to control things
|
// Originally I had this logic shared with PumpBarrel and used a couple of variables to control things
|
||||||
// but it felt a lot messier to play around with, especially when adding verbs
|
// but it felt a lot messier to play around with, especially when adding verbs
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
|
|||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[NetworkedComponent()]
|
[NetworkedComponent()]
|
||||||
|
#pragma warning disable 618
|
||||||
public sealed class ServerMagazineBarrelComponent : ServerRangedBarrelComponent, IExamine
|
public sealed class ServerMagazineBarrelComponent : ServerRangedBarrelComponent, IExamine
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public override string Name => "MagazineBarrel";
|
public override string Name => "MagazineBarrel";
|
||||||
|
|
||||||
@@ -311,7 +313,9 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
|
|||||||
SoundSystem.Play(Filter.Pvs(Owner), _soundAutoEject.GetSound(), Owner, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundAutoEject.GetSound(), Owner, AudioParams.Default.WithVolume(-2));
|
||||||
|
|
||||||
MagazineContainer.Remove(magazine);
|
MagazineContainer.Remove(magazine);
|
||||||
|
#pragma warning disable 618
|
||||||
SendNetworkMessage(new MagazineAutoEjectMessage());
|
SendNetworkMessage(new MagazineAutoEjectMessage());
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
|
|||||||
/// All of the ranged weapon components inherit from this to share mechanics like shooting etc.
|
/// All of the ranged weapon components inherit from this to share mechanics like shooting etc.
|
||||||
/// Only difference between them is how they retrieve a projectile to shoot (battery, magazine, etc.)
|
/// Only difference between them is how they retrieve a projectile to shoot (battery, magazine, etc.)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
#pragma warning disable 618
|
||||||
public abstract class ServerRangedBarrelComponent : SharedRangedBarrelComponent, IUse, IInteractUsing, IExamine, ISerializationHooks
|
public abstract class ServerRangedBarrelComponent : SharedRangedBarrelComponent, IUse, IInteractUsing, IExamine, ISerializationHooks
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
// There's still some of py01 and PJB's work left over, especially in underlying shooting logic,
|
// There's still some of py01 and PJB's work left over, especially in underlying shooting logic,
|
||||||
// it's just when I re-organised it changed me as the contributor
|
// it's just when I re-organised it changed me as the contributor
|
||||||
@@ -359,7 +361,9 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
|
|||||||
|
|
||||||
projectile.Transform.LocalRotation = projectileAngle + MathHelper.PiOver2;
|
projectile.Transform.LocalRotation = projectileAngle + MathHelper.PiOver2;
|
||||||
}
|
}
|
||||||
|
#pragma warning disable 618
|
||||||
ammo.SendMessage(this, new BarrelFiredMessage(firedProjectiles));
|
ammo.SendMessage(this, new BarrelFiredMessage(firedProjectiles));
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -415,7 +419,9 @@ namespace Content.Server.Weapon.Ranged.Barrels.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public class BarrelFiredMessage : ComponentMessage
|
public class BarrelFiredMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public readonly List<IEntity> FiredProjectiles;
|
public readonly List<IEntity> FiredProjectiles;
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ namespace Content.Server.Weapon.Ranged
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
[Obsolete("Component Messages are deprecated, use Entity Events instead.")]
|
||||||
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null)
|
||||||
{
|
{
|
||||||
base.HandleNetworkMessage(message, channel, session);
|
base.HandleNetworkMessage(message, channel, session);
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ namespace Content.Server.Window
|
|||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(SharedWindowComponent))]
|
[ComponentReference(typeof(SharedWindowComponent))]
|
||||||
|
#pragma warning disable 618
|
||||||
public class WindowComponent : SharedWindowComponent, IExamine, IInteractHand
|
public class WindowComponent : SharedWindowComponent, IExamine, IInteractHand
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Server.WireHacking
|
namespace Content.Server.WireHacking
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
|
#pragma warning disable 618
|
||||||
public class WiresComponent : SharedWiresComponent, IInteractUsing, IExamine, IMapInit
|
public class WiresComponent : SharedWiresComponent, IInteractUsing, IExamine, IMapInit
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
|
|
||||||
|
|||||||
@@ -465,7 +465,9 @@ namespace Content.Shared.Actions.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public abstract class BasePerformActionMessage : ComponentMessage
|
public abstract class BasePerformActionMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public abstract BehaviorType BehaviorType { get; }
|
public abstract BehaviorType BehaviorType { get; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,12 @@ namespace Content.Shared.Actions
|
|||||||
/// Action Prototype attempting to be performed
|
/// Action Prototype attempting to be performed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BaseActionPrototype Action { get; }
|
BaseActionPrototype Action { get; }
|
||||||
|
#pragma warning disable 618
|
||||||
ComponentMessage PerformInstantActionMessage();
|
ComponentMessage PerformInstantActionMessage();
|
||||||
ComponentMessage PerformToggleActionMessage(bool on);
|
ComponentMessage PerformToggleActionMessage(bool on);
|
||||||
ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args);
|
ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args);
|
||||||
ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args);
|
ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args);
|
||||||
|
#pragma warning restore 618
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tries to get the action state for this action from the actionsComponent, returning
|
/// Tries to get the action state for this action from the actionsComponent, returning
|
||||||
/// true if found.
|
/// true if found.
|
||||||
@@ -99,12 +101,16 @@ namespace Content.Shared.Actions
|
|||||||
target));
|
target));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformInstantActionMessage()
|
public ComponentMessage PerformInstantActionMessage()
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
return new PerformInstantActionMessage(_action.ActionType);
|
return new PerformInstantActionMessage(_action.ActionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformToggleActionMessage(bool toggleOn)
|
public ComponentMessage PerformToggleActionMessage(bool toggleOn)
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
if (toggleOn)
|
if (toggleOn)
|
||||||
{
|
{
|
||||||
@@ -113,12 +119,16 @@ namespace Content.Shared.Actions
|
|||||||
return new PerformToggleOffActionMessage(_action.ActionType);
|
return new PerformToggleOffActionMessage(_action.ActionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
public ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
return new PerformTargetPointActionMessage(_action.ActionType, args.Coordinates);
|
return new PerformTargetPointActionMessage(_action.ActionType, args.Coordinates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
public ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
return new PerformTargetEntityActionMessage(_action.ActionType, args.EntityUid);
|
return new PerformTargetEntityActionMessage(_action.ActionType, args.EntityUid);
|
||||||
}
|
}
|
||||||
@@ -176,12 +186,16 @@ namespace Content.Shared.Actions
|
|||||||
_itemActions.Toggle(_action.ActionType, toggleOn);
|
_itemActions.Toggle(_action.ActionType, toggleOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformInstantActionMessage()
|
public ComponentMessage PerformInstantActionMessage()
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
return new PerformInstantItemActionMessage(_action.ActionType, _item.Uid);
|
return new PerformInstantItemActionMessage(_action.ActionType, _item.Uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformToggleActionMessage(bool toggleOn)
|
public ComponentMessage PerformToggleActionMessage(bool toggleOn)
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
if (toggleOn)
|
if (toggleOn)
|
||||||
{
|
{
|
||||||
@@ -190,12 +204,16 @@ namespace Content.Shared.Actions
|
|||||||
return new PerformToggleOffItemActionMessage(_action.ActionType, _item.Uid);
|
return new PerformToggleOffItemActionMessage(_action.ActionType, _item.Uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
public ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
return new PerformTargetPointItemActionMessage(_action.ActionType, _item.Uid, args.Coordinates);
|
return new PerformTargetPointItemActionMessage(_action.ActionType, _item.Uid, args.Coordinates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
public ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
public ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
return new PerformTargetEntityItemActionMessage(_action.ActionType, _item.Uid, args.EntityUid);
|
return new PerformTargetEntityItemActionMessage(_action.ActionType, _item.Uid, args.EntityUid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,9 @@ namespace Content.Shared.Alert
|
|||||||
/// A message that calls the click interaction on a alert
|
/// A message that calls the click interaction on a alert
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class ClickAlertMessage : ComponentMessage
|
public class ClickAlertMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public readonly AlertType Type;
|
public readonly AlertType Type;
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ namespace Content.Shared.Buckle.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public abstract class BuckleChangeMessage : ComponentMessage
|
public abstract class BuckleChangeMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance of <see cref="BuckleChangeMessage"/>
|
/// Constructs a new instance of <see cref="BuckleChangeMessage"/>
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ namespace Content.Shared.Buckle.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public abstract class StrapChangeMessage : ComponentMessage
|
public abstract class StrapChangeMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance of <see cref="StrapChangeMessage"/>
|
/// Constructs a new instance of <see cref="StrapChangeMessage"/>
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ namespace Content.Shared.Camera
|
|||||||
public abstract void Kick(Vector2 recoil);
|
public abstract void Kick(Vector2 recoil);
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
protected class RecoilKickMessage : ComponentMessage
|
protected class RecoilKickMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public readonly Vector2 Recoil;
|
public readonly Vector2 Recoil;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ namespace Content.Shared.CharacterInfo
|
|||||||
public override string Name => "CharacterInfo";
|
public override string Name => "CharacterInfo";
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
protected class RequestCharacterInfoMessage : ComponentMessage
|
protected class RequestCharacterInfoMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public RequestCharacterInfoMessage()
|
public RequestCharacterInfoMessage()
|
||||||
{
|
{
|
||||||
@@ -22,7 +24,9 @@ namespace Content.Shared.CharacterInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
protected class CharacterInfoMessage : ComponentMessage
|
protected class CharacterInfoMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public readonly Dictionary<string, List<ConditionInfo>> Objectives;
|
public readonly Dictionary<string, List<ConditionInfo>> Objectives;
|
||||||
public readonly string JobTitle;
|
public readonly string JobTitle;
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ namespace Content.Shared.Configurable
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Message sent to other components on this entity when DeviceNetwork configuration updated.
|
/// Message sent to other components on this entity when DeviceNetwork configuration updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
#pragma warning disable 618
|
||||||
public class ConfigUpdatedComponentMessage : ComponentMessage
|
public class ConfigUpdatedComponentMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public Dictionary<string, string> Config { get; }
|
public Dictionary<string, string> Config { get; }
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ namespace Content.Shared.DoAfter
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public sealed class CancelledDoAfterMessage : ComponentMessage
|
public sealed class CancelledDoAfterMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public byte ID { get; }
|
public byte ID { get; }
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ namespace Content.Shared.Instruments
|
|||||||
/// This message is sent to the client to completely stop midi input and midi playback.
|
/// This message is sent to the client to completely stop midi input and midi playback.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class InstrumentStopMidiMessage : ComponentMessage
|
public class InstrumentStopMidiMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +47,9 @@ namespace Content.Shared.Instruments
|
|||||||
/// This message is sent to the client to start the synth.
|
/// This message is sent to the client to start the synth.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class InstrumentStartMidiMessage : ComponentMessage
|
public class InstrumentStartMidiMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -54,7 +58,9 @@ namespace Content.Shared.Instruments
|
|||||||
/// This message carries a MidiEvent to be played on clients.
|
/// This message carries a MidiEvent to be played on clients.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class InstrumentMidiEventMessage : ComponentMessage
|
public class InstrumentMidiEventMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public MidiEvent[] MidiEvent;
|
public MidiEvent[] MidiEvent;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ using Robust.Shared.Physics;
|
|||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
|
#pragma warning disable 618
|
||||||
|
|
||||||
namespace Content.Shared.Interaction
|
namespace Content.Shared.Interaction
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ namespace Content.Shared.Inventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class ClientInventoryMessage : ComponentMessage
|
public class ClientInventoryMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public Slots Inventoryslot;
|
public Slots Inventoryslot;
|
||||||
public ClientInventoryUpdate Updatetype;
|
public ClientInventoryUpdate Updatetype;
|
||||||
@@ -84,7 +86,9 @@ namespace Content.Shared.Inventory
|
|||||||
/// Component message for opening the Storage UI of item in Slot
|
/// Component message for opening the Storage UI of item in Slot
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class OpenSlotStorageUIMessage : ComponentMessage
|
public class OpenSlotStorageUIMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public Slots Slot;
|
public Slots Slot;
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,9 @@ namespace Content.Shared.MobState.Components
|
|||||||
state.UpdateState(Owner, threshold);
|
state.UpdateState(Owner, threshold);
|
||||||
|
|
||||||
var message = new MobStateChangedMessage(this, old, state);
|
var message = new MobStateChangedMessage(this, old, state);
|
||||||
|
#pragma warning disable 618
|
||||||
SendMessage(message);
|
SendMessage(message);
|
||||||
|
#pragma warning restore 618
|
||||||
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, message);
|
Owner.EntityManager.EventBus.RaiseEvent(EventSource.Local, message);
|
||||||
|
|
||||||
Dirty();
|
Dirty();
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ using Robust.Shared.GameObjects;
|
|||||||
|
|
||||||
namespace Content.Shared.MobState
|
namespace Content.Shared.MobState
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 618
|
||||||
public class MobStateChangedMessage : ComponentMessage
|
public class MobStateChangedMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public MobStateChangedMessage(
|
public MobStateChangedMessage(
|
||||||
IMobStateComponent component,
|
IMobStateComponent component,
|
||||||
|
|||||||
@@ -349,7 +349,6 @@ namespace Content.Shared.Preferences
|
|||||||
|
|
||||||
string RandomName()
|
string RandomName()
|
||||||
{
|
{
|
||||||
if (Sex == null) return "Urist McHands"; // This shouldn't happen
|
|
||||||
var random = IoCManager.Resolve<IRobustRandom>();
|
var random = IoCManager.Resolve<IRobustRandom>();
|
||||||
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
||||||
var firstName = random.Pick(Sex.FirstNames(protoMan).Values);
|
var firstName = random.Pick(Sex.FirstNames(protoMan).Values);
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ using Robust.Shared.Serialization;
|
|||||||
namespace Content.Shared.Singularity
|
namespace Content.Shared.Singularity
|
||||||
{
|
{
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class SingularitySoundMessage : ComponentMessage
|
public class SingularitySoundMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public bool Start { get; }
|
public bool Start { get; }
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ namespace Content.Shared.Storage
|
|||||||
/// Updates the client component about what entities this storage is holding
|
/// Updates the client component about what entities this storage is holding
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class StorageHeldItemsMessage : ComponentMessage
|
public class StorageHeldItemsMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public readonly int StorageSizeMax;
|
public readonly int StorageSizeMax;
|
||||||
public readonly int StorageSizeUsed;
|
public readonly int StorageSizeUsed;
|
||||||
@@ -93,7 +95,9 @@ namespace Content.Shared.Storage
|
|||||||
/// Component message for adding an entity to the storage entity.
|
/// Component message for adding an entity to the storage entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class InsertEntityMessage : ComponentMessage
|
public class InsertEntityMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public InsertEntityMessage()
|
public InsertEntityMessage()
|
||||||
{
|
{
|
||||||
@@ -105,7 +109,9 @@ namespace Content.Shared.Storage
|
|||||||
/// Component message for displaying an animation of entities flying into a storage entity
|
/// Component message for displaying an animation of entities flying into a storage entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class AnimateInsertingEntitiesMessage : ComponentMessage
|
public class AnimateInsertingEntitiesMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public readonly List<EntityUid> StoredEntities;
|
public readonly List<EntityUid> StoredEntities;
|
||||||
public readonly List<EntityCoordinates> EntityPositions;
|
public readonly List<EntityCoordinates> EntityPositions;
|
||||||
@@ -121,7 +127,9 @@ namespace Content.Shared.Storage
|
|||||||
/// Component message for removing a contained entity from the storage entity
|
/// Component message for removing a contained entity from the storage entity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class RemoveEntityMessage : ComponentMessage
|
public class RemoveEntityMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public EntityUid EntityUid;
|
public EntityUid EntityUid;
|
||||||
|
|
||||||
@@ -136,7 +144,9 @@ namespace Content.Shared.Storage
|
|||||||
/// Component message for opening the storage UI
|
/// Component message for opening the storage UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class OpenStorageUIMessage : ComponentMessage
|
public class OpenStorageUIMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public OpenStorageUIMessage()
|
public OpenStorageUIMessage()
|
||||||
{
|
{
|
||||||
@@ -149,7 +159,9 @@ namespace Content.Shared.Storage
|
|||||||
/// E.g when the player moves too far away from the container.
|
/// E.g when the player moves too far away from the container.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public class CloseStorageUIMessage : ComponentMessage
|
public class CloseStorageUIMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
public CloseStorageUIMessage()
|
public CloseStorageUIMessage()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ namespace Content.Shared.Weapons.Ranged.Components
|
|||||||
/// A component message raised when the weapon is fired at a position on the map.
|
/// A component message raised when the weapon is fired at a position on the map.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public sealed class FirePosComponentMessage : ComponentMessage
|
public sealed class FirePosComponentMessage : ComponentMessage
|
||||||
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this is not invalid, the target position is relative to the grid.
|
/// If this is not invalid, the target position is relative to the grid.
|
||||||
|
|||||||
@@ -8,5 +8,7 @@ namespace Content.Shared.Weapons.Ranged
|
|||||||
/// This is sent if the MagazineBarrel AutoEjects the magazine
|
/// This is sent if the MagazineBarrel AutoEjects the magazine
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
#pragma warning disable 618
|
||||||
public sealed class MagazineAutoEjectMessage : ComponentMessage {}
|
public sealed class MagazineAutoEjectMessage : ComponentMessage {}
|
||||||
|
#pragma warning restore 618
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user