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
@@ -11,9 +11,9 @@ using static Content.Shared.GameObjects.SharedInventoryComponent.ClientInventory
|
||||
using static Content.Shared.GameObjects.SharedInventoryComponent.ServerInventoryMessage;
|
||||
using SS14.Shared.IoC;
|
||||
using SS14.Server.Interfaces.Player;
|
||||
using SS14.Shared.GameObjects.Serialization;
|
||||
using SS14.Shared.ContentPack;
|
||||
using System.Linq;
|
||||
using SS14.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects
|
||||
{
|
||||
@@ -22,12 +22,15 @@ namespace Content.Server.GameObjects
|
||||
private Dictionary<Slots, ContainerSlot> SlotContainers = new Dictionary<Slots, ContainerSlot>();
|
||||
string TemplateName = "HumanInventory"; //stored for serialization purposes
|
||||
|
||||
public override void ExposeData(EntitySerializer serializer)
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataField(ref TemplateName, "Template", "HumanInventory");
|
||||
CreateInventory(TemplateName);
|
||||
if (serializer.Reading)
|
||||
{
|
||||
CreateInventory(TemplateName);
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateInventory(string TemplateName)
|
||||
|
||||
@@ -8,11 +8,11 @@ using SS14.Server.GameObjects;
|
||||
using SS14.Server.GameObjects.Components.Container;
|
||||
using SS14.Server.Interfaces.Player;
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.GameObjects.Serialization;
|
||||
using SS14.Shared.Input;
|
||||
using SS14.Shared.Interfaces.GameObjects;
|
||||
using SS14.Shared.Interfaces.Network;
|
||||
using SS14.Shared.IoC;
|
||||
using SS14.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.GameObjects
|
||||
{
|
||||
@@ -45,10 +45,11 @@ namespace Content.Server.GameObjects
|
||||
private InputCommand DropCommand;
|
||||
private InputCommand ActivateItemInHandCommand;
|
||||
|
||||
public override void ExposeData(EntitySerializer serializer)
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
// TODO: This does not serialize what objects are held.
|
||||
serializer.DataField(ref orderedHands, "hands", new List<string>(0));
|
||||
if (serializer.Reading)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user