explicit interface go brrrr

This commit is contained in:
Paul
2021-02-04 17:44:49 +01:00
parent 5f6d2d50ba
commit d5cd82de60
148 changed files with 285 additions and 206 deletions

View File

@@ -14,7 +14,7 @@ namespace Content.Client.GameObjects.Components.Body
return true; return true;
} }
public bool CanDrop(CanDropEventArgs args) bool IDraggable.CanDrop(CanDropEventArgs args)
{ {
return true; return true;
} }

View File

@@ -134,7 +134,7 @@ namespace Content.Client.GameObjects.Components
public static DirBoundData Default { get; } = new(); public static DirBoundData Default { get; } = new();
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref All, "all", default); serializer.DataField(ref All, "all", default);
serializer.DataField(ref North, "north", default); serializer.DataField(ref North, "north", default);

View File

@@ -91,7 +91,7 @@ namespace Content.Client.GameObjects.Components.Items
return args.Target.HasComponent<DisposalUnitComponent>(); return args.Target.HasComponent<DisposalUnitComponent>();
} }
public bool Drop(DragDropEventArgs args) bool IDraggable.Drop(DragDropEventArgs args)
{ {
// TODO: Shared item class // TODO: Shared item class
return false; return false;

View File

@@ -16,6 +16,8 @@ using Robust.Shared.IoC;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Reflection; using Robust.Shared.Reflection;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using System;
using Robust.Shared.Serialization;
namespace Content.IntegrationTests.Tests.Networking namespace Content.IntegrationTests.Tests.Networking
{ {
@@ -415,6 +417,7 @@ namespace Content.IntegrationTests.Tests.Networking
return new PredictionComponentState(Foo); return new PredictionComponentState(Foo);
} }
[Serializable, NetSerializable]
private sealed class PredictionComponentState : ComponentState private sealed class PredictionComponentState : ComponentState
{ {
public bool Foo { get; } public bool Foo { get; }

View File

@@ -2,6 +2,7 @@
using Content.Shared.Actions; using Content.Shared.Actions;
using Content.Shared.Utility; using Content.Shared.Utility;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Actions namespace Content.Server.Actions
@@ -15,7 +16,7 @@ namespace Content.Server.Actions
public string Message { get; private set; } public string Message { get; private set; }
public float Cooldown { get; private set; } public float Cooldown { get; private set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Message, "message", "Instant action used."); serializer.DataField(this, x => x.Message, "message", "Instant action used.");
serializer.DataField(this, x => x.Cooldown, "cooldown", 0); serializer.DataField(this, x => x.Cooldown, "cooldown", 0);

View File

@@ -1,6 +1,7 @@
using Content.Server.Utility; using Content.Server.Utility;
using Content.Shared.Actions; using Content.Shared.Actions;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Actions namespace Content.Server.Actions
@@ -8,8 +9,7 @@ namespace Content.Server.Actions
[UsedImplicitly] [UsedImplicitly]
public class DebugTargetEntity : ITargetEntityAction, ITargetEntityItemAction public class DebugTargetEntity : ITargetEntityAction, ITargetEntityItemAction
{ {
void IExposeData.ExposeData(ObjectSerializer serializer)
public void ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -2,6 +2,7 @@
using Content.Shared.Actions; using Content.Shared.Actions;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -10,7 +11,7 @@ namespace Content.Server.Actions
[UsedImplicitly] [UsedImplicitly]
public class DebugTargetPoint : ITargetPointAction, ITargetPointItemAction public class DebugTargetPoint : ITargetPointAction, ITargetPointItemAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -1,6 +1,7 @@
using Content.Server.Utility; using Content.Server.Utility;
using Content.Shared.Actions; using Content.Shared.Actions;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Actions namespace Content.Server.Actions
@@ -11,7 +12,7 @@ namespace Content.Server.Actions
public string MessageOn { get; private set; } public string MessageOn { get; private set; }
public string MessageOff { get; private set; } public string MessageOff { get; private set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.MessageOn, "messageOn", "on!"); serializer.DataField(this, x => x.MessageOn, "messageOn", "on!");
serializer.DataField(this, x => x.MessageOff, "messageOff", "off!"); serializer.DataField(this, x => x.MessageOff, "messageOff", "off!");

View File

@@ -21,6 +21,7 @@ using Robust.Shared.Audio;
using Robust.Shared.GameObjects.Systems; using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random; using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
@@ -36,7 +37,7 @@ namespace Content.Server.Actions
private float _pushProb; private float _pushProb;
private float _cooldown; private float _cooldown;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref _failProb, "failProb", 0.4f); serializer.DataField(ref _failProb, "failProb", 0.4f);
serializer.DataField(ref _pushProb, "pushProb", 0.4f); serializer.DataField(ref _pushProb, "pushProb", 0.4f);

View File

@@ -13,6 +13,7 @@ using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.GameObjects.Systems; using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Random; using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -38,7 +39,7 @@ namespace Content.Server.Actions
_random = IoCManager.Resolve<IRobustRandom>(); _random = IoCManager.Resolve<IRobustRandom>();
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref _male, "male", null); serializer.DataField(ref _male, "male", null);
serializer.DataField(ref _female, "female", null); serializer.DataField(ref _female, "female", null);

View File

@@ -1,6 +1,7 @@
using Content.Server.GameObjects.Components.Atmos; using Content.Server.GameObjects.Components.Atmos;
using Content.Shared.Alert; using Content.Shared.Alert;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Alert.Click namespace Content.Server.Alert.Click
@@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click
[UsedImplicitly] [UsedImplicitly]
public class ResistFire : IAlertClick public class ResistFire : IAlertClick
{ {
public void ExposeData(ObjectSerializer serializer) { } void IExposeData.ExposeData(ObjectSerializer serializer) { }
public void AlertClicked(ClickAlertEventArgs args) public void AlertClicked(ClickAlertEventArgs args)
{ {

View File

@@ -1,7 +1,8 @@
using Content.Server.GameObjects.Components.Movement; using Content.Server.GameObjects.Components.Movement;
using Content.Shared.Alert; using Content.Shared.Alert;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Serialization; using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization;
namespace Content.Server.Alert.Click namespace Content.Server.Alert.Click
{ {
@@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click
[UsedImplicitly] [UsedImplicitly]
public class StopPiloting : IAlertClick public class StopPiloting : IAlertClick
{ {
public void ExposeData(ObjectSerializer serializer) { } void IExposeData.ExposeData(ObjectSerializer serializer) { }
public void AlertClicked(ClickAlertEventArgs args) public void AlertClicked(ClickAlertEventArgs args)
{ {

View File

@@ -3,7 +3,8 @@
using Content.Shared.GameObjects.EntitySystems; using Content.Shared.GameObjects.EntitySystems;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects.Systems; using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Serialization; using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization;
namespace Content.Server.Alert.Click namespace Content.Server.Alert.Click
{ {
@@ -13,7 +14,7 @@ namespace Content.Server.Alert.Click
[UsedImplicitly] [UsedImplicitly]
public class StopPulling : IAlertClick public class StopPulling : IAlertClick
{ {
public void ExposeData(ObjectSerializer serializer) { } void IExposeData.ExposeData(ObjectSerializer serializer) { }
public void AlertClicked(ClickAlertEventArgs args) public void AlertClicked(ClickAlertEventArgs args)
{ {

View File

@@ -2,6 +2,7 @@
using Content.Shared.Alert; using Content.Shared.Alert;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
namespace Content.Server.Alert.Click namespace Content.Server.Alert.Click
{ {
@@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click
[UsedImplicitly] [UsedImplicitly]
public class Unbuckle : IAlertClick public class Unbuckle : IAlertClick
{ {
public void ExposeData(ObjectSerializer serializer) { } void IExposeData.ExposeData(ObjectSerializer serializer) { }
public void AlertClicked(ClickAlertEventArgs args) public void AlertClicked(ClickAlertEventArgs args)
{ {

View File

@@ -534,7 +534,7 @@ namespace Content.Server.Atmos
NumericsHelpers.Multiply(_moles, multiplier); NumericsHelpers.Multiply(_moles, multiplier);
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Immutable, "immutable", false); serializer.DataField(this, x => x.Immutable, "immutable", false);
serializer.DataField(this, x => x.Volume, "volume", 0f); serializer.DataField(this, x => x.Volume, "volume", 0f);

View File

@@ -6,6 +6,7 @@ using Content.Shared.Atmos;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Server.GameObjects.EntitySystems.TileLookup; using Robust.Server.GameObjects.EntitySystems.TileLookup;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Atmos.Reactions namespace Content.Server.Atmos.Reactions
@@ -89,7 +90,7 @@ namespace Content.Server.Atmos.Reactions
return mixture.ReactionResults[GasReaction.Fire] != 0 ? ReactionResult.Reacting : ReactionResult.NoReaction; return mixture.ReactionResults[GasReaction.Fire] != 0 ? ReactionResult.Reacting : ReactionResult.NoReaction;
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }
} }

View File

@@ -5,6 +5,7 @@ using Content.Shared.Atmos;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Server.GameObjects.EntitySystems.TileLookup; using Robust.Server.GameObjects.EntitySystems.TileLookup;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Atmos.Reactions namespace Content.Server.Atmos.Reactions
@@ -12,7 +13,7 @@ namespace Content.Server.Atmos.Reactions
[UsedImplicitly] [UsedImplicitly]
public class TritiumFireReaction : IGasReactionEffect public class TritiumFireReaction : IGasReactionEffect
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -146,7 +146,12 @@ namespace Content.Server.Botany
#endregion #endregion
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{
InternalExposeData(serializer);
}
public void InternalExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.ID, "id", string.Empty); serializer.DataField(this, x => x.ID, "id", string.Empty);
serializer.DataField(this, x => x.Name, "name", string.Empty); serializer.DataField(this, x => x.Name, "name", string.Empty);
@@ -190,7 +195,7 @@ namespace Content.Server.Botany
public void LoadFrom(YamlMappingNode mapping) public void LoadFrom(YamlMappingNode mapping)
{ {
var serializer = YamlObjectSerializer.NewReader(mapping); var serializer = YamlObjectSerializer.NewReader(mapping);
ExposeData(serializer); InternalExposeData(serializer);
} }
public Seed Clone() public Seed Clone()

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Botany;
using Content.Shared.Interfaces.Chemistry; using Content.Shared.Interfaces.Chemistry;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random; using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -17,7 +18,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
public float Amount { get; private set; } public float Amount { get; private set; }
public float Prob { get; private set; } public float Prob { get; private set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Amount, "amount", 1f); serializer.DataField(this, x => x.Amount, "amount", 1f);
serializer.DataField(this, x => x.Prob, "prob", 1f); serializer.DataField(this, x => x.Prob, "prob", 1f);

View File

@@ -5,6 +5,7 @@ using Content.Shared.Interfaces.Chemistry;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random; using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -13,7 +14,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
[UsedImplicitly] [UsedImplicitly]
public class Clonexadone : IPlantMetabolizable public class Clonexadone : IPlantMetabolizable
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -4,6 +4,7 @@ using Content.Shared.Interfaces.Chemistry;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random; using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Random; using Robust.Shared.Random;
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
[UsedImplicitly] [UsedImplicitly]
public class Diethylamine : IPlantMetabolizable public class Diethylamine : IPlantMetabolizable
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -4,6 +4,7 @@ using Content.Shared.Interfaces.Chemistry;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random; using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Random; using Robust.Shared.Random;
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.PlantMetabolism
[UsedImplicitly] [UsedImplicitly]
public class RobustHarvest : IPlantMetabolizable public class RobustHarvest : IPlantMetabolizable
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -3,6 +3,7 @@ using Content.Server.Explosions;
using Content.Server.GameObjects.Components.Chemistry; using Content.Server.GameObjects.Components.Chemistry;
using Content.Server.Interfaces.Chemistry; using Content.Server.Interfaces.Chemistry;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Chemistry.ReactionEffects namespace Content.Server.Chemistry.ReactionEffects
@@ -24,7 +25,7 @@ namespace Content.Server.Chemistry.ReactionEffects
/// </summary> /// </summary>
private float _maxScale; private float _maxScale;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref _devastationRange, "devastationRange", 1); serializer.DataField(ref _devastationRange, "devastationRange", 1);
serializer.DataField(ref _heavyImpactRange, "heavyImpactRange", 2); serializer.DataField(ref _heavyImpactRange, "heavyImpactRange", 2);

View File

@@ -4,6 +4,7 @@ using Content.Shared.Atmos;
using Content.Shared.Chemistry; using Content.Shared.Chemistry;
using Content.Shared.Interfaces.Chemistry; using Content.Shared.Interfaces.Chemistry;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.TileReactions
{ {
private float _coolingTemperature = 2f; private float _coolingTemperature = 2f;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref _coolingTemperature, "coolingTemperature", 2f); serializer.DataField(ref _coolingTemperature, "coolingTemperature", 2f);
} }

View File

@@ -4,6 +4,7 @@ using Content.Shared.Atmos;
using Content.Shared.Chemistry; using Content.Shared.Chemistry;
using Content.Shared.Interfaces.Chemistry; using Content.Shared.Interfaces.Chemistry;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.TileReactions
{ {
private float _temperatureMultiplier = 1.25f; private float _temperatureMultiplier = 1.25f;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref _temperatureMultiplier, "temperatureMultiplier", 1.15f); serializer.DataField(ref _temperatureMultiplier, "temperatureMultiplier", 1.15f);
} }

View File

@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Movement;
using Content.Shared.Chemistry; using Content.Shared.Chemistry;
using Content.Shared.Interfaces.Chemistry; using Content.Shared.Interfaces.Chemistry;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -11,7 +12,7 @@ namespace Content.Server.Chemistry.TileReactions
[UsedImplicitly] [UsedImplicitly]
public class SpillIfPuddlePresentTileReaction : ITileReaction public class SpillIfPuddlePresentTileReaction : ITileReaction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Movement;
using Content.Shared.Chemistry; using Content.Shared.Chemistry;
using Content.Shared.Interfaces.Chemistry; using Content.Shared.Interfaces.Chemistry;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -17,7 +18,7 @@ namespace Content.Server.Chemistry.TileReactions
private float _paralyzeTime = 1f; private float _paralyzeTime = 1f;
private bool _overflow; private bool _overflow;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
// If you want to modify more puddle/slippery values, add them here. // If you want to modify more puddle/slippery values, add them here.
serializer.DataField(ref _paralyzeTime, "paralyzeTime", 1f); serializer.DataField(ref _paralyzeTime, "paralyzeTime", 1f);

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Construction;
using Content.Shared.Construction; using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class AddContainer : IGraphAction public class AddContainer : IGraphAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Container, "container", null); serializer.DataField(this, x => x.Container, "container", null);
} }

View File

@@ -6,6 +6,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.Components.Container;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -16,7 +17,7 @@ namespace Content.Server.Construction.Completions
{ {
public string Container { get; private set; } = string.Empty; public string Container { get; private set; } = string.Empty;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Container, "container", string.Empty); serializer.DataField(this, x => x.Container, "container", string.Empty);
} }

View File

@@ -9,6 +9,7 @@ using Robust.Server.GameObjects.Components.Container;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -108,7 +109,7 @@ namespace Content.Server.Construction.Completions
entity.Delete(); entity.Delete();
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }
} }

View File

@@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Content.Shared.Construction; using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -10,7 +11,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class DeleteEntity : IGraphAction public class DeleteEntity : IGraphAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -5,6 +5,7 @@ using JetBrains.Annotations;
using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.Components.Container;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -12,7 +13,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class EmptyAllContainers : IGraphAction public class EmptyAllContainers : IGraphAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }

View File

@@ -6,6 +6,7 @@ using JetBrains.Annotations;
using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.Components.Container;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Completions
{ {
public string Container { get; private set; } = string.Empty; public string Container { get; private set; } = string.Empty;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Container, "container", string.Empty); serializer.DataField(this, x => x.Container, "container", string.Empty);
} }

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Construction;
using Content.Shared.Construction; using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class MachineFrameRegenerateProgress : IGraphAction public class MachineFrameRegenerateProgress : IGraphAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ } { }
public async Task PerformAction(IEntity entity, IEntity? user) public async Task PerformAction(IEntity entity, IEntity? user)

View File

@@ -6,6 +6,7 @@ using JetBrains.Annotations;
using Robust.Server.GameObjects.EntitySystems; using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects.Systems; using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -16,7 +17,7 @@ namespace Content.Server.Construction.Completions
public string SoundCollection { get; private set; } = string.Empty; public string SoundCollection { get; private set; } = string.Empty;
public string Sound { get; private set; } = string.Empty; public string Sound { get; private set; } = string.Empty;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Sound, "sound", string.Empty); serializer.DataField(this, x => x.Sound, "sound", string.Empty);
serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty); serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty);

View File

@@ -4,6 +4,7 @@ using Content.Shared.Construction;
using Content.Shared.Interfaces; using Content.Shared.Interfaces;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class PopupUser : IGraphAction public class PopupUser : IGraphAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Text, "text", string.Empty); serializer.DataField(this, x => x.Text, "text", string.Empty);
serializer.DataField(this, x => x.Cursor, "cursor", false); serializer.DataField(this, x => x.Cursor, "cursor", false);

View File

@@ -4,6 +4,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class SetAnchor : IGraphAction public class SetAnchor : IGraphAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Value, "value", true); serializer.DataField(this, x => x.Value, "value", true);
} }

View File

@@ -5,6 +5,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using System; using System;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Completions
{ {
public int Amount { get; private set; } public int Amount { get; private set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Amount, "amount", 1); serializer.DataField(this, x => x.Amount, "amount", 1);
} }

View File

@@ -5,6 +5,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects.Components.Transform; using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Completions namespace Content.Server.Construction.Completions
@@ -14,7 +15,7 @@ namespace Content.Server.Construction.Completions
{ {
public SnapGridOffset Offset { get; private set; } = SnapGridOffset.Center; public SnapGridOffset Offset { get; private set; } = SnapGridOffset.Center;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Offset, "offset", SnapGridOffset.Center); serializer.DataField(this, x => x.Offset, "offset", SnapGridOffset.Center);
} }

