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

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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<bool> Condition(IEntity entity)
{

View File

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

View File

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