explicit interface go brrrr

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

View File

@@ -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<ActsFlags>());
}

View File

@@ -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);
}

View File

@@ -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
/// </summary>
public string Sound { get; set; }
public void ExposeData(ObjectSerializer serializer)
void IExposeData.ExposeData(ObjectSerializer serializer)
{
serializer.DataField(this, x => x.Sound, "sound", string.Empty);
}

View File

@@ -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
/// </summary>
private string SoundCollection { get; set; }
public void ExposeData(ObjectSerializer serializer)
void IExposeData.ExposeData(ObjectSerializer serializer)
{
serializer.DataField(this, x => x.SoundCollection, "soundCollection", string.Empty);
}

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Stack;
using Content.Server.GameObjects.EntitySystems;
using Content.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
/// </summary>
public Dictionary<string, MinMax> Spawn { get; set; } = new();
public void ExposeData(ObjectSerializer serializer)
void IExposeData.ExposeData(ObjectSerializer serializer)
{
serializer.DataField(this, x => x.Spawn, "spawn", new Dictionary<string, MinMax>());
}

View File

@@ -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)
{

View File

@@ -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);

View File

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