|
|
@@ -22,6 +22,8 @@ namespace GamecraftModdingAPI.Persistence |
|
|
|
public static void Prefix(ref ISerializationData ____serializationData, ref FasterList<byte> ____bytesStream, ref IEntitySerialization ____entitySerializer, bool ____spawnBlocksOnly) |
|
|
|
{ |
|
|
|
if (____spawnBlocksOnly) return; // only run after second deserialization call (when all vanilla stuff is already deserialized) |
|
|
|
if (SaveAndLoadCompositionRootPatch.currentEnginesRoot == null) return; |
|
|
|
SerializerManager.RegisterSerializers(SaveAndLoadCompositionRootPatch.currentEnginesRoot); |
|
|
|
uint originalPos = ____serializationData.dataPos; |
|
|
|
Logging.MetaDebugLog($"dataPos: {originalPos}"); |
|
|
|
BinaryBufferReader bbr = new BinaryBufferReader(____bytesStream.ToArrayFast(out uint count), ____serializationData.dataPos); |
|
|
|