Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
LoadedProjects.c
Go to the documentation of this file.
1
class
LoadedProjectsRequest :
JsonApiStruct
2
{
3
string
path;
4
5
void
LoadedProjectsRequest()
6
{
7
RegV(
"path"
);
8
}
9
}
10
11
class
LoadedProjectsResponse
:
JsonApiStruct
12
{
13
bool
resourceInProject
;
14
15
void
LoadedProjectsResponse
()
16
{
17
RegV(
"resourceInProject"
);
18
}
19
}
20
21
22
class
LoadedProjects
: NetApiHandler
23
{
24
override
JsonApiStruct
GetRequest
()
25
{
26
return
new
LoadedProjectsRequest
();
27
}
28
29
static
bool
InLoadedProjects(
string
path
)
30
{
31
array<string> addons =
new
array<string>;
32
//Get GUIDs of loaded addons
33
GameProject
.GetLoadedAddons(addons);
34
string
addonName, absPath;
35
//Go throught the addons
36
for
(
int
i = 0; i < addons.Count(); i++)
37
{
38
//ID from the GUID
39
addonName =
GameProject
.GetAddonID(addons[i]);
40
//Find AbsPath to gproj
41
Workbench.GetAbsolutePath(
"$"
+ addonName +
":"
, absPath,
false
);
42
//TotalCommander uses small letters for disks so the path would be in lowercase as well
43
absPath.ToLower();
44
path
.ToLower();
45
if
(absPath !=
""
)
46
{
47
absPath = absPath.Substring(0, absPath.Length() - 1);
48
}
49
//If fbx path contains the gproj path
50
if
(
path
.Contains(absPath) && absPath !=
""
)
51
{
52
return
(
true
);
53
}
54
absPath.Replace(
"/"
,
"\\"
);
55
if
(
path
.Contains(absPath) && absPath !=
""
)
56
{
57
return
(
true
);
58
}
59
}
60
return
(
false
);
61
62
}
63
64
override
JsonApiStruct
GetResponse(
JsonApiStruct
request)
65
{
66
LoadedProjectsRequest
req =
LoadedProjectsRequest
.Cast(request);
67
LoadedProjectsResponse
response =
new
LoadedProjectsResponse
();
68
response.resourceInProject = InLoadedProjects(req.path);
69
return
response;
70
}
71
72
}
path
string path
Definition
AddonBuildInfoTool.c:249
resourceInProject
LoadedProjectsRequest resourceInProject
LoadedProjectsResponse
void LoadedProjectsResponse()
Definition
LoadedProjects.c:15
GetRequest
SCR_AICombatMoveRequestBase GetRequest()
Definition
SCR_AICombatMoveState.c:137
GameProject
Definition
GameProject.c:13
JsonApiStruct
base classes for filtering in server browser
Definition
SCR_FeedbackDialogUI.c:3
LoadedProjects
Definition
LoadedProjects.c:23
LoadedProjectsRequest
Definition
LoadedProjects.c:2
scripts
WorkbenchGameCommon
EnfusionBlenderTools
LoadedProjects.c
Generated by
1.17.0