View File

@@ -6,6 +6,7 @@ using Content.Shared.Construction;
using Content.Shared.Utility; using Content.Shared.Utility;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -17,7 +18,7 @@ namespace Content.Server.Construction.Completions
public string Prototype { get; private set; } = string.Empty; public string Prototype { get; private set; } = string.Empty;
public int Amount { get; private set; } = 1; public int Amount { get; private set; } = 1;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Prototype, "prototype", string.Empty); serializer.DataField(this, x => x.Prototype, "prototype", string.Empty);
serializer.DataField(this, x => x.Amount, "amount", 1); serializer.DataField(this, x => x.Amount, "amount", 1);

View File

@@ -5,6 +5,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -13,7 +14,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class SpriteChange : IGraphAction public class SpriteChange : IGraphAction
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.SpriteSpecifier, "specifier", SpriteSpecifier.Invalid); serializer.DataField(this, x => x.SpriteSpecifier, "specifier", SpriteSpecifier.Invalid);
serializer.DataField(this, x => x.Layer, "layer", 0); serializer.DataField(this, x => x.Layer, "layer", 0);

View File

@@ -4,6 +4,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -12,8 +13,7 @@ namespace Content.Server.Construction.Completions
[UsedImplicitly] [UsedImplicitly]
public class SpriteStateChange : IGraphAction public class SpriteStateChange : IGraphAction
{ {
void IExposeData.ExposeData(ObjectSerializer serializer)
public void ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.State, "state", string.Empty); serializer.DataField(this, x => x.State, "state", string.Empty);
serializer.DataField(this, x => x.Layer, "layer", 0); serializer.DataField(this, x => x.Layer, "layer", 0);

View File

@@ -5,6 +5,7 @@ using JetBrains.Annotations;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Reflection; using Robust.Shared.Interfaces.Reflection;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -20,7 +21,7 @@ namespace Content.Server.Construction.Completions
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Key, "key", string.Empty); serializer.DataField(this, x => x.Key, "key", string.Empty);
serializer.DataField(this, x => x.Data, "data", 0); serializer.DataField(this, x => x.Data, "data", 0);

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Power;
using Content.Shared.Construction; using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.Construction.Conditions namespace Content.Server.Construction.Conditions
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions
[UsedImplicitly] [UsedImplicitly]
public class AllWiresCut : IEdgeCondition public class AllWiresCut : IEdgeCondition
{ {
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Value, "value", true); serializer.DataField(this, x => x.Value, "value", true);
} }

