Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
LoadedProjects.c
Go to the documentation of this file.
1class LoadedProjectsRequest : JsonApiStruct
2{
3 string path;
4
5 void LoadedProjectsRequest()
6 {
7 RegV("path");
8 }
9}
10
12{
14
16 {
17 RegV("resourceInProject");
18 }
19}
20
21
22class 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 {
68 response.resourceInProject = InLoadedProjects(req.path);
69 return response;
70 }
71
72}
string path
LoadedProjectsRequest resourceInProject
void LoadedProjectsResponse()
SCR_AICombatMoveRequestBase GetRequest()
base classes for filtering in server browser