mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-03 02:27:08 +02:00
19 lines
621 B
C#
19 lines
621 B
C#
using Robust.Shared.IoC;
|
|
using Robust.Shared.Serialization;
|
|
using System;
|
|
|
|
namespace Robust.Client.Serialization;
|
|
|
|
internal sealed partial class ClientRobustSerializer : RobustSerializer, IClientRobustSerializer
|
|
{
|
|
[Dependency] private readonly IBaseClient _client = default!;
|
|
|
|
public void SetStringSerializerPackage(byte[] hash, byte[] package)
|
|
{
|
|
if (_client.RunLevel != ClientRunLevel.SinglePlayerGame)
|
|
throw new NotSupportedException("Directly setting string serializer data is only supported in single-player games.");
|
|
|
|
MappedStringSerializer.SetPackage(hash, package);
|
|
}
|
|
}
|