View File

@@ -4,6 +4,7 @@ using Content.Shared.Maps;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map; using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -23,7 +24,7 @@ namespace Content.Server.Construction.Conditions
IoCManager.InjectDependencies(this); IoCManager.InjectDependencies(this);
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Component, "component", string.Empty); serializer.DataField(this, x => x.Component, "component", string.Empty);
serializer.DataField(this, x => x.HasEntity, "hasEntity", true); serializer.DataField(this, x => x.HasEntity, "hasEntity", true);

View File

@@ -4,6 +4,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.Components.Container;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions
public string Container { get; private set; } = string.Empty; public string Container { get; private set; } = string.Empty;
public string Text { get; private set; } = string.Empty; public string Text { get; private set; } = string.Empty;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Container, "container", string.Empty); serializer.DataField(this, x => x.Container, "container", string.Empty);
serializer.DataField(this, x => x.Text, "text", string.Empty); serializer.DataField(this, x => x.Text, "text", string.Empty);

View File

@@ -5,6 +5,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Log; using Robust.Shared.Log;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -16,7 +17,8 @@ namespace Content.Server.Construction.Conditions
public class DoorWelded : IEdgeCondition public class DoorWelded : IEdgeCondition
{ {
public bool Welded { get; private set; } public bool Welded { get; private set; }
public void ExposeData(ObjectSerializer serializer)
void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Welded, "welded", true); serializer.DataField(this, x => x.Welded, "welded", true);
} }

