NorbiPeti
f403feb298
Removed BlockIdentifiers.OWNED_BLOCKS as the original got replaced with an array Added the correct group for each supported functional block Removed EntityFactory property from IEntitySerializer as it is provided on deserialization
32 lines
1.4 KiB
C#
32 lines
1.4 KiB
C#
using System;
|
|
|
|
using Svelto.ECS;
|
|
using Svelto.ECS.Serialization;
|
|
|
|
using GamecraftModdingAPI.Utility;
|
|
|
|
namespace GamecraftModdingAPI.Persistence
|
|
{
|
|
/// <summary>
|
|
/// Entity serializer and deserializer interface for storing and retrieving data in a Gamecraft save file (GameSave.GC).
|
|
/// </summary>
|
|
public interface IEntitySerializer : IDeserializationFactory, IQueryingEntitiesEngine
|
|
{
|
|
/// <summary>
|
|
/// Serialize the entities.
|
|
/// </summary>
|
|
/// <returns>Whether serialization was successful.</returns>
|
|
/// <param name="serializationData">Serialized data to write to (writes to GameSave.GC).</param>
|
|
/// <param name="entitiesDB">Entities db for the game.</param>
|
|
/// <param name="entitySerializer">Entity serializer with support for single-entity serialization.</param>
|
|
bool Serialize(ref ISerializationData serializationData, EntitiesDB entitiesDB, IEntitySerialization entitySerializer);
|
|
|
|
/// <summary>
|
|
/// Deserialize the entities.
|
|
/// </summary>
|
|
/// <returns>Whether deserialization was successful.</returns>
|
|
/// <param name="serializationData">Serialized data to read from (read from GameSave.GC).</param>
|
|
/// <param name="entitySerializer">Entity serializer with support for single-entity deserialization.</param>
|
|
bool Deserialize(ref ISerializationData serializationData, IEntitySerialization entitySerializer);
|
|
}
|
|
}
|