explicit interface go brrrr
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user