View File

@@ -3,6 +3,7 @@ using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.GameObjects.Components; using Robust.Shared.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -13,7 +14,7 @@ namespace Content.Server.Construction.Conditions
{ {
public bool Anchored { get; private set; } public bool Anchored { get; private set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Anchored, "anchored", true); serializer.DataField(this, x => x.Anchored, "anchored", true);
} }

View File

@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Construction;
using Content.Shared.Construction; using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions
[UsedImplicitly] [UsedImplicitly]
public class MachineFrameComplete : IEdgeCondition public class MachineFrameComplete : IEdgeCondition
{ {
public void ExposeData(ObjectSerializer serializer) { } void IExposeData.ExposeData(ObjectSerializer serializer) { }
public async Task<bool> Condition(IEntity entity) public async Task<bool> Condition(IEntity entity)
{ {

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Watercloset;
using Content.Shared.Construction; using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -28,7 +29,7 @@ namespace Content.Server.Construction.Conditions
return true; return true;
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
} }
} }

View File

@@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components;
using Content.Shared.Construction; using Content.Shared.Construction;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -14,7 +15,7 @@ namespace Content.Server.Construction.Conditions
{ {
public bool Open { get; private set; } public bool Open { get; private set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Open, "open", true); serializer.DataField(this, x => x.Open, "open", true);
} }

View File

@@ -214,7 +214,7 @@ namespace Content.Server.GameObjects.Components.Access
UserInterface?.SetState(newState); UserInterface?.SetState(newState);
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) if(!eventArgs.User.TryGetComponent(out IActorComponent? actor))
{ {
@@ -224,7 +224,7 @@ namespace Content.Server.GameObjects.Components.Access
UserInterface?.Open(actor.playerSession); UserInterface?.Open(actor.playerSession);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
var item = eventArgs.Using; var item = eventArgs.Using;
var user = eventArgs.User; var user = eventArgs.User;

View File

@@ -53,7 +53,7 @@ namespace Content.Server.GameObjects.Components.Arcade
} }
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) if(!eventArgs.User.TryGetComponent(out IActorComponent? actor))
{ {

View File

@@ -71,7 +71,7 @@ namespace Content.Server.GameObjects.Components.Arcade
_game = new SpaceVillainGame(this); _game = new SpaceVillainGame(this);
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) if(!eventArgs.User.TryGetComponent(out IActorComponent? actor))
{ {

View File

@@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.Components.Atmos
DisconnectInternals(); DisconnectInternals();
} }
public void Equipped(EquippedEventArgs eventArgs) void IEquipped.Equipped(EquippedEventArgs eventArgs)
{ {
if ((EquipmentSlotDefines.SlotMasks[eventArgs.Slot] & _allowedSlots) != _allowedSlots) return; if ((EquipmentSlotDefines.SlotMasks[eventArgs.Slot] & _allowedSlots) != _allowedSlots) return;
IsFunctional = true; IsFunctional = true;
@@ -48,10 +48,9 @@ namespace Content.Server.GameObjects.Components.Atmos
} }
} }
public void Unequipped(UnequippedEventArgs eventArgs) void IUnequipped.Unequipped(UnequippedEventArgs eventArgs)
{ {
DisconnectInternals(); DisconnectInternals();
} }
public void DisconnectInternals() public void DisconnectInternals()

