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

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

View File

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

View File

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

View File

@@ -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<string> TargetTiles { get; private set; }
public void ExposeData(ObjectSerializer serializer)
void IExposeData.ExposeData(ObjectSerializer serializer)
{
serializer.DataField(this, x => x.TargetTiles, "targets", null);
}

View File

@@ -31,7 +31,12 @@ namespace Content.Shared.Construction
[ViewVariables]
public IReadOnlyList<ConstructionGraphStep> Steps => _steps;
public void ExposeData(ObjectSerializer serializer)
void IExposeData.ExposeData(ObjectSerializer serializer)
{
InternalExposeData(serializer);
}
private void InternalExposeData(ObjectSerializer serializer)
{
var moduleManager = IoCManager.Resolve<IModuleManager>();
@@ -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;