diff --git a/Content.Client/GameObjects/Components/Body/BodyComponent.cs b/Content.Client/GameObjects/Components/Body/BodyComponent.cs index aa23f069f9..737a6cb78b 100644 --- a/Content.Client/GameObjects/Components/Body/BodyComponent.cs +++ b/Content.Client/GameObjects/Components/Body/BodyComponent.cs @@ -14,7 +14,7 @@ namespace Content.Client.GameObjects.Components.Body return true; } - public bool CanDrop(CanDropEventArgs args) + bool IDraggable.CanDrop(CanDropEventArgs args) { return true; } diff --git a/Content.Client/GameObjects/Components/ClickableComponent.cs b/Content.Client/GameObjects/Components/ClickableComponent.cs index 5bebcc3940..8a3c3b6adf 100644 --- a/Content.Client/GameObjects/Components/ClickableComponent.cs +++ b/Content.Client/GameObjects/Components/ClickableComponent.cs @@ -134,7 +134,7 @@ namespace Content.Client.GameObjects.Components 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 North, "north", default); diff --git a/Content.Client/GameObjects/Components/Items/ItemComponent.cs b/Content.Client/GameObjects/Components/Items/ItemComponent.cs index 07a5c33c9a..a759f4b589 100644 --- a/Content.Client/GameObjects/Components/Items/ItemComponent.cs +++ b/Content.Client/GameObjects/Components/Items/ItemComponent.cs @@ -91,7 +91,7 @@ namespace Content.Client.GameObjects.Components.Items return args.Target.HasComponent(); } - public bool Drop(DragDropEventArgs args) + bool IDraggable.Drop(DragDropEventArgs args) { // TODO: Shared item class return false; diff --git a/Content.IntegrationTests/Tests/Networking/SimplePredictReconcileTest.cs b/Content.IntegrationTests/Tests/Networking/SimplePredictReconcileTest.cs index 7393a3187f..a7e5a59fdc 100644 --- a/Content.IntegrationTests/Tests/Networking/SimplePredictReconcileTest.cs +++ b/Content.IntegrationTests/Tests/Networking/SimplePredictReconcileTest.cs @@ -16,6 +16,8 @@ using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Reflection; using Robust.Shared.Timing; +using System; +using Robust.Shared.Serialization; namespace Content.IntegrationTests.Tests.Networking { @@ -415,6 +417,7 @@ namespace Content.IntegrationTests.Tests.Networking return new PredictionComponentState(Foo); } + [Serializable, NetSerializable] private sealed class PredictionComponentState : ComponentState { public bool Foo { get; } diff --git a/Content.Server/Actions/DebugInstant.cs b/Content.Server/Actions/DebugInstant.cs index 04a99ede01..b136bd506e 100644 --- a/Content.Server/Actions/DebugInstant.cs +++ b/Content.Server/Actions/DebugInstant.cs @@ -2,6 +2,7 @@ using Content.Shared.Actions; using Content.Shared.Utility; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Actions @@ -15,7 +16,7 @@ namespace Content.Server.Actions public string Message { 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.Cooldown, "cooldown", 0); diff --git a/Content.Server/Actions/DebugTargetEntity.cs b/Content.Server/Actions/DebugTargetEntity.cs index 89d4a6d751..d1dd45ef7b 100644 --- a/Content.Server/Actions/DebugTargetEntity.cs +++ b/Content.Server/Actions/DebugTargetEntity.cs @@ -1,6 +1,7 @@ using Content.Server.Utility; using Content.Shared.Actions; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Actions @@ -8,8 +9,7 @@ namespace Content.Server.Actions [UsedImplicitly] public class DebugTargetEntity : ITargetEntityAction, ITargetEntityItemAction { - - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Actions/DebugTargetPoint.cs b/Content.Server/Actions/DebugTargetPoint.cs index 00429a1a0c..d87ad502d1 100644 --- a/Content.Server/Actions/DebugTargetPoint.cs +++ b/Content.Server/Actions/DebugTargetPoint.cs @@ -2,6 +2,7 @@ using Content.Shared.Actions; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Serialization; @@ -10,7 +11,7 @@ namespace Content.Server.Actions [UsedImplicitly] public class DebugTargetPoint : ITargetPointAction, ITargetPointItemAction { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Actions/DebugToggle.cs b/Content.Server/Actions/DebugToggle.cs index 56ba9d8284..483eba1acd 100644 --- a/Content.Server/Actions/DebugToggle.cs +++ b/Content.Server/Actions/DebugToggle.cs @@ -1,6 +1,7 @@ using Content.Server.Utility; using Content.Shared.Actions; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Actions @@ -11,7 +12,7 @@ namespace Content.Server.Actions public string MessageOn { 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.MessageOff, "messageOff", "off!"); diff --git a/Content.Server/Actions/DisarmAction.cs b/Content.Server/Actions/DisarmAction.cs index e166f02577..baff6d9b7b 100644 --- a/Content.Server/Actions/DisarmAction.cs +++ b/Content.Server/Actions/DisarmAction.cs @@ -21,6 +21,7 @@ using Robust.Shared.Audio; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; @@ -36,7 +37,7 @@ namespace Content.Server.Actions private float _pushProb; private float _cooldown; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _failProb, "failProb", 0.4f); serializer.DataField(ref _pushProb, "pushProb", 0.4f); diff --git a/Content.Server/Actions/ScreamAction.cs b/Content.Server/Actions/ScreamAction.cs index 58a8acc480..b1d5cfd3bb 100644 --- a/Content.Server/Actions/ScreamAction.cs +++ b/Content.Server/Actions/ScreamAction.cs @@ -13,6 +13,7 @@ using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.Audio; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.Random; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Random; using Robust.Shared.Serialization; @@ -38,7 +39,7 @@ namespace Content.Server.Actions _random = IoCManager.Resolve(); } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _male, "male", null); serializer.DataField(ref _female, "female", null); diff --git a/Content.Server/Alert/Click/ResistFire.cs b/Content.Server/Alert/Click/ResistFire.cs index e7f7e42231..66e0c3b0c0 100644 --- a/Content.Server/Alert/Click/ResistFire.cs +++ b/Content.Server/Alert/Click/ResistFire.cs @@ -1,6 +1,7 @@ using Content.Server.GameObjects.Components.Atmos; using Content.Shared.Alert; using JetBrains.Annotations; + using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Alert.Click @@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click [UsedImplicitly] public class ResistFire : IAlertClick { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public void AlertClicked(ClickAlertEventArgs args) { diff --git a/Content.Server/Alert/Click/StopPiloting.cs b/Content.Server/Alert/Click/StopPiloting.cs index cc8164c071..d191b411f9 100644 --- a/Content.Server/Alert/Click/StopPiloting.cs +++ b/Content.Server/Alert/Click/StopPiloting.cs @@ -1,7 +1,8 @@ using Content.Server.GameObjects.Components.Movement; using Content.Shared.Alert; using JetBrains.Annotations; - using Robust.Shared.Serialization; +using Robust.Shared.Interfaces.Serialization; +using Robust.Shared.Serialization; namespace Content.Server.Alert.Click { @@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click [UsedImplicitly] public class StopPiloting : IAlertClick { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public void AlertClicked(ClickAlertEventArgs args) { diff --git a/Content.Server/Alert/Click/StopPulling.cs b/Content.Server/Alert/Click/StopPulling.cs index 2153769ae6..f378bb582d 100644 --- a/Content.Server/Alert/Click/StopPulling.cs +++ b/Content.Server/Alert/Click/StopPulling.cs @@ -3,7 +3,8 @@ using Content.Shared.GameObjects.EntitySystems; using JetBrains.Annotations; using Robust.Shared.GameObjects.Systems; - using Robust.Shared.Serialization; +using Robust.Shared.Interfaces.Serialization; +using Robust.Shared.Serialization; namespace Content.Server.Alert.Click { @@ -13,7 +14,7 @@ namespace Content.Server.Alert.Click [UsedImplicitly] public class StopPulling : IAlertClick { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public void AlertClicked(ClickAlertEventArgs args) { diff --git a/Content.Server/Alert/Click/Unbuckle.cs b/Content.Server/Alert/Click/Unbuckle.cs index 742f19ad29..e590d584bf 100644 --- a/Content.Server/Alert/Click/Unbuckle.cs +++ b/Content.Server/Alert/Click/Unbuckle.cs @@ -2,6 +2,7 @@ using Content.Shared.Alert; using Robust.Shared.Serialization; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; namespace Content.Server.Alert.Click { @@ -11,7 +12,7 @@ namespace Content.Server.Alert.Click [UsedImplicitly] public class Unbuckle : IAlertClick { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public void AlertClicked(ClickAlertEventArgs args) { diff --git a/Content.Server/Atmos/GasMixture.cs b/Content.Server/Atmos/GasMixture.cs index 108326bcf6..a1644dfa21 100644 --- a/Content.Server/Atmos/GasMixture.cs +++ b/Content.Server/Atmos/GasMixture.cs @@ -534,7 +534,7 @@ namespace Content.Server.Atmos 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.Volume, "volume", 0f); diff --git a/Content.Server/Atmos/Reactions/PhoronFireReaction.cs b/Content.Server/Atmos/Reactions/PhoronFireReaction.cs index cec03ca069..d08f840293 100644 --- a/Content.Server/Atmos/Reactions/PhoronFireReaction.cs +++ b/Content.Server/Atmos/Reactions/PhoronFireReaction.cs @@ -6,6 +6,7 @@ using Content.Shared.Atmos; using JetBrains.Annotations; using Robust.Server.GameObjects.EntitySystems.TileLookup; using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Atmos.Reactions @@ -89,7 +90,7 @@ namespace Content.Server.Atmos.Reactions return mixture.ReactionResults[GasReaction.Fire] != 0 ? ReactionResult.Reacting : ReactionResult.NoReaction; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } } diff --git a/Content.Server/Atmos/Reactions/TritiumFireReaction.cs b/Content.Server/Atmos/Reactions/TritiumFireReaction.cs index b45222fa32..ffe677c71a 100644 --- a/Content.Server/Atmos/Reactions/TritiumFireReaction.cs +++ b/Content.Server/Atmos/Reactions/TritiumFireReaction.cs @@ -5,6 +5,7 @@ using Content.Shared.Atmos; using JetBrains.Annotations; using Robust.Server.GameObjects.EntitySystems.TileLookup; using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Atmos.Reactions @@ -12,7 +13,7 @@ namespace Content.Server.Atmos.Reactions [UsedImplicitly] public class TritiumFireReaction : IGasReactionEffect { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Botany/Seed.cs b/Content.Server/Botany/Seed.cs index 03069a5fc0..ad95296f8e 100644 --- a/Content.Server/Botany/Seed.cs +++ b/Content.Server/Botany/Seed.cs @@ -146,7 +146,12 @@ namespace Content.Server.Botany #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.Name, "name", string.Empty); @@ -190,7 +195,7 @@ namespace Content.Server.Botany public void LoadFrom(YamlMappingNode mapping) { var serializer = YamlObjectSerializer.NewReader(mapping); - ExposeData(serializer); + InternalExposeData(serializer); } public Seed Clone() diff --git a/Content.Server/Chemistry/PlantMetabolism/AdjustAttribute.cs b/Content.Server/Chemistry/PlantMetabolism/AdjustAttribute.cs index 8b1119df2b..e5151631c3 100644 --- a/Content.Server/Chemistry/PlantMetabolism/AdjustAttribute.cs +++ b/Content.Server/Chemistry/PlantMetabolism/AdjustAttribute.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Botany; using Content.Shared.Interfaces.Chemistry; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Random; using Robust.Shared.Serialization; @@ -17,7 +18,7 @@ namespace Content.Server.Chemistry.PlantMetabolism public float Amount { 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.Prob, "prob", 1f); diff --git a/Content.Server/Chemistry/PlantMetabolism/Clonexadone.cs b/Content.Server/Chemistry/PlantMetabolism/Clonexadone.cs index 68ab5a2513..f3d7d55c29 100644 --- a/Content.Server/Chemistry/PlantMetabolism/Clonexadone.cs +++ b/Content.Server/Chemistry/PlantMetabolism/Clonexadone.cs @@ -5,6 +5,7 @@ using Content.Shared.Interfaces.Chemistry; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Serialization; @@ -13,7 +14,7 @@ namespace Content.Server.Chemistry.PlantMetabolism [UsedImplicitly] public class Clonexadone : IPlantMetabolizable { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Chemistry/PlantMetabolism/Diethylamine.cs b/Content.Server/Chemistry/PlantMetabolism/Diethylamine.cs index 32a31961de..387b471b4a 100644 --- a/Content.Server/Chemistry/PlantMetabolism/Diethylamine.cs +++ b/Content.Server/Chemistry/PlantMetabolism/Diethylamine.cs @@ -4,6 +4,7 @@ using Content.Shared.Interfaces.Chemistry; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Maths; using Robust.Shared.Random; @@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.PlantMetabolism [UsedImplicitly] public class Diethylamine : IPlantMetabolizable { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Chemistry/PlantMetabolism/RobustHarvest.cs b/Content.Server/Chemistry/PlantMetabolism/RobustHarvest.cs index 98bbf61b27..095d05b456 100644 --- a/Content.Server/Chemistry/PlantMetabolism/RobustHarvest.cs +++ b/Content.Server/Chemistry/PlantMetabolism/RobustHarvest.cs @@ -4,6 +4,7 @@ using Content.Shared.Interfaces.Chemistry; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Maths; using Robust.Shared.Random; @@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.PlantMetabolism [UsedImplicitly] public class RobustHarvest : IPlantMetabolizable { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Chemistry/ReactionEffects/ExplosionReactionEffect.cs b/Content.Server/Chemistry/ReactionEffects/ExplosionReactionEffect.cs index d9cb1b4b3c..2523411a33 100644 --- a/Content.Server/Chemistry/ReactionEffects/ExplosionReactionEffect.cs +++ b/Content.Server/Chemistry/ReactionEffects/ExplosionReactionEffect.cs @@ -3,6 +3,7 @@ using Content.Server.Explosions; using Content.Server.GameObjects.Components.Chemistry; using Content.Server.Interfaces.Chemistry; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Chemistry.ReactionEffects @@ -24,7 +25,7 @@ namespace Content.Server.Chemistry.ReactionEffects /// private float _maxScale; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _devastationRange, "devastationRange", 1); serializer.DataField(ref _heavyImpactRange, "heavyImpactRange", 2); diff --git a/Content.Server/Chemistry/TileReactions/ExtinguishTileReaction.cs b/Content.Server/Chemistry/TileReactions/ExtinguishTileReaction.cs index 01c13b5deb..e87925cb36 100644 --- a/Content.Server/Chemistry/TileReactions/ExtinguishTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/ExtinguishTileReaction.cs @@ -4,6 +4,7 @@ using Content.Shared.Atmos; using Content.Shared.Chemistry; using Content.Shared.Interfaces.Chemistry; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Map; using Robust.Shared.Serialization; @@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.TileReactions { private float _coolingTemperature = 2f; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _coolingTemperature, "coolingTemperature", 2f); } diff --git a/Content.Server/Chemistry/TileReactions/FlammableTileReaction.cs b/Content.Server/Chemistry/TileReactions/FlammableTileReaction.cs index 2318247869..2c003a2f5a 100644 --- a/Content.Server/Chemistry/TileReactions/FlammableTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/FlammableTileReaction.cs @@ -4,6 +4,7 @@ using Content.Shared.Atmos; using Content.Shared.Chemistry; using Content.Shared.Interfaces.Chemistry; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Map; using Robust.Shared.Serialization; @@ -14,7 +15,7 @@ namespace Content.Server.Chemistry.TileReactions { private float _temperatureMultiplier = 1.25f; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _temperatureMultiplier, "temperatureMultiplier", 1.15f); } diff --git a/Content.Server/Chemistry/TileReactions/SpillIfPuddlePresentTileReaction.cs b/Content.Server/Chemistry/TileReactions/SpillIfPuddlePresentTileReaction.cs index 20debe8e85..207d7d5ace 100644 --- a/Content.Server/Chemistry/TileReactions/SpillIfPuddlePresentTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/SpillIfPuddlePresentTileReaction.cs @@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Movement; using Content.Shared.Chemistry; using Content.Shared.Interfaces.Chemistry; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Map; using Robust.Shared.Serialization; @@ -11,7 +12,7 @@ namespace Content.Server.Chemistry.TileReactions [UsedImplicitly] public class SpillIfPuddlePresentTileReaction : ITileReaction { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Chemistry/TileReactions/SpillTileReaction.cs b/Content.Server/Chemistry/TileReactions/SpillTileReaction.cs index 4b70de62f1..dec67c8e5c 100644 --- a/Content.Server/Chemistry/TileReactions/SpillTileReaction.cs +++ b/Content.Server/Chemistry/TileReactions/SpillTileReaction.cs @@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Movement; using Content.Shared.Chemistry; using Content.Shared.Interfaces.Chemistry; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Log; using Robust.Shared.Map; using Robust.Shared.Serialization; @@ -17,7 +18,7 @@ namespace Content.Server.Chemistry.TileReactions private float _paralyzeTime = 1f; 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. serializer.DataField(ref _paralyzeTime, "paralyzeTime", 1f); diff --git a/Content.Server/Construction/Completions/AddContainer.cs b/Content.Server/Construction/Completions/AddContainer.cs index 423b655c7f..32d4d112ca 100644 --- a/Content.Server/Construction/Completions/AddContainer.cs +++ b/Content.Server/Construction/Completions/AddContainer.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Construction; using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] public class AddContainer : IGraphAction { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Container, "container", null); } diff --git a/Content.Server/Construction/Completions/BuildComputer.cs b/Content.Server/Construction/Completions/BuildComputer.cs index b2eb368369..dbb7369fee 100644 --- a/Content.Server/Construction/Completions/BuildComputer.cs +++ b/Content.Server/Construction/Completions/BuildComputer.cs @@ -6,6 +6,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Server.GameObjects.Components.Container; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Log; using Robust.Shared.Serialization; @@ -16,7 +17,7 @@ namespace Content.Server.Construction.Completions { 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); } diff --git a/Content.Server/Construction/Completions/BuildMachine.cs b/Content.Server/Construction/Completions/BuildMachine.cs index 7550d89ce5..2d7e9d35f4 100644 --- a/Content.Server/Construction/Completions/BuildMachine.cs +++ b/Content.Server/Construction/Completions/BuildMachine.cs @@ -9,6 +9,7 @@ using Robust.Server.GameObjects.Components.Container; using Robust.Shared.Containers; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects.Components; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Log; using Robust.Shared.Serialization; @@ -108,7 +109,7 @@ namespace Content.Server.Construction.Completions entity.Delete(); } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } } diff --git a/Content.Server/Construction/Completions/DeleteEntity.cs b/Content.Server/Construction/Completions/DeleteEntity.cs index 02f5ac6c0e..61fcadc89b 100644 --- a/Content.Server/Construction/Completions/DeleteEntity.cs +++ b/Content.Server/Construction/Completions/DeleteEntity.cs @@ -3,6 +3,7 @@ using System.Threading.Tasks; using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -10,7 +11,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] public class DeleteEntity : IGraphAction { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Construction/Completions/EmptyAllContainers.cs b/Content.Server/Construction/Completions/EmptyAllContainers.cs index 535fd9f583..ec4495c5b4 100644 --- a/Content.Server/Construction/Completions/EmptyAllContainers.cs +++ b/Content.Server/Construction/Completions/EmptyAllContainers.cs @@ -5,6 +5,7 @@ using JetBrains.Annotations; using Robust.Server.GameObjects.Components.Container; using Robust.Shared.Containers; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -12,7 +13,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] public class EmptyAllContainers : IGraphAction { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } diff --git a/Content.Server/Construction/Completions/EmptyContainer.cs b/Content.Server/Construction/Completions/EmptyContainer.cs index 9197823240..88612b0fb2 100644 --- a/Content.Server/Construction/Completions/EmptyContainer.cs +++ b/Content.Server/Construction/Completions/EmptyContainer.cs @@ -6,6 +6,7 @@ using JetBrains.Annotations; using Robust.Server.GameObjects.Components.Container; using Robust.Shared.Containers; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -15,7 +16,7 @@ namespace Content.Server.Construction.Completions { 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); } diff --git a/Content.Server/Construction/Completions/MachineFrameRegenerateProgress.cs b/Content.Server/Construction/Completions/MachineFrameRegenerateProgress.cs index f63e134a80..18120c5567 100644 --- a/Content.Server/Construction/Completions/MachineFrameRegenerateProgress.cs +++ b/Content.Server/Construction/Completions/MachineFrameRegenerateProgress.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Construction; using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] public class MachineFrameRegenerateProgress : IGraphAction { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } public async Task PerformAction(IEntity entity, IEntity? user) diff --git a/Content.Server/Construction/Completions/PlaySound.cs b/Content.Server/Construction/Completions/PlaySound.cs index f55e5eae1c..69991ea04e 100644 --- a/Content.Server/Construction/Completions/PlaySound.cs +++ b/Content.Server/Construction/Completions/PlaySound.cs @@ -6,6 +6,7 @@ using JetBrains.Annotations; using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -16,7 +17,7 @@ namespace Content.Server.Construction.Completions public string SoundCollection { 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.SoundCollection, "soundCollection", string.Empty); diff --git a/Content.Server/Construction/Completions/PopupUser.cs b/Content.Server/Construction/Completions/PopupUser.cs index 433058ca20..bbdae1a688 100644 --- a/Content.Server/Construction/Completions/PopupUser.cs +++ b/Content.Server/Construction/Completions/PopupUser.cs @@ -4,6 +4,7 @@ using Content.Shared.Construction; using Content.Shared.Interfaces; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] 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.Cursor, "cursor", false); diff --git a/Content.Server/Construction/Completions/SetAnchor.cs b/Content.Server/Construction/Completions/SetAnchor.cs index 49b3aadb49..ba18f42b6a 100644 --- a/Content.Server/Construction/Completions/SetAnchor.cs +++ b/Content.Server/Construction/Completions/SetAnchor.cs @@ -4,6 +4,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -11,7 +12,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] public class SetAnchor : IGraphAction { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Value, "value", true); } diff --git a/Content.Server/Construction/Completions/SetStackCount.cs b/Content.Server/Construction/Completions/SetStackCount.cs index 3879e92a5e..7bcd5f78cf 100644 --- a/Content.Server/Construction/Completions/SetStackCount.cs +++ b/Content.Server/Construction/Completions/SetStackCount.cs @@ -5,6 +5,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; using System; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Log; using Robust.Shared.Serialization; @@ -15,7 +16,7 @@ namespace Content.Server.Construction.Completions { public int Amount { get; private set; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Amount, "amount", 1); } diff --git a/Content.Server/Construction/Completions/SnapToGrid.cs b/Content.Server/Construction/Completions/SnapToGrid.cs index d44e7a1392..473b463776 100644 --- a/Content.Server/Construction/Completions/SnapToGrid.cs +++ b/Content.Server/Construction/Completions/SnapToGrid.cs @@ -5,6 +5,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.GameObjects.Components.Transform; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Completions @@ -14,7 +15,7 @@ namespace Content.Server.Construction.Completions { 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); } diff --git a/Content.Server/Construction/Completions/SpawnPrototype.cs b/Content.Server/Construction/Completions/SpawnPrototype.cs index 30e891bed6..f98224f881 100644 --- a/Content.Server/Construction/Completions/SpawnPrototype.cs +++ b/Content.Server/Construction/Completions/SpawnPrototype.cs @@ -6,6 +6,7 @@ using Content.Shared.Construction; using Content.Shared.Utility; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Serialization; @@ -17,7 +18,7 @@ namespace Content.Server.Construction.Completions public string Prototype { get; private set; } = string.Empty; 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.Amount, "amount", 1); @@ -45,7 +46,7 @@ namespace Content.Server.Construction.Completions entityManager.SpawnEntity(Prototype, coordinates); } } - + } } } diff --git a/Content.Server/Construction/Completions/SpriteChange.cs b/Content.Server/Construction/Completions/SpriteChange.cs index 0f01863761..2517a62826 100644 --- a/Content.Server/Construction/Completions/SpriteChange.cs +++ b/Content.Server/Construction/Completions/SpriteChange.cs @@ -5,6 +5,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -13,7 +14,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] 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.Layer, "layer", 0); diff --git a/Content.Server/Construction/Completions/SpriteStateChange.cs b/Content.Server/Construction/Completions/SpriteStateChange.cs index 30be743f19..2e52d7834a 100644 --- a/Content.Server/Construction/Completions/SpriteStateChange.cs +++ b/Content.Server/Construction/Completions/SpriteStateChange.cs @@ -4,6 +4,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -12,8 +13,7 @@ namespace Content.Server.Construction.Completions [UsedImplicitly] public class SpriteStateChange : IGraphAction { - - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.State, "state", string.Empty); serializer.DataField(this, x => x.Layer, "layer", 0); diff --git a/Content.Server/Construction/Completions/VisualizerDataInt.cs b/Content.Server/Construction/Completions/VisualizerDataInt.cs index 6dd6138f33..dc523f0bbe 100644 --- a/Content.Server/Construction/Completions/VisualizerDataInt.cs +++ b/Content.Server/Construction/Completions/VisualizerDataInt.cs @@ -5,6 +5,7 @@ using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Reflection; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Serialization; @@ -20,7 +21,7 @@ namespace Content.Server.Construction.Completions 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.Data, "data", 0); diff --git a/Content.Server/Construction/Conditions/AllWiresCut.cs b/Content.Server/Construction/Conditions/AllWiresCut.cs index cbb8213901..256dadb531 100644 --- a/Content.Server/Construction/Conditions/AllWiresCut.cs +++ b/Content.Server/Construction/Conditions/AllWiresCut.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Power; using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Construction.Conditions @@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions [UsedImplicitly] public class AllWiresCut : IEdgeCondition { - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Value, "value", true); } diff --git a/Content.Server/Construction/Conditions/ComponentInTile.cs b/Content.Server/Construction/Conditions/ComponentInTile.cs index 0a456462a4..6350a8f0c4 100644 --- a/Content.Server/Construction/Conditions/ComponentInTile.cs +++ b/Content.Server/Construction/Conditions/ComponentInTile.cs @@ -4,6 +4,7 @@ using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Map; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Serialization; @@ -23,7 +24,7 @@ namespace Content.Server.Construction.Conditions 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.HasEntity, "hasEntity", true); diff --git a/Content.Server/Construction/Conditions/ContainerEmpty.cs b/Content.Server/Construction/Conditions/ContainerEmpty.cs index 903ac61254..601ebe5e6f 100644 --- a/Content.Server/Construction/Conditions/ContainerEmpty.cs +++ b/Content.Server/Construction/Conditions/ContainerEmpty.cs @@ -4,6 +4,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Server.GameObjects.Components.Container; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions public string Container { 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.Text, "text", string.Empty); diff --git a/Content.Server/Construction/Conditions/DoorWelded.cs b/Content.Server/Construction/Conditions/DoorWelded.cs index ef4cf17616..e6c16d09f1 100644 --- a/Content.Server/Construction/Conditions/DoorWelded.cs +++ b/Content.Server/Construction/Conditions/DoorWelded.cs @@ -5,6 +5,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Localization; using Robust.Shared.Log; using Robust.Shared.Serialization; @@ -16,7 +17,8 @@ namespace Content.Server.Construction.Conditions public class DoorWelded : IEdgeCondition { public bool Welded { get; private set; } - public void ExposeData(ObjectSerializer serializer) + + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Welded, "welded", true); } diff --git a/Content.Server/Construction/Conditions/EntityAnchored.cs b/Content.Server/Construction/Conditions/EntityAnchored.cs index 98aad12eec..948108a786 100644 --- a/Content.Server/Construction/Conditions/EntityAnchored.cs +++ b/Content.Server/Construction/Conditions/EntityAnchored.cs @@ -3,6 +3,7 @@ using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -13,7 +14,7 @@ namespace Content.Server.Construction.Conditions { public bool Anchored { get; private set; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Anchored, "anchored", true); } diff --git a/Content.Server/Construction/Conditions/MachineFrameComplete.cs b/Content.Server/Construction/Conditions/MachineFrameComplete.cs index dcb4b7cf43..9fa3786e4d 100644 --- a/Content.Server/Construction/Conditions/MachineFrameComplete.cs +++ b/Content.Server/Construction/Conditions/MachineFrameComplete.cs @@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Construction; using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Localization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -15,7 +16,7 @@ namespace Content.Server.Construction.Conditions [UsedImplicitly] public class MachineFrameComplete : IEdgeCondition { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public async Task Condition(IEntity entity) { diff --git a/Content.Server/Construction/Conditions/ToiletLidClosed.cs b/Content.Server/Construction/Conditions/ToiletLidClosed.cs index a1ad695bf6..d3778b4218 100644 --- a/Content.Server/Construction/Conditions/ToiletLidClosed.cs +++ b/Content.Server/Construction/Conditions/ToiletLidClosed.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Watercloset; using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Localization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -23,12 +24,12 @@ namespace Content.Server.Construction.Conditions { if (!entity.TryGetComponent(out ToiletComponent? toilet)) return false; if (!toilet.LidOpen) return false; - + message.AddMarkup(Loc.GetString("Use a [color=yellow]crowbar[/color] to close the lid.\n")); return true; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { } } diff --git a/Content.Server/Construction/Conditions/WirePanel.cs b/Content.Server/Construction/Conditions/WirePanel.cs index ff036d4262..169c001813 100644 --- a/Content.Server/Construction/Conditions/WirePanel.cs +++ b/Content.Server/Construction/Conditions/WirePanel.cs @@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components; using Content.Shared.Construction; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Localization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -14,7 +15,7 @@ namespace Content.Server.Construction.Conditions { public bool Open { get; private set; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Open, "open", true); } diff --git a/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs index c611bd2957..44a0232bcf 100644 --- a/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs @@ -214,7 +214,7 @@ namespace Content.Server.GameObjects.Components.Access UserInterface?.SetState(newState); } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) { @@ -224,7 +224,7 @@ namespace Content.Server.GameObjects.Components.Access UserInterface?.Open(actor.playerSession); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { var item = eventArgs.Using; var user = eventArgs.User; diff --git a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs index db6db84d8b..53bd939102 100644 --- a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs +++ b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs @@ -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)) { diff --git a/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs b/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs index ce09402f32..4b12425209 100644 --- a/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs +++ b/Content.Server/GameObjects/Components/Arcade/SpaceVillainArcadeComponent.cs @@ -71,7 +71,7 @@ namespace Content.Server.GameObjects.Components.Arcade _game = new SpaceVillainGame(this); } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) { diff --git a/Content.Server/GameObjects/Components/Atmos/BreathToolComponent.cs b/Content.Server/GameObjects/Components/Atmos/BreathToolComponent.cs index b5228797ea..1546b9f305 100644 --- a/Content.Server/GameObjects/Components/Atmos/BreathToolComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/BreathToolComponent.cs @@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.Components.Atmos DisconnectInternals(); } - public void Equipped(EquippedEventArgs eventArgs) + void IEquipped.Equipped(EquippedEventArgs eventArgs) { if ((EquipmentSlotDefines.SlotMasks[eventArgs.Slot] & _allowedSlots) != _allowedSlots) return; IsFunctional = true; @@ -48,10 +48,9 @@ namespace Content.Server.GameObjects.Components.Atmos } } - public void Unequipped(UnequippedEventArgs eventArgs) + void IUnequipped.Unequipped(UnequippedEventArgs eventArgs) { DisconnectInternals(); - } public void DisconnectInternals() diff --git a/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs b/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs index 4fdca8dc5f..6ed0bcdeb1 100644 --- a/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs @@ -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) { diff --git a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs index 0956c66645..cc53c0e7c4 100644 --- a/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GasTankComponent.cs @@ -24,6 +24,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Localization; using Robust.Shared.Serialization; using Robust.Shared.Utility; @@ -166,14 +167,14 @@ namespace Content.Server.GameObjects.Components.Atmos return air; } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false; OpenInterface(actor.playerSession); return true; } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return; OpenInterface(actor.playerSession); @@ -323,7 +324,7 @@ namespace Content.Server.GameObjects.Components.Atmos _integrity++; } - public void Dropped(DroppedEventArgs eventArgs) + void IDropped.Dropped(DroppedEventArgs eventArgs) { DisconnectFromInternals(eventArgs.User); } @@ -363,7 +364,7 @@ namespace Content.Server.GameObjects.Components.Atmos [UsedImplicitly] public class ToggleInternalsAction : IToggleItemAction { - public void ExposeData(ObjectSerializer serializer) {} + void IExposeData.ExposeData(ObjectSerializer serializer) {} public bool DoToggleAction(ToggleItemActionEventArgs args) { diff --git a/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs b/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs index 44c7cc5a7e..c6f995e4cd 100644 --- a/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Part/BodyPartComponent.cs @@ -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 if (eventArgs.Target == null) diff --git a/Content.Server/GameObjects/Components/Botany/LogComponent.cs b/Content.Server/GameObjects/Components/Botany/LogComponent.cs index 753d887fa5..e39722cd05 100644 --- a/Content.Server/GameObjects/Components/Botany/LogComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/LogComponent.cs @@ -12,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Botany { public override string Name => "Log"; - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!ActionBlockerSystem.CanInteract(eventArgs.User)) return false; diff --git a/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs b/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs index 6d481b80ed..7a7c1afbe7 100644 --- a/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/PlantHolderComponent.cs @@ -639,7 +639,7 @@ namespace Content.Server.GameObjects.Components.Botany Seed = Seed.Diverge(modified); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { var user = eventArgs.User; var usingItem = eventArgs.Using; @@ -767,7 +767,7 @@ namespace Content.Server.GameObjects.Components.Botany return false; } - public ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) + ReagentUnit IReagentReaction.ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) { if(_solutionContainer == null) return ReagentUnit.Zero; @@ -776,7 +776,7 @@ namespace Content.Server.GameObjects.Components.Botany return accepted; } - public ReagentUnit ReagentReactInjection(ReagentPrototype reagent, ReagentUnit volume) + ReagentUnit IReagentReaction.ReagentReactInjection(ReagentPrototype reagent, ReagentUnit volume) { if(_solutionContainer == null) return ReagentUnit.Zero; @@ -785,13 +785,13 @@ namespace Content.Server.GameObjects.Components.Botany return accepted; } - public bool InteractHand(InteractHandEventArgs eventArgs) + bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { // DoHarvest does the sanity checks. return DoHarvest(eventArgs.User); } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { // DoHarvest does the sanity checks. DoHarvest(eventArgs.User); diff --git a/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs b/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs index 4f1b313d94..0d4b9a5d63 100644 --- a/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs +++ b/Content.Server/GameObjects/Components/Botany/SeedExtractorComponent.cs @@ -29,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Botany private int _minSeeds = 1; private int _maxSeeds = 4; - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!_powerReceiver?.Powered ?? false) return false; diff --git a/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs b/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs index 9c1bd88881..d899c00abb 100644 --- a/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs @@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.Components.Chemistry } // Feeding someone else - public async Task AfterInteract(AfterInteractEventArgs eventArgs) + async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) { if (eventArgs.Target == null) { diff --git a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs index 8e85838e66..6f5ef1de1f 100644 --- a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs +++ b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs @@ -154,7 +154,7 @@ namespace Content.Server.GameObjects.Components.Construction TargetNextEdge = Node.GetEdge(TargetPathfinding.Peek().Name); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (_handling) return true; diff --git a/Content.Server/GameObjects/Components/Construction/MachineFrameComponent.cs b/Content.Server/GameObjects/Components/Construction/MachineFrameComponent.cs index 3619b6485e..4f0e8ce9a6 100644 --- a/Content.Server/GameObjects/Components/Construction/MachineFrameComponent.cs +++ b/Content.Server/GameObjects/Components/Construction/MachineFrameComponent.cs @@ -210,7 +210,7 @@ namespace Content.Server.GameObjects.Components.Construction } } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!HasBoard && eventArgs.Using.TryGetComponent(out var machineBoard)) { diff --git a/Content.Server/GameObjects/Components/Construction/WelderRefinableComponent.cs b/Content.Server/GameObjects/Components/Construction/WelderRefinableComponent.cs index 1d5fb02d88..a642da142b 100644 --- a/Content.Server/GameObjects/Components/Construction/WelderRefinableComponent.cs +++ b/Content.Server/GameObjects/Components/Construction/WelderRefinableComponent.cs @@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Construction serializer.DataField(ref _refineTime, "refineTime", 2f); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { // check if object is welder if (!eventArgs.Using.TryGetComponent(out ToolComponent? tool)) diff --git a/Content.Server/GameObjects/Components/Damage/DamageOnLandComponent.cs b/Content.Server/GameObjects/Components/Damage/DamageOnLandComponent.cs index c5004baa97..b90ef13ad8 100644 --- a/Content.Server/GameObjects/Components/Damage/DamageOnLandComponent.cs +++ b/Content.Server/GameObjects/Components/Damage/DamageOnLandComponent.cs @@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Damage serializer.DataField(ref _ignoreResistances, "ignoreResistances", false); } - public void Land(LandEventArgs eventArgs) + void ILand.Land(LandEventArgs eventArgs) { if (!Owner.TryGetComponent(out IDamageableComponent damageable)) return; diff --git a/Content.Server/GameObjects/Components/Damage/DamageOnToolInteractComponent.cs b/Content.Server/GameObjects/Components/Damage/DamageOnToolInteractComponent.cs index 1781dcf8d9..5643095593 100644 --- a/Content.Server/GameObjects/Components/Damage/DamageOnToolInteractComponent.cs +++ b/Content.Server/GameObjects/Components/Damage/DamageOnToolInteractComponent.cs @@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Damage serializer.DataField(ref _tools, "tools", new List()); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (eventArgs.Using.TryGetComponent(out var tool)) { diff --git a/Content.Server/GameObjects/Components/Damage/DamageOtherOnHitComponent.cs b/Content.Server/GameObjects/Components/Damage/DamageOtherOnHitComponent.cs index 6722553fce..b6bd45ce95 100644 --- a/Content.Server/GameObjects/Components/Damage/DamageOtherOnHitComponent.cs +++ b/Content.Server/GameObjects/Components/Damage/DamageOtherOnHitComponent.cs @@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Damage serializer.DataField(ref _ignoreResistances, "ignoreResistances", false); } - public void DoHit(ThrowCollideEventArgs eventArgs) + void IThrowCollide.DoHit(ThrowCollideEventArgs eventArgs) { if (!eventArgs.Target.TryGetComponent(out IDamageableComponent damageable)) return; diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/DoActsBehavior.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/DoActsBehavior.cs index e4dd894598..ea9cdcd8d9 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/DoActsBehavior.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/DoActsBehavior.cs @@ -1,6 +1,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.EntitySystems; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior @@ -19,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior set => _acts = (int) value; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _acts, "acts", 0, WithFormat.Flags()); } diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/GibBehavior.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/GibBehavior.cs index c388666c24..8f0fa5d552 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/GibBehavior.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/GibBehavior.cs @@ -2,6 +2,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.Components.Body; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior @@ -11,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior { private bool _recursive = true; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _recursive, "recursive", true); } diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundBehavior.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundBehavior.cs index 0ea803f937..47e9c585a8 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundBehavior.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundBehavior.cs @@ -1,6 +1,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.Audio; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior @@ -12,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior /// public string Sound { get; set; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Sound, "sound", string.Empty); } diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundCollectionBehavior.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundCollectionBehavior.cs index 5a02635b4d..6f33135e0e 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundCollectionBehavior.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/PlaySoundCollectionBehavior.cs @@ -1,6 +1,7 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.Audio; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior @@ -12,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior /// private string SoundCollection { get; set; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty); } diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpawnEntitiesBehavior.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpawnEntitiesBehavior.cs index 9864db5175..179255c8b3 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpawnEntitiesBehavior.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpawnEntitiesBehavior.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Stack; using Content.Server.GameObjects.EntitySystems; using Content.Shared.Utility; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior @@ -15,7 +16,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior /// public Dictionary Spawn { get; set; } = new(); - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.Spawn, "spawn", new Dictionary()); } diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpillBehavior.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpillBehavior.cs index 53ac16d632..3a4fca3dde 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpillBehavior.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpillBehavior.cs @@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Fluids; using Content.Server.GameObjects.EntitySystems; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior @@ -11,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior [UsedImplicitly] public class SpillBehavior : IThresholdBehavior { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public void Trigger(IEntity owner, DestructibleSystem system) { diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/MinMax.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/MinMax.cs index c7ef3c7fd0..6c787ba2a3 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/MinMax.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/MinMax.cs @@ -12,7 +12,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds [ViewVariables] public int Max; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref Min, "min", 0); serializer.DataField(ref Max, "max", 0); diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Threshold.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Threshold.cs index e0e402f5df..8ed2367415 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Threshold.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Threshold.cs @@ -31,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds /// [ViewVariables] public IReadOnlyList 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.TriggersOnce, "triggersOnce", false); diff --git a/Content.Server/GameObjects/Components/Fluids/BucketComponent.cs b/Content.Server/GameObjects/Components/Fluids/BucketComponent.cs index 60f52f3fc0..516e03eb95 100644 --- a/Content.Server/GameObjects/Components/Fluids/BucketComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/BucketComponent.cs @@ -85,7 +85,7 @@ namespace Content.Server.GameObjects.Components.Fluids return true; } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!Owner.TryGetComponent(out SolutionContainerComponent? contents)) { diff --git a/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs b/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs index 8a45830637..09900b8f58 100644 --- a/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/SprayComponent.cs @@ -185,13 +185,13 @@ namespace Content.Server.GameObjects.Components.Fluids } } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { ToggleSafety(eventArgs.User); return true; } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { ToggleSafety(eventArgs.User); } @@ -212,7 +212,7 @@ namespace Content.Server.GameObjects.Components.Fluids appearance.SetData(SprayVisuals.Safety, _safety); } - public void Dropped(DroppedEventArgs eventArgs) + void IDropped.Dropped(DroppedEventArgs eventArgs) { if(_hasSafety && Owner.TryGetComponent(out AppearanceComponent appearance)) appearance.SetData(SprayVisuals.Safety, _safety); diff --git a/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs b/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs index dbf6f5818b..c8ec2c1651 100644 --- a/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs +++ b/Content.Server/GameObjects/Components/Gravity/GravityGeneratorComponent.cs @@ -100,7 +100,7 @@ namespace Content.Server.GameObjects.Components.Gravity return true; } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.Using.TryGetComponent(out WelderComponent? tool)) return false; diff --git a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs index 233874b533..c7c25f8d1e 100644 --- a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs +++ b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs @@ -290,7 +290,7 @@ namespace Content.Server.GameObjects.Components.Instruments _laggedBatches = 0; } - public void Dropped(DroppedEventArgs eventArgs) + void IDropped.Dropped(DroppedEventArgs eventArgs) { Clean(); SendNetworkMessage(new InstrumentStopMidiMessage()); @@ -298,7 +298,7 @@ namespace Content.Server.GameObjects.Components.Instruments UserInterface?.CloseAll(); } - public void Thrown(ThrownEventArgs eventArgs) + void IThrown.Thrown(ThrownEventArgs eventArgs) { Clean(); SendNetworkMessage(new InstrumentStopMidiMessage()); @@ -306,7 +306,7 @@ namespace Content.Server.GameObjects.Components.Instruments UserInterface?.CloseAll(); } - public void HandSelected(HandSelectedEventArgs eventArgs) + void IHandSelected.HandSelected(HandSelectedEventArgs eventArgs) { if (eventArgs.User == null || !eventArgs.User.TryGetComponent(out BasicActorComponent? actor)) return; @@ -318,14 +318,14 @@ namespace Content.Server.GameObjects.Components.Instruments InstrumentPlayer = session; } - public void HandDeselected(HandDeselectedEventArgs eventArgs) + void IHandDeselected.HandDeselected(HandDeselectedEventArgs eventArgs) { Clean(); SendNetworkMessage(new InstrumentStopMidiMessage()); UserInterface?.CloseAll(); } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { if (Handheld || !eventArgs.User.TryGetComponent(out IActorComponent? actor)) return; @@ -335,7 +335,7 @@ namespace Content.Server.GameObjects.Components.Instruments OpenUserInterface(actor.playerSession); } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false; diff --git a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs index 3c080701cb..ead9d5c48b 100644 --- a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs @@ -24,6 +24,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Serialization; @@ -282,7 +283,7 @@ namespace Content.Server.GameObjects.Components.Interactable [UsedImplicitly] public class ToggleLightAction : IToggleItemAction { - public void ExposeData(ObjectSerializer serializer) {} + void IExposeData.ExposeData(ObjectSerializer serializer) {} public bool DoToggleAction(ToggleItemActionEventArgs args) { diff --git a/Content.Server/GameObjects/Components/Interactable/MatchboxComponent.cs b/Content.Server/GameObjects/Components/Interactable/MatchboxComponent.cs index d7a883fbb3..65b9e67ee9 100644 --- a/Content.Server/GameObjects/Components/Interactable/MatchboxComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/MatchboxComponent.cs @@ -12,9 +12,9 @@ namespace Content.Server.GameObjects.Components.Interactable { public override string Name => "Matchbox"; - public int Priority => 1; + int IInteractUsing.Priority => 1; - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (eventArgs.Using.TryGetComponent(out var matchstick) && matchstick.CurrentState == SharedBurningStates.Unlit) @@ -26,4 +26,4 @@ namespace Content.Server.GameObjects.Components.Interactable return false; } } -} \ No newline at end of file +} diff --git a/Content.Server/GameObjects/Components/Interactable/MatchstickComponent.cs b/Content.Server/GameObjects/Components/Interactable/MatchstickComponent.cs index 3bf112b9ff..f172f71f2e 100644 --- a/Content.Server/GameObjects/Components/Interactable/MatchstickComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/MatchstickComponent.cs @@ -89,7 +89,7 @@ namespace Content.Server.GameObjects.Components.Interactable Owner.SpawnTimer(_duration * 1000, () => CurrentState = SharedBurningStates.Burnt); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (eventArgs.Target.TryGetComponent(out var hotItem) && hotItem.IsCurrentlyHot() @@ -102,4 +102,4 @@ namespace Content.Server.GameObjects.Components.Interactable return false; } } -} \ No newline at end of file +} diff --git a/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs b/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs index c8f67ec62a..39879e2a02 100644 --- a/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/MultitoolComponent.cs @@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Interactable public string SoundCollection => _soundCollection; 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(ref _state, "state", string.Empty); @@ -104,7 +104,7 @@ namespace Content.Server.GameObjects.Components.Interactable serializer.DataField(ref _tools, "tools", new List()); } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { Cycle(); return true; diff --git a/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs b/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs index 3099b9779c..f932a40f8d 100644 --- a/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/TilePryingComponent.cs @@ -21,7 +21,7 @@ namespace Content.Server.GameObjects.Components.Interactable public override string Name => "TilePrying"; private bool _toolComponentNeeded = true; - public async Task AfterInteract(AfterInteractEventArgs eventArgs) + async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) { TryPryTile(eventArgs.User, eventArgs.ClickLocation); } diff --git a/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs b/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs index 21776ab4e8..25b4aaf4c1 100644 --- a/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs @@ -213,7 +213,7 @@ namespace Content.Server.GameObjects.Components.Interactable return true; } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { 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 selfMessage; diff --git a/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs b/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs index e25dfd1ca9..b7a7065276 100644 --- a/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs @@ -72,7 +72,7 @@ namespace Content.Server.GameObjects.Components.Items.Clothing return new ClothingComponentState(ClothingEquippedPrefix, EquippedPrefix); } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { if (!_quickEquipEnabled) return false; if (!eventArgs.User.TryGetComponent(out InventoryComponent inv) diff --git a/Content.Server/GameObjects/Components/Items/DebugEquipComponent.cs b/Content.Server/GameObjects/Components/Items/DebugEquipComponent.cs index 6fd0a50f99..daf5696cfa 100644 --- a/Content.Server/GameObjects/Components/Items/DebugEquipComponent.cs +++ b/Content.Server/GameObjects/Components/Items/DebugEquipComponent.cs @@ -12,22 +12,23 @@ namespace Content.Server.GameObjects.Components.Items public class DebugEquipComponent : Component, IEquipped, IEquippedHand, IUnequipped, IUnequippedHand { public override string Name => "DebugEquip"; - public void Equipped(EquippedEventArgs eventArgs) + + void IEquipped.Equipped(EquippedEventArgs eventArgs) { eventArgs.User.PopupMessage("equipped " + Owner.Name); } - public void EquippedHand(EquippedHandEventArgs eventArgs) + void IEquippedHand.EquippedHand(EquippedHandEventArgs eventArgs) { eventArgs.User.PopupMessage("equipped hand " + Owner.Name); } - public void Unequipped(UnequippedEventArgs eventArgs) + void IUnequipped.Unequipped(UnequippedEventArgs eventArgs) { eventArgs.User.PopupMessage("unequipped " + Owner.Name); } - public void UnequippedHand(UnequippedHandEventArgs eventArgs) + void IUnequippedHand.UnequippedHand(UnequippedHandEventArgs eventArgs) { eventArgs.User.PopupMessage("unequipped hand" + Owner.Name); } diff --git a/Content.Server/GameObjects/Components/Items/DiceComponent.cs b/Content.Server/GameObjects/Components/Items/DiceComponent.cs index 3df295bc0a..2eaab93c14 100644 --- a/Content.Server/GameObjects/Components/Items/DiceComponent.cs +++ b/Content.Server/GameObjects/Components/Items/DiceComponent.cs @@ -64,18 +64,18 @@ namespace Content.Server.GameObjects.Components.Items } } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { Roll(); } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { Roll(); return false; } - public void Land(LandEventArgs eventArgs) + void ILand.Land(LandEventArgs eventArgs) { Roll(); } diff --git a/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs b/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs index 57969eda49..7b715cd433 100644 --- a/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs @@ -56,7 +56,7 @@ namespace Content.Server.GameObjects.Components.Items EntitySystem.Get().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 (!Owner.TryGetComponent(out StackComponent stack)) return; diff --git a/Content.Server/GameObjects/Components/Items/RCD/RCDAmmoComponent.cs b/Content.Server/GameObjects/Components/Items/RCD/RCDAmmoComponent.cs index b79f422205..5ab40c7413 100644 --- a/Content.Server/GameObjects/Components/Items/RCD/RCDAmmoComponent.cs +++ b/Content.Server/GameObjects/Components/Items/RCD/RCDAmmoComponent.cs @@ -32,7 +32,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD 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)) { diff --git a/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs b/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs index bef07051db..23d96861ec 100644 --- a/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs +++ b/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs @@ -68,8 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD /// /// Method called when the RCD is clicked in-hand, this will cycle the RCD mode. /// - - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { SwapMode(eventArgs); 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)); } - public async Task AfterInteract(AfterInteractEventArgs eventArgs) + async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) { //No changing mode mid-RCD var startingMode = _mode; diff --git a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs index 67c32b1c84..08b328e1da 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs @@ -97,7 +97,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage return user.InRangeUnobstructed(Owner, ignoreInsideBlocker: true, popup: true); } - public bool InteractHand(InteractHandEventArgs eventArgs) + bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { if (!CanPickup(eventArgs.User)) return false; diff --git a/Content.Server/GameObjects/Components/Items/Storage/StorageFillComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/StorageFillComponent.cs index ebefffd567..cdd5c50890 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/StorageFillComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/StorageFillComponent.cs @@ -68,7 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage public string GroupId; public int Amount; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref PrototypeName, "name", null); serializer.DataField(ref Amount, "amount", 1); diff --git a/Content.Server/GameObjects/Components/Items/ToysComponent.cs b/Content.Server/GameObjects/Components/Items/ToysComponent.cs index 8c379e9b11..0a22581f3c 100644 --- a/Content.Server/GameObjects/Components/Items/ToysComponent.cs +++ b/Content.Server/GameObjects/Components/Items/ToysComponent.cs @@ -45,17 +45,18 @@ namespace Content.Server.GameObjects.Components.Items } } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { Squeak(); } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { Squeak(); return false; } - public void Land(LandEventArgs eventArgs) + + void ILand.Land(LandEventArgs eventArgs) { Squeak(); } diff --git a/Content.Server/GameObjects/Components/Kitchen/KitchenSpikeComponent.cs b/Content.Server/GameObjects/Components/Kitchen/KitchenSpikeComponent.cs index 9bccc8c858..7765aa00b5 100644 --- a/Content.Server/GameObjects/Components/Kitchen/KitchenSpikeComponent.cs +++ b/Content.Server/GameObjects/Components/Kitchen/KitchenSpikeComponent.cs @@ -92,7 +92,7 @@ namespace Content.Server.GameObjects.Components.Kitchen 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); victim.PopupMessageOtherClients(othersMessage); diff --git a/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs b/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs index 60aca373e1..9c42c520ac 100644 --- a/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs +++ b/Content.Server/GameObjects/Components/Kitchen/MicrowaveComponent.cs @@ -197,7 +197,7 @@ namespace Content.Server.GameObjects.Components.Kitchen UserInterface?.Toggle(actor.playerSession); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!Powered) { @@ -473,7 +473,7 @@ namespace Content.Server.GameObjects.Components.Kitchen _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; diff --git a/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs b/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs index 0205237afe..6f14519d17 100644 --- a/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs +++ b/Content.Server/GameObjects/Components/Kitchen/ReagentGrinderComponent.cs @@ -269,7 +269,7 @@ namespace Content.Server.GameObjects.Components.Kitchen UserInterface?.Toggle(actor.playerSession); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IHandsComponent? hands)) { diff --git a/Content.Server/GameObjects/Components/MachineLinking/SignalButtonComponent.cs b/Content.Server/GameObjects/Components/MachineLinking/SignalButtonComponent.cs index ec586b2d26..a88f51a17a 100644 --- a/Content.Server/GameObjects/Components/MachineLinking/SignalButtonComponent.cs +++ b/Content.Server/GameObjects/Components/MachineLinking/SignalButtonComponent.cs @@ -12,12 +12,12 @@ namespace Content.Server.GameObjects.Components.MachineLinking { public override string Name => "SignalButton"; - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { TransmitSignal(eventArgs.User); } - public bool InteractHand(InteractHandEventArgs eventArgs) + bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { TransmitSignal(eventArgs.User); return true; diff --git a/Content.Server/GameObjects/Components/MachineLinking/SignalReceiverComponent.cs b/Content.Server/GameObjects/Components/MachineLinking/SignalReceiverComponent.cs index f7635f4f76..b45277d771 100644 --- a/Content.Server/GameObjects/Components/MachineLinking/SignalReceiverComponent.cs +++ b/Content.Server/GameObjects/Components/MachineLinking/SignalReceiverComponent.cs @@ -114,7 +114,7 @@ namespace Content.Server.GameObjects.Components.MachineLinking return true; } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.Using.TryGetComponent(out var tool)) return false; diff --git a/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs b/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs index 9643aa242d..26e6ff1089 100644 --- a/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs +++ b/Content.Server/GameObjects/Components/MachineLinking/SignalSwitchComponent.cs @@ -32,12 +32,12 @@ namespace Content.Server.GameObjects.Components.MachineLinking serializer.DataField(ref _on, "on", true); } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { TransmitSignal(eventArgs.User); } - public bool InteractHand(InteractHandEventArgs eventArgs) + bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { TransmitSignal(eventArgs.User); return true; diff --git a/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs b/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs index 2968611b4c..ba933710ec 100644 --- a/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs +++ b/Content.Server/GameObjects/Components/MachineLinking/SignalTransmitterComponent.cs @@ -130,7 +130,7 @@ namespace Content.Server.GameObjects.Components.MachineLinking return this; } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.Using.TryGetComponent(out var tool)) return false; diff --git a/Content.Server/GameObjects/Components/MagbootsComponent.cs b/Content.Server/GameObjects/Components/MagbootsComponent.cs index 49e6eb25f1..89e99b5e64 100644 --- a/Content.Server/GameObjects/Components/MagbootsComponent.cs +++ b/Content.Server/GameObjects/Components/MagbootsComponent.cs @@ -16,6 +16,7 @@ using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Localization; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; @@ -143,7 +144,7 @@ namespace Content.Server.GameObjects.Components [UsedImplicitly] public sealed class ToggleMagbootsAction : IToggleItemAction { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public bool DoToggleAction(ToggleItemActionEventArgs args) { diff --git a/Content.Server/GameObjects/Components/MagicMirrorComponent.cs b/Content.Server/GameObjects/Components/MagicMirrorComponent.cs index 86236b742e..2468817ee5 100644 --- a/Content.Server/GameObjects/Components/MagicMirrorComponent.cs +++ b/Content.Server/GameObjects/Components/MagicMirrorComponent.cs @@ -88,7 +88,7 @@ namespace Content.Server.GameObjects.Components } } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) { diff --git a/Content.Server/GameObjects/Components/Medical/CloningPodComponent.cs b/Content.Server/GameObjects/Components/Medical/CloningPodComponent.cs index dc56625e60..b6bc1a763a 100644 --- a/Content.Server/GameObjects/Components/Medical/CloningPodComponent.cs +++ b/Content.Server/GameObjects/Components/Medical/CloningPodComponent.cs @@ -138,7 +138,7 @@ namespace Content.Server.GameObjects.Components.Medical } } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { if (!Powered || !eventArgs.User.TryGetComponent(out IActorComponent? actor)) diff --git a/Content.Server/GameObjects/Components/Medical/HealingComponent.cs b/Content.Server/GameObjects/Components/Medical/HealingComponent.cs index cb4684238a..afee00d754 100644 --- a/Content.Server/GameObjects/Components/Medical/HealingComponent.cs +++ b/Content.Server/GameObjects/Components/Medical/HealingComponent.cs @@ -26,7 +26,7 @@ namespace Content.Server.GameObjects.Components.Medical serializer.DataField(this, h => h.Heal, "heal", new Dictionary()); } - public async Task AfterInteract(AfterInteractEventArgs eventArgs) + async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) { if (eventArgs.Target == null) { diff --git a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs index 45fe55e65f..b31617302e 100644 --- a/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs +++ b/Content.Server/GameObjects/Components/Medical/MedicalScannerComponent.cs @@ -190,7 +190,7 @@ namespace Content.Server.GameObjects.Components.Medical } } - public void Activate(ActivateEventArgs args) + void IActivate.Activate(ActivateEventArgs args) { if (!args.User.TryGetComponent(out IActorComponent? actor)) { diff --git a/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs b/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs index 1f22c0a91d..197b92e6e6 100644 --- a/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs @@ -121,7 +121,7 @@ namespace Content.Server.GameObjects.Components.Morgue }, _cremateCancelToken.Token); } - public SuicideKind Suicide(IEntity victim, IChatManager chat) + SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat) { var mind = victim.PlayerSession()?.ContentData()?.Mind; diff --git a/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs b/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs index 96f1ef2719..60c46c8e50 100644 --- a/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs @@ -20,7 +20,7 @@ namespace Content.Server.GameObjects.Components.Nutrition AudioHelpers.WithVariation(0.125f)); } - public void Land(LandEventArgs eventArgs) + void ILand.Land(LandEventArgs eventArgs) { PlaySound(); diff --git a/Content.Server/GameObjects/Components/Nutrition/CreamPiedComponent.cs b/Content.Server/GameObjects/Components/Nutrition/CreamPiedComponent.cs index 4261cdbdb5..db9dd812fd 100644 --- a/Content.Server/GameObjects/Components/Nutrition/CreamPiedComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/CreamPiedComponent.cs @@ -37,7 +37,7 @@ namespace Content.Server.GameObjects.Components.Nutrition CreamPied = false; } - public ReagentUnit ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) + ReagentUnit IReagentReaction.ReagentReactTouch(ReagentPrototype reagent, ReagentUnit volume) { switch (reagent.ID) { @@ -50,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Nutrition return ReagentUnit.Zero; } - public void HitBy(ThrowCollideEventArgs eventArgs) + void IThrowCollide.HitBy(ThrowCollideEventArgs eventArgs) { if (!eventArgs.Thrown.HasComponent() || CreamPied) return; diff --git a/Content.Server/GameObjects/Components/Nutrition/SmokingComponent.cs b/Content.Server/GameObjects/Components/Nutrition/SmokingComponent.cs index ad650d2906..224e9757ae 100644 --- a/Content.Server/GameObjects/Components/Nutrition/SmokingComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/SmokingComponent.cs @@ -83,7 +83,7 @@ namespace Content.Server.GameObjects.Components.Nutrition serializer.DataField(ref _temperature, "temperature", 673.15f); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (eventArgs.Using.TryGetComponent(out IHotItem? lighter) && lighter.IsCurrentlyHot() @@ -104,4 +104,4 @@ namespace Content.Server.GameObjects.Components.Nutrition return _currentState == SharedBurningStates.Lit; } } -} \ No newline at end of file +} diff --git a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs index efd7c1da4b..5ee0518c51 100644 --- a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs +++ b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs @@ -252,7 +252,7 @@ namespace Content.Server.GameObjects.Components.PDA return true; } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { var item = eventArgs.Using; @@ -280,7 +280,7 @@ namespace Content.Server.GameObjects.Components.PDA UpdatePDAAppearance(); } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) { diff --git a/Content.Server/GameObjects/Components/Paper/PaperComponent.cs b/Content.Server/GameObjects/Components/Paper/PaperComponent.cs index 10e3dd0c6e..b7610a8fdb 100644 --- a/Content.Server/GameObjects/Components/Paper/PaperComponent.cs +++ b/Content.Server/GameObjects/Components/Paper/PaperComponent.cs @@ -46,7 +46,7 @@ namespace Content.Server.GameObjects.Components.Paper message.AddMarkup(Content); } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) return false; @@ -74,7 +74,7 @@ namespace Content.Server.GameObjects.Components.Paper UpdateUserInterface(); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.Using.HasComponent()) return false; diff --git a/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs b/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs index 1230842be4..a22651afa0 100644 --- a/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs +++ b/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs @@ -87,7 +87,7 @@ namespace Content.Server.GameObjects.Components return new PlaceableSurfaceComponentState(_isPlaceable,_placeCentered,_positionOffset); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!IsPlaceable) return false; diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/LightBulbComponent.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/LightBulbComponent.cs index b7d72b392b..4bcc5e4b21 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/LightBulbComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/LightBulbComponent.cs @@ -120,7 +120,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece UpdateColor(); } - public void Land(LandEventArgs eventArgs) + void ILand.Land(LandEventArgs eventArgs) { var soundCollection = _prototypeManager.Index("GlassBreak"); diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs index 48f167d4fa..9e99e35cb3 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs @@ -58,12 +58,12 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece // TODO CONSTRUCTION make this use a construction graph - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { return InsertBulb(eventArgs.Using); } - public bool InteractHand(InteractHandEventArgs eventArgs) + bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IDamageableComponent damageableComponent)) { diff --git a/Content.Server/GameObjects/Components/Power/PowerNetComponents/RadiationCollectorComponent.cs b/Content.Server/GameObjects/Components/Power/PowerNetComponents/RadiationCollectorComponent.cs index b6b63ffc2c..066b9b97b9 100644 --- a/Content.Server/GameObjects/Components/Power/PowerNetComponents/RadiationCollectorComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerNetComponents/RadiationCollectorComponent.cs @@ -90,7 +90,7 @@ namespace Content.Server.GameObjects.Components.Power.PowerNetComponents SetAppearance(RadiationCollectorVisualState.Deactivating); } - public void RadiationAct(float frameTime, SharedRadiationPulseComponent radiation) + void IRadiationAct.RadiationAct(float frameTime, SharedRadiationPulseComponent radiation) { if (!_enabled) return; diff --git a/Content.Server/GameObjects/Components/Power/WireComponent.cs b/Content.Server/GameObjects/Components/Power/WireComponent.cs index ad9cf19602..05f66be2b4 100644 --- a/Content.Server/GameObjects/Components/Power/WireComponent.cs +++ b/Content.Server/GameObjects/Components/Power/WireComponent.cs @@ -35,7 +35,7 @@ namespace Content.Server.GameObjects.Components.Power serializer.DataField(ref _wireType, "wireType", WireType.HighVoltage); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.Using.TryGetComponent(out ToolComponent tool)) return false; if (!await tool.UseTool(eventArgs.User, Owner, 0.25f, ToolQuality.Cutting)) return false; diff --git a/Content.Server/GameObjects/Components/Power/WirePlacerComponent.cs b/Content.Server/GameObjects/Components/Power/WirePlacerComponent.cs index 0330bd1c4a..46348bea6a 100644 --- a/Content.Server/GameObjects/Components/Power/WirePlacerComponent.cs +++ b/Content.Server/GameObjects/Components/Power/WirePlacerComponent.cs @@ -34,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Power } /// - public async Task AfterInteract(AfterInteractEventArgs eventArgs) + async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) { if (!eventArgs.InRangeUnobstructed(ignoreInsideBlocker: true, popup: true)) return; if(!_mapManager.TryGetGrid(eventArgs.ClickLocation.GetGridId(Owner.EntityManager), out var grid)) diff --git a/Content.Server/GameObjects/Components/Radio/HandheldRadioComponent.cs b/Content.Server/GameObjects/Components/Radio/HandheldRadioComponent.cs index 05e879dbbb..9d3963116e 100644 --- a/Content.Server/GameObjects/Components/Radio/HandheldRadioComponent.cs +++ b/Content.Server/GameObjects/Components/Radio/HandheldRadioComponent.cs @@ -81,7 +81,7 @@ namespace Content.Server.GameObjects.Components.Radio return true; } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { return Use(eventArgs.User); } @@ -111,7 +111,7 @@ namespace Content.Server.GameObjects.Components.Radio _radioSystem.SpreadMessage(this, speaker, message, BroadcastFrequency); } - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { Use(eventArgs.User); } diff --git a/Content.Server/GameObjects/Components/Recycling/RecyclerComponent.cs b/Content.Server/GameObjects/Components/Recycling/RecyclerComponent.cs index dc0acb8636..3e023eff7c 100644 --- a/Content.Server/GameObjects/Components/Recycling/RecyclerComponent.cs +++ b/Content.Server/GameObjects/Components/Recycling/RecyclerComponent.cs @@ -185,7 +185,7 @@ namespace Content.Server.GameObjects.Components.Recycling Recycle(collidedWith); } - public SuicideKind Suicide(IEntity victim, IChatManager chat) + SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat) { var mind = victim.PlayerSession()?.ContentData()?.Mind; diff --git a/Content.Server/GameObjects/Components/Sound/EmitSoundOnThrowComponent.cs b/Content.Server/GameObjects/Components/Sound/EmitSoundOnThrowComponent.cs index 8442458b57..9a56b64e16 100644 --- a/Content.Server/GameObjects/Components/Sound/EmitSoundOnThrowComponent.cs +++ b/Content.Server/GameObjects/Components/Sound/EmitSoundOnThrowComponent.cs @@ -39,7 +39,8 @@ namespace Content.Server.GameObjects.Components.Sound EntitySystem.Get().PlayFromEntity(_soundName, Owner, AudioParams.Default.WithVolume(-2f)); } } - public void Land(LandEventArgs eventArgs) + + void ILand.Land(LandEventArgs eventArgs) { PlaySoundEffect(); } diff --git a/Content.Server/GameObjects/Components/Stack/StackComponent.cs b/Content.Server/GameObjects/Components/Stack/StackComponent.cs index 5dbc8026f9..4dc2ef7e55 100644 --- a/Content.Server/GameObjects/Components/Stack/StackComponent.cs +++ b/Content.Server/GameObjects/Components/Stack/StackComponent.cs @@ -82,7 +82,7 @@ namespace Content.Server.GameObjects.Components.Stack return false; } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.Using.TryGetComponent(out var stack)) return false; diff --git a/Content.Server/GameObjects/Components/TraitorDeathMatch/TraitorDeathMatchRedemptionComponent.cs b/Content.Server/GameObjects/Components/TraitorDeathMatch/TraitorDeathMatchRedemptionComponent.cs index 4e35a50e49..a4d942776c 100644 --- a/Content.Server/GameObjects/Components/TraitorDeathMatch/TraitorDeathMatchRedemptionComponent.cs +++ b/Content.Server/GameObjects/Components/TraitorDeathMatch/TraitorDeathMatchRedemptionComponent.cs @@ -32,7 +32,7 @@ namespace Content.Server.GameObjects.Components.TraitorDeathMatch /// public override string Name => "TraitorDeathMatchRedemption"; - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out var userInv)) { diff --git a/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs b/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs index 0f40ce414a..fb97efb2ac 100644 --- a/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs +++ b/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs @@ -51,7 +51,7 @@ namespace Content.Server.GameObjects.Components.VendingMachines [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(VendingMachineUiKey.Key); - public void Activate(ActivateEventArgs eventArgs) + void IActivate.Activate(ActivateEventArgs eventArgs) { if(!eventArgs.User.TryGetComponent(out IActorComponent? actor)) { diff --git a/Content.Server/GameObjects/Components/Watercloset/ToiletComponent.cs b/Content.Server/GameObjects/Components/Watercloset/ToiletComponent.cs index e2f0ff1376..59f96c62db 100644 --- a/Content.Server/GameObjects/Components/Watercloset/ToiletComponent.cs +++ b/Content.Server/GameObjects/Components/Watercloset/ToiletComponent.cs @@ -58,7 +58,7 @@ namespace Content.Server.GameObjects.Components.Watercloset UpdateSprite(); } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { // are player trying place or lift of cistern lid? if (eventArgs.Using.TryGetComponent(out ToolComponent? tool) @@ -92,7 +92,7 @@ namespace Content.Server.GameObjects.Components.Watercloset return false; } - public bool InteractHand(InteractHandEventArgs eventArgs) + bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { // trying get something from stash? if (LidOpen) @@ -104,7 +104,7 @@ namespace Content.Server.GameObjects.Components.Watercloset } // just want to up/down seat? - // check that nobody seats on seat right now + // check that nobody seats on seat right now if (Owner.TryGetComponent(out StrapComponent? strap)) { if (strap.BuckledEntities.Count != 0) @@ -144,7 +144,7 @@ namespace Content.Server.GameObjects.Components.Watercloset } } - public SuicideKind Suicide(IEntity victim, IChatManager chat) + SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat) { // check that victim even have head if (victim.TryGetComponent(out var body) && diff --git a/Content.Server/GameObjects/Components/Weapon/Melee/FlashComponent.cs b/Content.Server/GameObjects/Components/Weapon/Melee/FlashComponent.cs index 5130373ee1..f5b2f156bb 100644 --- a/Content.Server/GameObjects/Components/Weapon/Melee/FlashComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Melee/FlashComponent.cs @@ -75,7 +75,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee return true; } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { if (!Use(eventArgs.User)) { diff --git a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs index 53291488ab..75167d3d16 100644 --- a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs @@ -189,14 +189,14 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee _activated = true; } - public bool UseEntity(UseEntityEventArgs eventArgs) + bool IUse.UseEntity(UseEntityEventArgs eventArgs) { ToggleStatus(eventArgs.User); return true; } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { if (!ActionBlockerSystem.CanInteract(eventArgs.User)) return false; if (!_cellSlot.InsertCell(eventArgs.Using)) return false; @@ -212,7 +212,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee } } - public void DoHit(ThrowCollideEventArgs eventArgs) + void IThrowCollide.DoHit(ThrowCollideEventArgs eventArgs) { if (!Activated || Cell == null || !Cell.TryUseCharge(EnergyPerUse) || !eventArgs.Target.TryGetComponent(out StunnableComponent? stunnable)) return; diff --git a/Content.Server/Objectives/Conditions/StealCondition.cs b/Content.Server/Objectives/Conditions/StealCondition.cs index 2be59dbd0c..44c01f1598 100644 --- a/Content.Server/Objectives/Conditions/StealCondition.cs +++ b/Content.Server/Objectives/Conditions/StealCondition.cs @@ -6,6 +6,7 @@ using Content.Server.Objectives.Interfaces; using JetBrains.Annotations; using Robust.Server.GameObjects.Components.Container; using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Log; @@ -32,7 +33,7 @@ namespace Content.Server.Objectives.Conditions }; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _prototypeId, "prototype", ""); serializer.DataField(ref _amount, "amount", 1); diff --git a/Content.Server/Objectives/Requirements/IncompatibleConditionsRequirement.cs b/Content.Server/Objectives/Requirements/IncompatibleConditionsRequirement.cs index dc41ba2e4d..06d8a1ff0a 100644 --- a/Content.Server/Objectives/Requirements/IncompatibleConditionsRequirement.cs +++ b/Content.Server/Objectives/Requirements/IncompatibleConditionsRequirement.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Content.Server.Mobs; using Content.Server.Objectives.Interfaces; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Objectives.Requirements @@ -8,7 +9,8 @@ namespace Content.Server.Objectives.Requirements public class IncompatibleConditionsRequirement : IObjectiveRequirement { private List _incompatibleConditions = new(); - public void ExposeData(ObjectSerializer serializer) + + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x=>x._incompatibleConditions, "conditions", new List()); } diff --git a/Content.Server/Objectives/Requirements/IncompatibleObjectivesRequirement.cs b/Content.Server/Objectives/Requirements/IncompatibleObjectivesRequirement.cs index cb70b06883..893bc5504c 100644 --- a/Content.Server/Objectives/Requirements/IncompatibleObjectivesRequirement.cs +++ b/Content.Server/Objectives/Requirements/IncompatibleObjectivesRequirement.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Content.Server.Mobs; using Content.Server.Objectives.Interfaces; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Objectives.Requirements @@ -8,7 +9,8 @@ namespace Content.Server.Objectives.Requirements public class IncompatibleObjectivesRequirement : IObjectiveRequirement { private List _incompatibleObjectives = new(); - public void ExposeData(ObjectSerializer serializer) + + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x=>x._incompatibleObjectives, "objectives", new List()); } diff --git a/Content.Server/Objectives/Requirements/TraitorRequirement.cs b/Content.Server/Objectives/Requirements/TraitorRequirement.cs index 32b9628719..87abf57237 100644 --- a/Content.Server/Objectives/Requirements/TraitorRequirement.cs +++ b/Content.Server/Objectives/Requirements/TraitorRequirement.cs @@ -2,6 +2,7 @@ using Content.Server.Mobs.Roles.Traitor; using Content.Server.Objectives.Interfaces; using JetBrains.Annotations; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Serialization; namespace Content.Server.Objectives.Requirements @@ -9,7 +10,7 @@ namespace Content.Server.Objectives.Requirements [UsedImplicitly] public class TraitorRequirement : IObjectiveRequirement { - public void ExposeData(ObjectSerializer serializer){} + void IExposeData.ExposeData(ObjectSerializer serializer){} public bool CanBeAssigned(Mind mind) { diff --git a/Content.Shared/Chemistry/ReactionPrototype.cs b/Content.Shared/Chemistry/ReactionPrototype.cs index 7f2f9eb006..4aacbbf2e7 100644 --- a/Content.Shared/Chemistry/ReactionPrototype.cs +++ b/Content.Shared/Chemistry/ReactionPrototype.cs @@ -81,7 +81,7 @@ namespace Content.Shared.Chemistry /// public bool Catalyst => _catalyst; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _amount, "amount", ReagentUnit.New(1)); serializer.DataField(ref _catalyst, "catalyst", false); diff --git a/Content.Shared/Chemistry/Solution.cs b/Content.Shared/Chemistry/Solution.cs index ea334527b3..17bda924ea 100644 --- a/Content.Shared/Chemistry/Solution.cs +++ b/Content.Shared/Chemistry/Solution.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using Robust.Shared.Analyzers; using Robust.Shared.Interfaces.Serialization; using Robust.Shared.IoC; using Robust.Shared.Maths; @@ -49,7 +50,7 @@ namespace Content.Shared.Chemistry } /// - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataReadWriteFunction( "reagents", diff --git a/Content.Shared/Construction/ConstructionConditions/LowWallInTile.cs b/Content.Shared/Construction/ConstructionConditions/LowWallInTile.cs index 4737cff0e6..77af29be78 100644 --- a/Content.Shared/Construction/ConstructionConditions/LowWallInTile.cs +++ b/Content.Shared/Construction/ConstructionConditions/LowWallInTile.cs @@ -3,6 +3,7 @@ using Content.Shared.GameObjects.Components; using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Serialization; @@ -12,7 +13,7 @@ namespace Content.Shared.Construction.ConstructionConditions [UsedImplicitly] public class LowWallInTile : IConstructionCondition { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public bool Condition(IEntity user, EntityCoordinates location, Direction direction) { diff --git a/Content.Shared/Construction/ConstructionConditions/NoWindowsInTile.cs b/Content.Shared/Construction/ConstructionConditions/NoWindowsInTile.cs index 74e5eb34df..1be93dd164 100644 --- a/Content.Shared/Construction/ConstructionConditions/NoWindowsInTile.cs +++ b/Content.Shared/Construction/ConstructionConditions/NoWindowsInTile.cs @@ -3,6 +3,7 @@ using Content.Shared.GameObjects.Components; using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Serialization; @@ -12,7 +13,7 @@ namespace Content.Shared.Construction.ConstructionConditions [UsedImplicitly] public class NoWindowsInTile : IConstructionCondition { - public void ExposeData(ObjectSerializer serializer) { } + void IExposeData.ExposeData(ObjectSerializer serializer) { } public bool Condition(IEntity user, EntityCoordinates location, Direction direction) { diff --git a/Content.Shared/Construction/ConstructionConditions/TileNotBlocked.cs b/Content.Shared/Construction/ConstructionConditions/TileNotBlocked.cs index 6bc9dd084a..666537a177 100644 --- a/Content.Shared/Construction/ConstructionConditions/TileNotBlocked.cs +++ b/Content.Shared/Construction/ConstructionConditions/TileNotBlocked.cs @@ -1,6 +1,7 @@ using Content.Shared.Maps; using JetBrains.Annotations; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Serialization; @@ -13,7 +14,7 @@ namespace Content.Shared.Construction.ConstructionConditions private bool _filterMobs = false; private bool _failIfSpace = true; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _filterMobs, "filterMobs", false); serializer.DataField(ref _failIfSpace, "failIfSpace", true); diff --git a/Content.Shared/Construction/ConstructionConditions/TileType.cs b/Content.Shared/Construction/ConstructionConditions/TileType.cs index cbac83577b..b445c129e6 100644 --- a/Content.Shared/Construction/ConstructionConditions/TileType.cs +++ b/Content.Shared/Construction/ConstructionConditions/TileType.cs @@ -5,6 +5,7 @@ using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Serialization; using System.Collections.Generic; +using Robust.Shared.Interfaces.Serialization; namespace Content.Shared.Construction.ConstructionConditions { @@ -13,7 +14,8 @@ namespace Content.Shared.Construction.ConstructionConditions { public List TargetTiles { get; private set; } - public void ExposeData(ObjectSerializer serializer) + + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.TargetTiles, "targets", null); } diff --git a/Content.Shared/Construction/ConstructionGraphEdge.cs b/Content.Shared/Construction/ConstructionGraphEdge.cs index 87badee2f4..ea76f32109 100644 --- a/Content.Shared/Construction/ConstructionGraphEdge.cs +++ b/Content.Shared/Construction/ConstructionGraphEdge.cs @@ -31,7 +31,12 @@ namespace Content.Shared.Construction [ViewVariables] public IReadOnlyList Steps => _steps; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) + { + InternalExposeData(serializer); + } + + private void InternalExposeData(ObjectSerializer serializer) { var moduleManager = IoCManager.Resolve(); @@ -44,7 +49,7 @@ namespace Content.Shared.Construction public void LoadFrom(YamlMappingNode mapping) { var serializer = YamlObjectSerializer.NewReader(mapping); - ExposeData(serializer); + InternalExposeData(serializer); if (!mapping.TryGetNode("steps", out YamlSequenceNode stepsMapping)) return; diff --git a/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs b/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs index 4d86409a72..e24eea61e5 100644 --- a/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs +++ b/Content.Shared/GameObjects/Components/Buckle/SharedBuckleComponent.cs @@ -80,7 +80,7 @@ namespace Content.Shared.GameObjects.Components.Buckle return args.Target.HasComponent(); } - public bool Drop(DragDropEventArgs args) + bool IDraggable.Drop(DragDropEventArgs args) { return TryBuckle(args.User, args.Target); } diff --git a/Content.Shared/GameObjects/Components/Damage/DamageableComponent.cs b/Content.Shared/GameObjects/Components/Damage/DamageableComponent.cs index 548d546044..4e979c09f0 100644 --- a/Content.Shared/GameObjects/Components/Damage/DamageableComponent.cs +++ b/Content.Shared/GameObjects/Components/Damage/DamageableComponent.cs @@ -468,7 +468,7 @@ namespace Content.Shared.GameObjects.Components.Damage Dirty(); } - public void RadiationAct(float frameTime, SharedRadiationPulseComponent radiation) + void IRadiationAct.RadiationAct(float frameTime, SharedRadiationPulseComponent radiation) { var totalDamage = Math.Max((int)(frameTime * radiation.RadsPerSecond), 1); diff --git a/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs b/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs index dbdb325bea..ab44311f6b 100644 --- a/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs +++ b/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs @@ -59,7 +59,7 @@ namespace Content.Shared.GameObjects.Components.Materials public object Key; public string Value; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { if (serializer.Writing) { diff --git a/Content.Shared/GameObjects/Components/Medical/SharedMedicalScannerComponent.cs b/Content.Shared/GameObjects/Components/Medical/SharedMedicalScannerComponent.cs index e330d12b93..77f96cda59 100644 --- a/Content.Shared/GameObjects/Components/Medical/SharedMedicalScannerComponent.cs +++ b/Content.Shared/GameObjects/Components/Medical/SharedMedicalScannerComponent.cs @@ -80,7 +80,7 @@ namespace Content.Shared.GameObjects.Components.Medical } - public bool CanDragDropOn(DragDropEventArgs eventArgs) + bool IDragDropOn.CanDragDropOn(DragDropEventArgs eventArgs) { return eventArgs.Dragged.HasComponent(); } diff --git a/Content.Shared/GameObjects/Components/Mobs/ItemActionsComponent.cs b/Content.Shared/GameObjects/Components/Mobs/ItemActionsComponent.cs index fa599e8cb5..719c410cc4 100644 --- a/Content.Shared/GameObjects/Components/Mobs/ItemActionsComponent.cs +++ b/Content.Shared/GameObjects/Components/Mobs/ItemActionsComponent.cs @@ -181,7 +181,7 @@ namespace Content.Shared.GameObjects.Components.Mobs GrantOrUpdate(actionType, toggleOn: toggleOn); } - public void EquippedHand(EquippedHandEventArgs eventArgs) + void IEquippedHand.EquippedHand(EquippedHandEventArgs eventArgs) { // this entity cannot be granted actions if no actions component if (!eventArgs.User.TryGetComponent(out var actionsComponent)) @@ -193,7 +193,7 @@ namespace Content.Shared.GameObjects.Components.Mobs GrantOrUpdateAllToHolder(); } - public void Equipped(EquippedEventArgs eventArgs) + void IEquipped.Equipped(EquippedEventArgs eventArgs) { // this entity cannot be granted actions if no actions component if (!eventArgs.User.TryGetComponent(out var actionsComponent)) @@ -205,7 +205,7 @@ namespace Content.Shared.GameObjects.Components.Mobs GrantOrUpdateAllToHolder(); } - public void Unequipped(UnequippedEventArgs eventArgs) + void IUnequipped.Unequipped(UnequippedEventArgs eventArgs) { RevokeAllFromHolder(); Holder = null; @@ -215,7 +215,7 @@ namespace Content.Shared.GameObjects.Components.Mobs } - public void UnequippedHand(UnequippedHandEventArgs eventArgs) + void IUnequippedHand.UnequippedHand(UnequippedHandEventArgs eventArgs) { RevokeAllFromHolder(); Holder = null; @@ -236,7 +236,7 @@ namespace Content.Shared.GameObjects.Components.Mobs /// public bool Enabled { get; private set; } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(this, x => x.ActionType, "actionType", ItemActionType.Error); if (ActionType == ItemActionType.Error) diff --git a/Content.Shared/GameObjects/Components/Sound/SharedLoopingSoundComponent.cs b/Content.Shared/GameObjects/Components/Sound/SharedLoopingSoundComponent.cs index 262f5f8091..01d5a35f00 100644 --- a/Content.Shared/GameObjects/Components/Sound/SharedLoopingSoundComponent.cs +++ b/Content.Shared/GameObjects/Components/Sound/SharedLoopingSoundComponent.cs @@ -106,7 +106,7 @@ namespace Content.Shared.GameObjects.Components.Sound /// public bool Play = true; - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { if (serializer.Writing) return; diff --git a/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs b/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs index 2bdbc43363..81c81beb57 100644 --- a/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs +++ b/Content.Shared/GameObjects/Components/Storage/SharedStorageComponent.cs @@ -25,13 +25,13 @@ namespace Content.Shared.GameObjects.Components.Storage /// True if no longer in storage, false otherwise public abstract bool Remove(IEntity entity); - public bool CanDrop(CanDropEventArgs args) + bool IDraggable.CanDrop(CanDropEventArgs args) { return args.Target.TryGetComponent(out SharedPlaceableSurfaceComponent? placeable) && placeable.IsPlaceable; } - public bool Drop(DragDropEventArgs eventArgs) + bool IDraggable.Drop(DragDropEventArgs eventArgs) { if (!ActionBlockerSystem.CanInteract(eventArgs.User)) { diff --git a/Content.Shared/GameObjects/Components/Strap/SharedStrapComponent.cs b/Content.Shared/GameObjects/Components/Strap/SharedStrapComponent.cs index 66a5aa73d3..f06ce2ef32 100644 --- a/Content.Shared/GameObjects/Components/Strap/SharedStrapComponent.cs +++ b/Content.Shared/GameObjects/Components/Strap/SharedStrapComponent.cs @@ -33,7 +33,7 @@ namespace Content.Shared.GameObjects.Components.Strap public sealed override uint? NetID => ContentNetIDs.STRAP; - public virtual bool CanDragDropOn(DragDropEventArgs eventArgs) + bool IDragDropOn.CanDragDropOn(DragDropEventArgs eventArgs) { if (!eventArgs.Dragged.TryGetComponent(out SharedBuckleComponent buckleComponent)) return false; bool Ignored(IEntity entity) => entity == eventArgs.User || entity == eventArgs.Dragged || entity == eventArgs.Target; diff --git a/Content.Shared/Materials/Material.cs b/Content.Shared/Materials/Material.cs index 7fa7bb4bb4..a9455be0dd 100644 --- a/Content.Shared/Materials/Material.cs +++ b/Content.Shared/Materials/Material.cs @@ -93,7 +93,7 @@ namespace Content.Shared.Materials } } - public void ExposeData(ObjectSerializer serializer) + void IExposeData.ExposeData(ObjectSerializer serializer) { serializer.DataField(ref _name, "name", "unobtanium", alwaysWrite: true); serializer.DataField(ref _color, "color", Color.Gray, alwaysWrite: true); @@ -125,7 +125,7 @@ namespace Content.Shared.Materials var ser = YamlObjectSerializer.NewReader(mapping); Material = new Material(); - Material.ExposeData(ser); + ((IExposeData) Material).ExposeData(ser); } } }