View File

@@ -214,7 +214,7 @@ namespace Content.Server.GameObjects.Components.Atmos
}); });
} }
public ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) ReagentUnit IReagentReaction.ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume)
{ {
switch (reagent.ID) switch (reagent.ID)
{ {

View File

@@ -24,6 +24,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.GameObjects.ComponentDependencies;
using Robust.Shared.GameObjects.Systems; using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Utility; using Robust.Shared.Utility;
@@ -166,14 +167,14 @@ namespace Content.Server.GameObjects.Components.Atmos
return air; return air;
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false; if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false;
OpenInterface(actor.playerSession); OpenInterface(actor.playerSession);
return true; return true;
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return; if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return;
OpenInterface(actor.playerSession); OpenInterface(actor.playerSession);
@@ -323,7 +324,7 @@ namespace Content.Server.GameObjects.Components.Atmos
_integrity++; _integrity++;
} }
public void Dropped(DroppedEventArgs eventArgs) void IDropped.Dropped(DroppedEventArgs eventArgs)
{ {
DisconnectFromInternals(eventArgs.User); DisconnectFromInternals(eventArgs.User);
} }
@@ -363,7 +364,7 @@ namespace Content.Server.GameObjects.Components.Atmos
[UsedImplicitly] [UsedImplicitly]
public class ToggleInternalsAction : IToggleItemAction public class ToggleInternalsAction : IToggleItemAction
{ {
public void ExposeData(ObjectSerializer serializer) {} void IExposeData.ExposeData(ObjectSerializer serializer) {}
public bool DoToggleAction(ToggleItemActionEventArgs args) public bool DoToggleAction(ToggleItemActionEventArgs args)
{ {

View File

@@ -99,7 +99,7 @@ namespace Content.Server.GameObjects.Components.Body.Part
} }
} }
public async Task AfterInteract(AfterInteractEventArgs eventArgs) async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
// TODO BODY // TODO BODY
if (eventArgs.Target == null) if (eventArgs.Target == null)

View File

@@ -12,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Botany
{ {
public override string Name => "Log"; public override string Name => "Log";
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!ActionBlockerSystem.CanInteract(eventArgs.User)) if (!ActionBlockerSystem.CanInteract(eventArgs.User))
return false; return false;

View File

@@ -639,7 +639,7 @@ namespace Content.Server.GameObjects.Components.Botany
Seed = Seed.Diverge(modified); Seed = Seed.Diverge(modified);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
var user = eventArgs.User; var user = eventArgs.User;
var usingItem = eventArgs.Using; var usingItem = eventArgs.Using;
@@ -767,7 +767,7 @@ namespace Content.Server.GameObjects.Components.Botany
return false; return false;
} }
public ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) ReagentUnit IReagentReaction.ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume)
{ {
if(_solutionContainer == null) if(_solutionContainer == null)
return ReagentUnit.Zero; return ReagentUnit.Zero;
@@ -776,7 +776,7 @@ namespace Content.Server.GameObjects.Components.Botany
return accepted; return accepted;
} }
public ReagentUnit ReagentReactInjection(ReagentPrototype reagent, ReagentUnit volume) ReagentUnit IReagentReaction.ReagentReactInjection(ReagentPrototype reagent, ReagentUnit volume)
{ {
if(_solutionContainer == null) if(_solutionContainer == null)
return ReagentUnit.Zero; return ReagentUnit.Zero;
@@ -785,13 +785,13 @@ namespace Content.Server.GameObjects.Components.Botany
return accepted; return accepted;
} }
public bool InteractHand(InteractHandEventArgs eventArgs) bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
{ {
// DoHarvest does the sanity checks. // DoHarvest does the sanity checks.
return DoHarvest(eventArgs.User); return DoHarvest(eventArgs.User);
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
// DoHarvest does the sanity checks. // DoHarvest does the sanity checks.
DoHarvest(eventArgs.User); DoHarvest(eventArgs.User);

View File

@@ -29,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Botany
private int _minSeeds = 1; private int _minSeeds = 1;
private int _maxSeeds = 4; private int _maxSeeds = 4;
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!_powerReceiver?.Powered ?? false) if (!_powerReceiver?.Powered ?? false)
return false; return false;

View File

@@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
} }
// Feeding someone else // Feeding someone else
public async Task AfterInteract(AfterInteractEventArgs eventArgs) async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
if (eventArgs.Target == null) if (eventArgs.Target == null)
{ {

View File

@@ -154,7 +154,7 @@ namespace Content.Server.GameObjects.Components.Construction
TargetNextEdge = Node.GetEdge(TargetPathfinding.Peek().Name); TargetNextEdge = Node.GetEdge(TargetPathfinding.Peek().Name);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (_handling) if (_handling)
return true; return true;

View File

@@ -210,7 +210,7 @@ namespace Content.Server.GameObjects.Components.Construction
} }
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!HasBoard && eventArgs.Using.TryGetComponent<MachineBoardComponent>(out var machineBoard)) if (!HasBoard && eventArgs.Using.TryGetComponent<MachineBoardComponent>(out var machineBoard))
{ {

View File

@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Construction
serializer.DataField(ref _refineTime, "refineTime", 2f); serializer.DataField(ref _refineTime, "refineTime", 2f);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
// check if object is welder // check if object is welder
if (!eventArgs.Using.TryGetComponent(out ToolComponent? tool)) if (!eventArgs.Using.TryGetComponent(out ToolComponent? tool))

View File

@@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Damage
serializer.DataField(ref _ignoreResistances, "ignoreResistances", false); serializer.DataField(ref _ignoreResistances, "ignoreResistances", false);
} }
public void Land(LandEventArgs eventArgs) void ILand.Land(LandEventArgs eventArgs)
{ {
if (!Owner.TryGetComponent(out IDamageableComponent damageable)) return; if (!Owner.TryGetComponent(out IDamageableComponent damageable)) return;

View File

@@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Damage
serializer.DataField(ref _tools, "tools", new List<ToolQuality>()); serializer.DataField(ref _tools, "tools", new List<ToolQuality>());
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (eventArgs.Using.TryGetComponent<ToolComponent>(out var tool)) if (eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
{ {

View File

@@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Damage
serializer.DataField(ref _ignoreResistances, "ignoreResistances", false); serializer.DataField(ref _ignoreResistances, "ignoreResistances", false);
} }
public void DoHit(ThrowCollideEventArgs eventArgs) void IThrowCollide.DoHit(ThrowCollideEventArgs eventArgs)
{ {
if (!eventArgs.Target.TryGetComponent(out IDamageableComponent damageable)) return; if (!eventArgs.Target.TryGetComponent(out IDamageableComponent damageable)) return;

View File

@@ -1,6 +1,7 @@
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.EntitySystems; using Content.Shared.GameObjects.EntitySystems;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
@@ -19,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
set => _acts = (int) value; set => _acts = (int) value;
} }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref _acts, "acts", 0, WithFormat.Flags<ActsFlags>()); serializer.DataField(ref _acts, "acts", 0, WithFormat.Flags<ActsFlags>());
} }

