Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
pluginlocalhistorybase.c
Go to the documentation of this file.
2{
4 {
5 m_ReadOnly = false;
6 }
7
9 {
10 }
11
12 override void OnInit()
13 {
14 super.OnInit();
15 }
16
17 override string GetFileName()
18 {
19 Error( "Cannot call GetFileName on Base class PluginLocalHistoryBase" );
20 return STRING_EMPTY;
21 }
22
23 void AddNewLine(string text)
24 {
25 // replace newline to \\n
26 text.Replace("\n", "\\n" );
27 m_FileContent.Insert(text);
28 SaveFile();
29 }
30
31 TStringArray GetAllLines()
32 {
33 // replace \\n to new line
34 TStringArray console_history = new TStringArray;
35 for ( int i = 0; i < m_FileContent.Count(); i++)
36 {
37 string history_record = m_FileContent.Get(i);
38 history_record.Replace("\\n", "\n");
39 console_history.Insert( history_record );
40 }
41 return console_history;
42 }
43
44 TStringArray GetLastLine()
45 {
46 int count = m_FileContent.Count();
47 string ret = "";
48
49 if ( count > 0 )
50 {
51 ret = m_FileContent.Get(count - 1);
52 }
53
54 return NULL;
55 }
56}
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void Error(string err)
Messagebox with error message.
Definition endebug.c:90
array< string > TStringArray
Definition enscript.c:709
void OnInit()
Callback for user defined initialization. Called for all suites during TestHarness....
Definition freezestate.c:81
const string STRING_EMPTY
Definition constants.c:54