DayZ 1.24
Loading...
Searching...
No Matches
CreditsLoader.c
Go to the documentation of this file.
2{
3 protected static const string JSON_FILE_PATH = "scripts/data/credits.json";
4
5 static void CreateTestJson()
6 {
7 string nameDepartment = "Department";
8 string nameSection = "Section";
9 string nameLine = "Line";
10
13
14 for (int index_dep = 0; index_dep < 3; ++index_dep)
15 {
18 department.DepartmentName = (nameDepartment + " " + index_dep);
19
20 for (int index_sec = 0; index_sec < 4; ++index_sec)
21 {
23 section.SectionLines = new array<string>;
24 section.SectionName = (nameSection + " " + index_sec);
25
26 int linesCount = Math.RandomInt(3, 10);
27 for (int i = 0; i < linesCount; ++i)
28 section.SectionLines.Insert(nameLine + " " + i);
29
30 department.Sections.Insert(section);
31 }
32
33 data.Departments.Insert(department);
34 }
35
36 string errorMessage;
39 }
40
51}
static void CreateTestJson()
static JsonDataCredits GetData()
static const string JSON_FILE_PATH
Definition EnMath.c:7
enum ShapeType ErrorEx
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].