46 lines
1012 B
Ucode
Raw Normal View History

2017-10-19 21:00:49 -05:00
Class ExtXMLOutput extends FileWriter implements(ExtStatWriter);
var transient string Intendent;
var transient array<string> StackedSect;
event PreBeginPlay();
2020-11-28 23:04:55 +03:00
final function DumpXML(ExtPerkManager M)
2017-10-19 21:00:49 -05:00
{
OpenFile(class'OnlineSubsystem'.Static.UniqueNetIdToString(M.PRIOwner.UniqueId),FWFT_Stats,".xml",false);
M.OutputXML(Self);
CloseFile();
ResetFile();
}
2020-11-28 23:04:55 +03:00
function WriteValue(string Key, string Value)
2017-10-19 21:00:49 -05:00
{
Logf(Intendent$"<"$Key$">"$Value$"</"$Key$">");
}
2020-11-29 00:54:57 +03:00
2020-11-28 23:04:55 +03:00
function StartIntendent(string Section, optional string Key, optional string Value)
2017-10-19 21:00:49 -05:00
{
2020-11-28 23:12:58 +03:00
if (Key!="")
2017-10-19 21:00:49 -05:00
Logf(Intendent$"-<"$Section$" "$Key$"=\""$Value$"\">");
else Logf(Intendent$"-<"$Section$">");
Intendent $= Chr(9);
StackedSect.AddItem(Section);
}
2020-11-29 00:54:57 +03:00
2017-10-19 21:00:49 -05:00
function EndIntendent()
{
Intendent = Left(Intendent,Len(Intendent)-1);
Logf(Intendent$"</"$StackedSect[StackedSect.Length-1]$">");
StackedSect.Remove(StackedSect.Length-1,1);
}
2020-11-29 00:54:57 +03:00
2017-10-19 21:00:49 -05:00
function ResetFile()
{
Intendent = "";
StackedSect.Length = 0;
}
defaultproperties
{
bFlushEachWrite=false
}