KF2-Server-Extension/ServerExt/Classes/ExtSaveDataBase.uc

43 lines
1.2 KiB
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
// Serialization system in UnrealScript, written by Marco.
Interface ExtSaveDataBase;
// File accessor helpers.
// MaxVal for integers are as follow (the lower number you use, the less bits will be reserved):
/* 0: 0-255
1: 0-65535
2: 0-16777215
3: -2147483647 - 2147483647
*/
2020-11-28 20:04:55 +00:00
function SaveInt(int Value, optional byte MaxVal);
function int ReadInt(optional byte MaxVal);
function SaveStr(string S);
2017-10-20 02:00:49 +00:00
function string ReadStr();
// File offset management.
function int TellOffset();
2020-11-28 20:04:55 +00:00
function SeekOffset(int Offset);
2017-10-20 02:00:49 +00:00
function int TotalSize();
function ToEnd();
function ToStart();
function bool AtEnd();
2020-11-28 20:04:55 +00:00
function SkipBytes(int Count);
2017-10-20 02:00:49 +00:00
// Wipe out any saved data.
function FlushData();
// Get file contents in a byte array line.
2020-11-28 20:04:55 +00:00
function GetData(out array<byte> Res);
function SetData(out array<byte> S);
2017-10-20 02:00:49 +00:00
// Archive version (to allow modder to make upgraded stat binarily compatible)
function int GetArVer();
2020-11-28 20:04:55 +00:00
function SetArVer(int Ver);
2017-10-20 02:00:49 +00:00
// Push/Pop file limitators (to prevent it from reading EoF in sub sections).
2020-11-28 20:04:55 +00:00
function PushEOFLimit(int EndOffset);
2017-10-20 02:00:49 +00:00
function PopEOFLimit();
// Get most recent save version for this user.
function int GetSaveVersion();
2020-11-28 20:04:55 +00:00
function SetSaveVersion(int Num);