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