Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
ActionsManagerComponent.c
Go to the documentation of this file.
4
6{
7 #ifdef WORKBENCH
9 const string IGNORED_PREFIXES[] =
10 {
11 "v_",
12 "w_",
13 };
14
19 override protected string NicifyGeneratedContextName(string name)
20 {
21
22 // Check collider prefixes and cut them
23 foreach (auto prefix : IGNORED_PREFIXES)
24 {
25 if (name.StartsWith(prefix))
26 {
27 name.Replace(prefix, "");
28 break;
29 }
30 }
31
32 /*
33
34 If this block is uncommented, names will be nicified even more, eg.:
35
36 Inputs: w_bone_name
37 v_AnOtHerFaNcy_nAmINg
38
39 Outputs:
40 Bone Name
41 Anotherfancy Naming
42
43 // Split name into idividual words
44 array<string> words = new array<string>();
45
46 if (name.Contains("_"))
47 name.Split("_", words, true);
48 else
49 words.Insert(name);
50
51 // Go through each word in the list
52 // Cut the first letter, make it big
53 // Append the rest as lowercase
54 int wordsCount = words.Count();
55 for (int i = 0; i < wordsCount; i++)
56 {
57 string word = words[i];
58 int len = word.Length();
59 if (len > 0)
60 {
61 string start = word.Get(0);
62 start.ToUpper();
63 string rem = word.Substring(1, len-1);
64 rem.ToLower();
65
66 words[i] = start + rem;
67 }
68 }
69
70 // Reconstruct the string
71 if (wordsCount > 0)
72 {
73 // Clear the out name
74 name = "";
75
76 // Append all other names
77 for (int i = 0; i < wordsCount; i++)
78 {
79
81 if (i != wordsCount-1)
82 name += words[i] + " ";
83 else
84 name += words[i];
85 }
86 }
87 */
88
89 return name;
90 }
91 #endif
92};