Data Rework Content Edition (#82)
* WiP Data Rework. * Convert stationstation to new map format. * stationstation.yml v2 * Update submodule
This commit is contained in:
committed by
GitHub
parent
8c874c76dc
commit
b34591ab59
@@ -1,4 +1,4 @@
|
||||
using SS14.Shared.GameObjects.Serialization;
|
||||
using SS14.Shared.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -14,16 +14,18 @@ namespace Content.Server.GameObjects
|
||||
public SlotFlags SlotFlags = SlotFlags.PREVENTEQUIP; //Different from None, NONE allows equips if no slot flags are required
|
||||
private List<string> slotstrings = new List<string>(); //serialization
|
||||
|
||||
public override void ExposeData(EntitySerializer serializer)
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataField(ref slotstrings, "Slots", new List<string>(0));
|
||||
|
||||
foreach(var slotflagsloaded in slotstrings)
|
||||
// TODO: Writing.
|
||||
serializer.DataReadFunction("Slots", new List<string>(0), list =>
|
||||
{
|
||||
SlotFlags |= (SlotFlags)Enum.Parse(typeof(SlotFlags), slotflagsloaded.ToUpper());
|
||||
}
|
||||
foreach (var slotflagsloaded in slotstrings)
|
||||
{
|
||||
SlotFlags |= (SlotFlags)Enum.Parse(typeof(SlotFlags), slotflagsloaded.ToUpper());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ using SS14.Server.Interfaces.Player;
|
||||
using SS14.Server.Player;
|
||||
using SS14.Shared.Enums;
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.GameObjects.Serialization;
|
||||
using SS14.Shared.Interfaces.GameObjects;
|
||||
using SS14.Shared.Interfaces.Network;
|
||||
using SS14.Shared.IoC;
|
||||
using SS14.Shared.Log;
|
||||
using SS14.Shared.Serialization;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Content.Server.GameObjects
|
||||
@@ -34,7 +34,7 @@ namespace Content.Server.GameObjects
|
||||
storage = ContainerManagerComponent.Create<Container>("storagebase", Owner);
|
||||
}
|
||||
|
||||
public override void ExposeData(EntitySerializer serializer)
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.GameObjects.Serialization;
|
||||
using SS14.Shared.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -14,7 +14,7 @@ namespace Content.Server.GameObjects
|
||||
|
||||
public int ObjectSize = 0;
|
||||
|
||||
public override void ExposeData(EntitySerializer serializer)
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user