View File

@@ -2,6 +2,7 @@ using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Body;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
@@ -11,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
{ {
private bool _recursive = true; private bool _recursive = true;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref _recursive, "recursive", true); serializer.DataField(ref _recursive, "recursive", true);
} }

View File

@@ -1,6 +1,7 @@
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using Content.Shared.Audio; using Content.Shared.Audio;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
@@ -12,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
/// </summary> /// </summary>
public string Sound { get; set; } public string Sound { get; set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Sound, "sound", string.Empty); serializer.DataField(this, x => x.Sound, "sound", string.Empty);
} }

View File

@@ -1,6 +1,7 @@
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using Content.Shared.Audio; using Content.Shared.Audio;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
@@ -12,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
/// </summary> /// </summary>
private string SoundCollection { get; set; } private string SoundCollection { get; set; }
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty); serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty);
} }

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Stack;
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using Content.Shared.Utility; using Content.Shared.Utility;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
@@ -15,7 +16,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
/// </summary> /// </summary>
public Dictionary<string, MinMax> Spawn { get; set; } = new(); public Dictionary<string, MinMax> Spawn { get; set; } = new();
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Spawn, "spawn", new Dictionary<string, MinMax>()); serializer.DataField(this, x => x.Spawn, "spawn", new Dictionary<string, MinMax>());
} }

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Fluids;
using Content.Server.GameObjects.EntitySystems; using Content.Server.GameObjects.EntitySystems;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
@@ -11,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
[UsedImplicitly] [UsedImplicitly]
public class SpillBehavior : IThresholdBehavior public class SpillBehavior : IThresholdBehavior
{ {
public void ExposeData(ObjectSerializer serializer) { } void IExposeData.ExposeData(ObjectSerializer serializer) { }
public void Trigger(IEntity owner, DestructibleSystem system) public void Trigger(IEntity owner, DestructibleSystem system)
{ {

View File

@@ -12,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds
[ViewVariables] [ViewVariables]
public int Max; public int Max;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref Min, "min", 0); serializer.DataField(ref Min, "min", 0);
serializer.DataField(ref Max, "max", 0); serializer.DataField(ref Max, "max", 0);

View File

@@ -31,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds
/// </summary> /// </summary>
[ViewVariables] public IReadOnlyList<IThresholdBehavior> Behaviors => _behaviors; [ViewVariables] public IReadOnlyList<IThresholdBehavior> Behaviors => _behaviors;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Triggered, "triggered", false); serializer.DataField(this, x => x.Triggered, "triggered", false);
serializer.DataField(this, x => x.TriggersOnce, "triggersOnce", false); serializer.DataField(this, x => x.TriggersOnce, "triggersOnce", false);

View File

@@ -85,7 +85,7 @@ namespace Content.Server.GameObjects.Components.Fluids
return true; return true;
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!Owner.TryGetComponent(out SolutionContainerComponent? contents)) if (!Owner.TryGetComponent(out SolutionContainerComponent? contents))
{ {

View File

@@ -185,13 +185,13 @@ namespace Content.Server.GameObjects.Components.Fluids
} }
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
ToggleSafety(eventArgs.User); ToggleSafety(eventArgs.User);
return true; return true;
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
ToggleSafety(eventArgs.User); ToggleSafety(eventArgs.User);
} }
@@ -212,7 +212,7 @@ namespace Content.Server.GameObjects.Components.Fluids
appearance.SetData(SprayVisuals.Safety, _safety); appearance.SetData(SprayVisuals.Safety, _safety);
} }
public void Dropped(DroppedEventArgs eventArgs) void IDropped.Dropped(DroppedEventArgs eventArgs)
{ {
if(_hasSafety && Owner.TryGetComponent(out AppearanceComponent appearance)) if(_hasSafety && Owner.TryGetComponent(out AppearanceComponent appearance))
appearance.SetData(SprayVisuals.Safety, _safety); appearance.SetData(SprayVisuals.Safety, _safety);

View File

@@ -100,7 +100,7 @@ namespace Content.Server.GameObjects.Components.Gravity
return true; return true;
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!eventArgs.Using.TryGetComponent(out WelderComponent? tool)) if (!eventArgs.Using.TryGetComponent(out WelderComponent? tool))
return false; return false;

View File

@@ -290,7 +290,7 @@ namespace Content.Server.GameObjects.Components.Instruments
_laggedBatches = 0; _laggedBatches = 0;
} }
public void Dropped(DroppedEventArgs eventArgs) void IDropped.Dropped(DroppedEventArgs eventArgs)
{ {
Clean(); Clean();
SendNetworkMessage(new InstrumentStopMidiMessage()); SendNetworkMessage(new InstrumentStopMidiMessage());
@@ -298,7 +298,7 @@ namespace Content.Server.GameObjects.Components.Instruments
UserInterface?.CloseAll(); UserInterface?.CloseAll();
} }
public void Thrown(ThrownEventArgs eventArgs) void IThrown.Thrown(ThrownEventArgs eventArgs)
{ {
Clean(); Clean();
SendNetworkMessage(new InstrumentStopMidiMessage()); SendNetworkMessage(new InstrumentStopMidiMessage());
@@ -306,7 +306,7 @@ namespace Content.Server.GameObjects.Components.Instruments
UserInterface?.CloseAll(); UserInterface?.CloseAll();
} }
public void HandSelected(HandSelectedEventArgs eventArgs) void IHandSelected.HandSelected(HandSelectedEventArgs eventArgs)
{ {
if (eventArgs.User == null || !eventArgs.User.TryGetComponent(out BasicActorComponent? actor)) if (eventArgs.User == null || !eventArgs.User.TryGetComponent(out BasicActorComponent? actor))
return; return;
@@ -318,14 +318,14 @@ namespace Content.Server.GameObjects.Components.Instruments
InstrumentPlayer = session; InstrumentPlayer = session;
} }
public void HandDeselected(HandDeselectedEventArgs eventArgs) void IHandDeselected.HandDeselected(HandDeselectedEventArgs eventArgs)
{ {
Clean(); Clean();
SendNetworkMessage(new InstrumentStopMidiMessage()); SendNetworkMessage(new InstrumentStopMidiMessage());
UserInterface?.CloseAll(); UserInterface?.CloseAll();
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
if (Handheld || !eventArgs.User.TryGetComponent(out IActorComponent? actor)) return; if (Handheld || !eventArgs.User.TryGetComponent(out IActorComponent? actor)) return;
@@ -335,7 +335,7 @@ namespace Content.Server.GameObjects.Components.Instruments
OpenUserInterface(actor.playerSession); OpenUserInterface(actor.playerSession);
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false; if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false;

View File

@@ -24,6 +24,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.GameObjects.ComponentDependencies;
using Robust.Shared.GameObjects.Systems; using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
@@ -282,7 +283,7 @@ namespace Content.Server.GameObjects.Components.Interactable
[UsedImplicitly] [UsedImplicitly]
public class ToggleLightAction : IToggleItemAction public class ToggleLightAction : IToggleItemAction
{ {
public void ExposeData(ObjectSerializer serializer) {} void IExposeData.ExposeData(ObjectSerializer serializer) {}
public bool DoToggleAction(ToggleItemActionEventArgs args) public bool DoToggleAction(ToggleItemActionEventArgs args)
{ {

View File

@@ -12,9 +12,9 @@ namespace Content.Server.GameObjects.Components.Interactable
{ {
public override string Name => "Matchbox"; public override string Name => "Matchbox";
public int Priority => 1; int IInteractUsing.Priority => 1;
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (eventArgs.Using.TryGetComponent<MatchstickComponent>(out var matchstick) if (eventArgs.Using.TryGetComponent<MatchstickComponent>(out var matchstick)
&& matchstick.CurrentState == SharedBurningStates.Unlit) && matchstick.CurrentState == SharedBurningStates.Unlit)

View File

@@ -89,7 +89,7 @@ namespace Content.Server.GameObjects.Components.Interactable
Owner.SpawnTimer(_duration * 1000, () => CurrentState = SharedBurningStates.Burnt); Owner.SpawnTimer(_duration * 1000, () => CurrentState = SharedBurningStates.Burnt);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (eventArgs.Target.TryGetComponent<IHotItem>(out var hotItem) if (eventArgs.Target.TryGetComponent<IHotItem>(out var hotItem)
&& hotItem.IsCurrentlyHot() && hotItem.IsCurrentlyHot()

View File

@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Interactable
public string SoundCollection => _soundCollection; public string SoundCollection => _soundCollection;
public string ChangeSound => _changeSound; public string ChangeSound => _changeSound;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(this, x => x.Behavior, "behavior", ToolQuality.None); serializer.DataField(this, x => x.Behavior, "behavior", ToolQuality.None);
serializer.DataField(ref _state, "state", string.Empty); serializer.DataField(ref _state, "state", string.Empty);
@@ -104,7 +104,7 @@ namespace Content.Server.GameObjects.Components.Interactable
serializer.DataField(ref _tools, "tools", new List<ToolEntry>()); serializer.DataField(ref _tools, "tools", new List<ToolEntry>());
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
Cycle(); Cycle();
return true; return true;

View File

@@ -21,7 +21,7 @@ namespace Content.Server.GameObjects.Components.Interactable
public override string Name => "TilePrying"; public override string Name => "TilePrying";
private bool _toolComponentNeeded = true; private bool _toolComponentNeeded = true;
public async Task AfterInteract(AfterInteractEventArgs eventArgs) async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
TryPryTile(eventArgs.User, eventArgs.ClickLocation); TryPryTile(eventArgs.User, eventArgs.ClickLocation);
} }

View File

@@ -213,7 +213,7 @@ namespace Content.Server.GameObjects.Components.Interactable
return true; return true;
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
return ToggleWelderStatus(eventArgs.User); return ToggleWelderStatus(eventArgs.User);
} }
@@ -257,7 +257,7 @@ namespace Content.Server.GameObjects.Components.Interactable
} }
public SuicideKind Suicide(IEntity victim, IChatManager chat) SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
{ {
string othersMessage; string othersMessage;
string selfMessage; string selfMessage;

View File

@@ -72,7 +72,7 @@ namespace Content.Server.GameObjects.Components.Items.Clothing
return new ClothingComponentState(ClothingEquippedPrefix, EquippedPrefix); return new ClothingComponentState(ClothingEquippedPrefix, EquippedPrefix);
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
if (!_quickEquipEnabled) return false; if (!_quickEquipEnabled) return false;
if (!eventArgs.User.TryGetComponent(out InventoryComponent inv) if (!eventArgs.User.TryGetComponent(out InventoryComponent inv)

View File

@@ -12,22 +12,23 @@ namespace Content.Server.GameObjects.Components.Items
public class DebugEquipComponent : Component, IEquipped, IEquippedHand, IUnequipped, IUnequippedHand public class DebugEquipComponent : Component, IEquipped, IEquippedHand, IUnequipped, IUnequippedHand
{ {
public override string Name => "DebugEquip"; public override string Name => "DebugEquip";
public void Equipped(EquippedEventArgs eventArgs)
void IEquipped.Equipped(EquippedEventArgs eventArgs)
{ {
eventArgs.User.PopupMessage("equipped " + Owner.Name); eventArgs.User.PopupMessage("equipped " + Owner.Name);
} }
public void EquippedHand(EquippedHandEventArgs eventArgs) void IEquippedHand.EquippedHand(EquippedHandEventArgs eventArgs)
{ {
eventArgs.User.PopupMessage("equipped hand " + Owner.Name); eventArgs.User.PopupMessage("equipped hand " + Owner.Name);
} }
public void Unequipped(UnequippedEventArgs eventArgs) void IUnequipped.Unequipped(UnequippedEventArgs eventArgs)
{ {
eventArgs.User.PopupMessage("unequipped " + Owner.Name); eventArgs.User.PopupMessage("unequipped " + Owner.Name);
} }
public void UnequippedHand(UnequippedHandEventArgs eventArgs) void IUnequippedHand.UnequippedHand(UnequippedHandEventArgs eventArgs)
{ {
eventArgs.User.PopupMessage("unequipped hand" + Owner.Name); eventArgs.User.PopupMessage("unequipped hand" + Owner.Name);
} }

View File

@@ -64,18 +64,18 @@ namespace Content.Server.GameObjects.Components.Items
} }
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
Roll(); Roll();
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
Roll(); Roll();
return false; return false;
} }
public void Land(LandEventArgs eventArgs) void ILand.Land(LandEventArgs eventArgs)
{ {
Roll(); Roll();
} }

View File

@@ -56,7 +56,7 @@ namespace Content.Server.GameObjects.Components.Items
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Items/genhit.ogg", location, AudioHelpers.WithVariation(0.125f)); EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Items/genhit.ogg", location, AudioHelpers.WithVariation(0.125f));
} }
public async Task AfterInteract(AfterInteractEventArgs eventArgs) async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
if (!eventArgs.InRangeUnobstructed(ignoreInsideBlocker: true, popup: true)) return; if (!eventArgs.InRangeUnobstructed(ignoreInsideBlocker: true, popup: true)) return;
if (!Owner.TryGetComponent(out StackComponent stack)) return; if (!Owner.TryGetComponent(out StackComponent stack)) return;

View File

@@ -32,7 +32,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
message.AddMarkup(Loc.GetString("It holds {0} charges.", refillAmmo)); message.AddMarkup(Loc.GetString("It holds {0} charges.", refillAmmo));
} }
public async Task AfterInteract(AfterInteractEventArgs eventArgs) async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
if (eventArgs.Target == null || !eventArgs.Target.TryGetComponent(out RCDComponent rcdComponent) || !eventArgs.User.TryGetComponent(out IHandsComponent hands)) if (eventArgs.Target == null || !eventArgs.Target.TryGetComponent(out RCDComponent rcdComponent) || !eventArgs.User.TryGetComponent(out IHandsComponent hands))
{ {

View File

@@ -68,8 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
///<summary> ///<summary>
/// Method called when the RCD is clicked in-hand, this will cycle the RCD mode. /// Method called when the RCD is clicked in-hand, this will cycle the RCD mode.
///</summary> ///</summary>
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
public bool UseEntity(UseEntityEventArgs eventArgs)
{ {
SwapMode(eventArgs); SwapMode(eventArgs);
return true; return true;
@@ -94,7 +93,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
message.AddMarkup(Loc.GetString("It's currently on {0} mode, and holds {1} charges.",_mode.ToString(), _ammo)); message.AddMarkup(Loc.GetString("It's currently on {0} mode, and holds {1} charges.",_mode.ToString(), _ammo));
} }
public async Task AfterInteract(AfterInteractEventArgs eventArgs) async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{ {
//No changing mode mid-RCD //No changing mode mid-RCD
var startingMode = _mode; var startingMode = _mode;

View File

@@ -97,7 +97,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
return user.InRangeUnobstructed(Owner, ignoreInsideBlocker: true, popup: true); return user.InRangeUnobstructed(Owner, ignoreInsideBlocker: true, popup: true);
} }
public bool InteractHand(InteractHandEventArgs eventArgs) bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
{ {
if (!CanPickup(eventArgs.User)) return false; if (!CanPickup(eventArgs.User)) return false;

View File

@@ -68,7 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
public string GroupId; public string GroupId;
public int Amount; public int Amount;
public void ExposeData(ObjectSerializer serializer) void IExposeData.ExposeData(ObjectSerializer serializer)
{ {
serializer.DataField(ref PrototypeName, "name", null); serializer.DataField(ref PrototypeName, "name", null);
serializer.DataField(ref Amount, "amount", 1); serializer.DataField(ref Amount, "amount", 1);

View File

@@ -45,17 +45,18 @@ namespace Content.Server.GameObjects.Components.Items
} }
} }
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
Squeak(); Squeak();
} }
public bool UseEntity(UseEntityEventArgs eventArgs) bool IUse.UseEntity(UseEntityEventArgs eventArgs)
{ {
Squeak(); Squeak();
return false; return false;
} }
public void Land(LandEventArgs eventArgs)
void ILand.Land(LandEventArgs eventArgs)
{ {
Squeak(); Squeak();
} }

View File

@@ -92,7 +92,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
victim.Delete(); victim.Delete();
} }
public SuicideKind Suicide(IEntity victim, IChatManager chat) SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
{ {
var othersMessage = Loc.GetString("{0:theName} has thrown themselves on a meat spike!", victim); var othersMessage = Loc.GetString("{0:theName} has thrown themselves on a meat spike!", victim);
victim.PopupMessageOtherClients(othersMessage); victim.PopupMessageOtherClients(othersMessage);

View File

@@ -197,7 +197,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
UserInterface?.Toggle(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!Powered) if (!Powered)
{ {
@@ -473,7 +473,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
_audioSystem.PlayFromEntity("/Audio/Machines/machine_switch.ogg",Owner,AudioParams.Default.WithVolume(-2f)); _audioSystem.PlayFromEntity("/Audio/Machines/machine_switch.ogg",Owner,AudioParams.Default.WithVolume(-2f));
} }
public SuicideKind Suicide(IEntity victim, IChatManager chat) SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
{ {
var headCount = 0; var headCount = 0;

View File

@@ -269,7 +269,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
UserInterface?.Toggle(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!eventArgs.User.TryGetComponent(out IHandsComponent? hands)) if (!eventArgs.User.TryGetComponent(out IHandsComponent? hands))
{ {

View File

@@ -12,12 +12,12 @@ namespace Content.Server.GameObjects.Components.MachineLinking
{ {
public override string Name => "SignalButton"; public override string Name => "SignalButton";
public void Activate(ActivateEventArgs eventArgs) void IActivate.Activate(ActivateEventArgs eventArgs)
{ {
TransmitSignal(eventArgs.User); TransmitSignal(eventArgs.User);
} }
public bool InteractHand(InteractHandEventArgs eventArgs) bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
{ {
TransmitSignal(eventArgs.User); TransmitSignal(eventArgs.User);
return true; return true;

View File

@@ -114,7 +114,7 @@ namespace Content.Server.GameObjects.Components.MachineLinking
return true; return true;
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{ {
if (!eventArgs.Using.TryGetComponent<ToolComponent>(out var tool)) if (!eventArgs.Using.TryGetComponent<ToolComponent>(out var tool))
return false; return false;

Some files were not shown because too many files have changed in this diff Show More