Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
pluginlocalhistorybase.c
Go to the documentation of this file.
1
class
PluginLocalHistoryBase
extends
PluginFileHandler
2
{
3
void
PluginLocalHistoryBase
()
4
{
5
m_ReadOnly =
false
;
6
}
7
8
void
~PluginLocalHistoryBase
()
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
}
PluginFileHandler
Definition
pluginconfighandler.c:2
PluginFileHandler::OnInit
override void OnInit()
Definition
pluginlocalhistorybase.c:12
PluginFileHandler::~PluginLocalHistoryBase
void ~PluginLocalHistoryBase()
Definition
pluginlocalhistorybase.c:8
PluginFileHandler::PluginLocalHistoryBase
void PluginLocalHistoryBase()
Definition
pluginlocalhistorybase.c:3
PluginFileHandler::GetFileName
override string GetFileName()
Definition
pluginlocalhistorybase.c:17
PluginFileHandler::GetLastLine
TStringArray GetLastLine()
Definition
pluginlocalhistorybase.c:44
PluginFileHandler::AddNewLine
void AddNewLine(string text)
Definition
pluginlocalhistorybase.c:23
PluginFileHandler::GetAllLines
TStringArray GetAllLines()
Definition
pluginlocalhistorybase.c:31
PluginLocalHistoryBase
Definition
pluginlocalenscripthistory.c:2
Error
void Error(string err)
Messagebox with error message.
Definition
endebug.c:90
TStringArray
array< string > TStringArray
Definition
enscript.c:712
STRING_EMPTY
const string STRING_EMPTY
Definition
constants.c:54
string::Get
proto string Get(int index)
Gets n-th character from string.
string::Replace
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.
Games
Dayz
scripts
4_world
plugins
pluginbase
pluginfilehandler
pluginlocalhistorybase.c
Generated by
1.17.0