DayZ 1.24
Loading...
Searching...
No Matches
CreditsLoader Class Reference
Collaboration diagram for CreditsLoader:
[legend]

Static Protected Member Functions

static void CreateTestJson ()
 
static JsonDataCredits GetData ()
 

Static Protected Attributes

static const string JSON_FILE_PATH = "scripts/data/credits.json"
 

Detailed Description

Definition at line 1 of file CreditsLoader.c.

Member Function Documentation

◆ CreateTestJson()

static void CreditsLoader::CreateTestJson ( )
inlinestaticprotected

Definition at line 5 of file CreditsLoader.c.

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 }
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].

References ErrorEx, JSON_FILE_PATH, and Math::RandomInt().

◆ GetData()

static JsonDataCredits CreditsLoader::GetData ( )
inlinestaticprotected

Definition at line 41 of file CreditsLoader.c.

References ErrorEx, and JSON_FILE_PATH.

Referenced by UIScriptedMenu::LoadDataAsync().

Member Data Documentation

◆ JSON_FILE_PATH

const string CreditsLoader::JSON_FILE_PATH = "scripts/data/credits.json"
staticprotected

Definition at line 3 of file CreditsLoader.c.

Referenced by CreateTestJson(), and GetData().


The documentation for this class was generated from the following file: