warframe-worldstate-data 3.1.12 → 3.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/package.json +1 -1
  2. package/.commitlintrc.mjs +0 -6
  3. package/.husky/commit-msg +0 -1
  4. package/.husky/pre-commit +0 -1
  5. package/.lintstagedrc.yml +0 -12
  6. package/.mocharc.yml +0 -7
  7. package/.nvmrc +0 -1
  8. package/.nycrc.json +0 -7
  9. package/babel.config.json +0 -4
  10. package/biome.json +0 -51
  11. package/data/arcanes.json +0 -461
  12. package/data/archonShards.json +0 -224
  13. package/data/conclaveData.json +0 -425
  14. package/data/cs/arcanes.json +0 -461
  15. package/data/cs/archonShards.json +0 -224
  16. package/data/cs/conclaveData.json +0 -425
  17. package/data/cs/eventsData.json +0 -27
  18. package/data/cs/factionsData.json +0 -32
  19. package/data/cs/fissureModifiers.json +0 -26
  20. package/data/cs/languages.json +0 -19595
  21. package/data/cs/missionTypes.json +0 -80
  22. package/data/cs/operationTypes.json +0 -6
  23. package/data/cs/persistentEnemyData.json +0 -21
  24. package/data/cs/solNodes.json +0 -2242
  25. package/data/cs/sortieData.json +0 -4253
  26. package/data/cs/steelPath.json +0 -114
  27. package/data/cs/syndicatesData.json +0 -86
  28. package/data/cs/synthTargets.json +0 -1262
  29. package/data/cs/tutorials.json +0 -17
  30. package/data/cs/upgradeTypes.json +0 -14
  31. package/data/de/arcanes.json +0 -461
  32. package/data/de/archonShards.json +0 -224
  33. package/data/de/conclaveData.json +0 -425
  34. package/data/de/eventsData.json +0 -27
  35. package/data/de/factionsData.json +0 -32
  36. package/data/de/fissureModifiers.json +0 -26
  37. package/data/de/languages.json +0 -19595
  38. package/data/de/missionTypes.json +0 -80
  39. package/data/de/operationTypes.json +0 -6
  40. package/data/de/persistentEnemyData.json +0 -21
  41. package/data/de/solNodes.json +0 -2242
  42. package/data/de/sortieData.json +0 -4253
  43. package/data/de/steelPath.json +0 -114
  44. package/data/de/syndicatesData.json +0 -86
  45. package/data/de/synthTargets.json +0 -1262
  46. package/data/de/tutorials.json +0 -17
  47. package/data/de/upgradeTypes.json +0 -14
  48. package/data/es/arcanes.json +0 -461
  49. package/data/es/archonShards.json +0 -224
  50. package/data/es/conclaveData.json +0 -425
  51. package/data/es/eventsData.json +0 -27
  52. package/data/es/factionsData.json +0 -32
  53. package/data/es/fissureModifiers.json +0 -26
  54. package/data/es/languages.json +0 -19595
  55. package/data/es/missionTypes.json +0 -80
  56. package/data/es/operationTypes.json +0 -6
  57. package/data/es/persistentEnemyData.json +0 -21
  58. package/data/es/solNodes.json +0 -2242
  59. package/data/es/sortieData.json +0 -4253
  60. package/data/es/steelPath.json +0 -114
  61. package/data/es/syndicatesData.json +0 -86
  62. package/data/es/synthTargets.json +0 -1262
  63. package/data/es/tutorials.json +0 -17
  64. package/data/es/upgradeTypes.json +0 -14
  65. package/data/eventsData.json +0 -27
  66. package/data/factionsData.json +0 -32
  67. package/data/fissureModifiers.json +0 -26
  68. package/data/fr/arcanes.json +0 -461
  69. package/data/fr/archonShards.json +0 -224
  70. package/data/fr/conclaveData.json +0 -425
  71. package/data/fr/eventsData.json +0 -27
  72. package/data/fr/factionsData.json +0 -32
  73. package/data/fr/fissureModifiers.json +0 -26
  74. package/data/fr/languages.json +0 -19595
  75. package/data/fr/missionTypes.json +0 -80
  76. package/data/fr/operationTypes.json +0 -6
  77. package/data/fr/persistentEnemyData.json +0 -21
  78. package/data/fr/solNodes.json +0 -2242
  79. package/data/fr/sortieData.json +0 -4253
  80. package/data/fr/steelPath.json +0 -114
  81. package/data/fr/syndicatesData.json +0 -86
  82. package/data/fr/synthTargets.json +0 -1262
  83. package/data/fr/tutorials.json +0 -17
  84. package/data/fr/upgradeTypes.json +0 -14
  85. package/data/index.html +0 -13
  86. package/data/it/arcanes.json +0 -461
  87. package/data/it/archonShards.json +0 -224
  88. package/data/it/conclaveData.json +0 -425
  89. package/data/it/eventsData.json +0 -27
  90. package/data/it/factionsData.json +0 -32
  91. package/data/it/fissureModifiers.json +0 -26
  92. package/data/it/languages.json +0 -19595
  93. package/data/it/missionTypes.json +0 -80
  94. package/data/it/operationTypes.json +0 -6
  95. package/data/it/persistentEnemyData.json +0 -21
  96. package/data/it/solNodes.json +0 -2242
  97. package/data/it/sortieData.json +0 -4253
  98. package/data/it/steelPath.json +0 -114
  99. package/data/it/syndicatesData.json +0 -86
  100. package/data/it/synthTargets.json +0 -1262
  101. package/data/it/tutorials.json +0 -17
  102. package/data/it/upgradeTypes.json +0 -14
  103. package/data/ko/arcanes.json +0 -461
  104. package/data/ko/archonShards.json +0 -224
  105. package/data/ko/conclaveData.json +0 -425
  106. package/data/ko/eventsData.json +0 -27
  107. package/data/ko/factionsData.json +0 -32
  108. package/data/ko/fissureModifiers.json +0 -26
  109. package/data/ko/languages.json +0 -19595
  110. package/data/ko/missionTypes.json +0 -80
  111. package/data/ko/operationTypes.json +0 -6
  112. package/data/ko/persistentEnemyData.json +0 -21
  113. package/data/ko/solNodes.json +0 -2242
  114. package/data/ko/sortieData.json +0 -4253
  115. package/data/ko/steelPath.json +0 -114
  116. package/data/ko/syndicatesData.json +0 -86
  117. package/data/ko/synthTargets.json +0 -1262
  118. package/data/ko/tutorials.json +0 -17
  119. package/data/ko/upgradeTypes.json +0 -14
  120. package/data/languages.json +0 -19595
  121. package/data/missionTypes.json +0 -80
  122. package/data/operationTypes.json +0 -6
  123. package/data/persistentEnemyData.json +0 -21
  124. package/data/pl/arcanes.json +0 -461
  125. package/data/pl/archonShards.json +0 -224
  126. package/data/pl/conclaveData.json +0 -425
  127. package/data/pl/eventsData.json +0 -27
  128. package/data/pl/factionsData.json +0 -32
  129. package/data/pl/fissureModifiers.json +0 -26
  130. package/data/pl/languages.json +0 -19595
  131. package/data/pl/missionTypes.json +0 -80
  132. package/data/pl/operationTypes.json +0 -6
  133. package/data/pl/persistentEnemyData.json +0 -21
  134. package/data/pl/solNodes.json +0 -2242
  135. package/data/pl/sortieData.json +0 -4253
  136. package/data/pl/steelPath.json +0 -114
  137. package/data/pl/syndicatesData.json +0 -86
  138. package/data/pl/synthTargets.json +0 -1262
  139. package/data/pl/tutorials.json +0 -17
  140. package/data/pl/upgradeTypes.json +0 -14
  141. package/data/pt/arcanes.json +0 -461
  142. package/data/pt/archonShards.json +0 -224
  143. package/data/pt/conclaveData.json +0 -425
  144. package/data/pt/eventsData.json +0 -27
  145. package/data/pt/factionsData.json +0 -32
  146. package/data/pt/fissureModifiers.json +0 -26
  147. package/data/pt/languages.json +0 -19595
  148. package/data/pt/missionTypes.json +0 -80
  149. package/data/pt/operationTypes.json +0 -6
  150. package/data/pt/persistentEnemyData.json +0 -21
  151. package/data/pt/solNodes.json +0 -2242
  152. package/data/pt/sortieData.json +0 -4253
  153. package/data/pt/steelPath.json +0 -114
  154. package/data/pt/syndicatesData.json +0 -86
  155. package/data/pt/synthTargets.json +0 -1262
  156. package/data/pt/tutorials.json +0 -17
  157. package/data/pt/upgradeTypes.json +0 -14
  158. package/data/ru/arcanes.json +0 -461
  159. package/data/ru/archonShards.json +0 -224
  160. package/data/ru/conclaveData.json +0 -425
  161. package/data/ru/eventsData.json +0 -27
  162. package/data/ru/factionsData.json +0 -32
  163. package/data/ru/fissureModifiers.json +0 -26
  164. package/data/ru/languages.json +0 -19595
  165. package/data/ru/missionTypes.json +0 -80
  166. package/data/ru/operationTypes.json +0 -6
  167. package/data/ru/persistentEnemyData.json +0 -21
  168. package/data/ru/solNodes.json +0 -2242
  169. package/data/ru/sortieData.json +0 -4253
  170. package/data/ru/steelPath.json +0 -114
  171. package/data/ru/syndicatesData.json +0 -86
  172. package/data/ru/synthTargets.json +0 -1262
  173. package/data/ru/tutorials.json +0 -17
  174. package/data/ru/upgradeTypes.json +0 -14
  175. package/data/solNodes.json +0 -2242
  176. package/data/sortieData.json +0 -4253
  177. package/data/sr/arcanes.json +0 -461
  178. package/data/sr/archonShards.json +0 -224
  179. package/data/sr/conclaveData.json +0 -425
  180. package/data/sr/eventsData.json +0 -27
  181. package/data/sr/factionsData.json +0 -32
  182. package/data/sr/fissureModifiers.json +0 -26
  183. package/data/sr/languages.json +0 -19595
  184. package/data/sr/missionTypes.json +0 -80
  185. package/data/sr/operationTypes.json +0 -6
  186. package/data/sr/persistentEnemyData.json +0 -21
  187. package/data/sr/solNodes.json +0 -2242
  188. package/data/sr/sortieData.json +0 -4253
  189. package/data/sr/steelPath.json +0 -114
  190. package/data/sr/syndicatesData.json +0 -86
  191. package/data/sr/synthTargets.json +0 -1262
  192. package/data/sr/tutorials.json +0 -17
  193. package/data/sr/upgradeTypes.json +0 -14
  194. package/data/steelPath.json +0 -33
  195. package/data/syndicatesData.json +0 -86
  196. package/data/synthTargets.json +0 -1262
  197. package/data/tr/arcanes.json +0 -461
  198. package/data/tr/archonShards.json +0 -224
  199. package/data/tr/conclaveData.json +0 -425
  200. package/data/tr/eventsData.json +0 -27
  201. package/data/tr/factionsData.json +0 -32
  202. package/data/tr/fissureModifiers.json +0 -26
  203. package/data/tr/languages.json +0 -19595
  204. package/data/tr/missionTypes.json +0 -80
  205. package/data/tr/operationTypes.json +0 -6
  206. package/data/tr/persistentEnemyData.json +0 -21
  207. package/data/tr/solNodes.json +0 -2242
  208. package/data/tr/sortieData.json +0 -4253
  209. package/data/tr/steelPath.json +0 -114
  210. package/data/tr/syndicatesData.json +0 -86
  211. package/data/tr/synthTargets.json +0 -1262
  212. package/data/tr/tutorials.json +0 -17
  213. package/data/tr/upgradeTypes.json +0 -14
  214. package/data/tutorials.json +0 -17
  215. package/data/uk/arcanes.json +0 -461
  216. package/data/uk/archonShards.json +0 -224
  217. package/data/uk/conclaveData.json +0 -425
  218. package/data/uk/eventsData.json +0 -27
  219. package/data/uk/factionsData.json +0 -32
  220. package/data/uk/fissureModifiers.json +0 -26
  221. package/data/uk/languages.json +0 -19595
  222. package/data/uk/missionTypes.json +0 -80
  223. package/data/uk/operationTypes.json +0 -6
  224. package/data/uk/persistentEnemyData.json +0 -21
  225. package/data/uk/solNodes.json +0 -2242
  226. package/data/uk/sortieData.json +0 -4253
  227. package/data/uk/steelPath.json +0 -114
  228. package/data/uk/syndicatesData.json +0 -86
  229. package/data/uk/synthTargets.json +0 -1262
  230. package/data/uk/tutorials.json +0 -17
  231. package/data/uk/upgradeTypes.json +0 -14
  232. package/data/upgradeTypes.json +0 -14
  233. package/data/zh/arcanes.json +0 -461
  234. package/data/zh/archonShards.json +0 -224
  235. package/data/zh/conclaveData.json +0 -425
  236. package/data/zh/eventsData.json +0 -27
  237. package/data/zh/factionsData.json +0 -32
  238. package/data/zh/fissureModifiers.json +0 -26
  239. package/data/zh/languages.json +0 -19595
  240. package/data/zh/missionTypes.json +0 -80
  241. package/data/zh/operationTypes.json +0 -6
  242. package/data/zh/persistentEnemyData.json +0 -21
  243. package/data/zh/solNodes.json +0 -2242
  244. package/data/zh/sortieData.json +0 -4253
  245. package/data/zh/steelPath.json +0 -114
  246. package/data/zh/syndicatesData.json +0 -86
  247. package/data/zh/synthTargets.json +0 -1262
  248. package/data/zh/tutorials.json +0 -17
  249. package/data/zh/upgradeTypes.json +0 -14
  250. package/exports.ts +0 -153
  251. package/safeImport.ts +0 -24
  252. package/tools/integrity.ts +0 -16
  253. package/tools/sortLanguages.ts +0 -44
  254. package/tools/timeDate.ts +0 -129
  255. package/tools/translation.ts +0 -430
  256. package/tools/utilities.ts +0 -5
  257. package/tsconfig.json +0 -13
  258. package/tsdown.config.ts +0 -15
  259. package/types.ts +0 -70
@@ -1,430 +0,0 @@
1
- import data, { WorldstateLangBundle, type Locale } from '../exports';
2
- import { ArchonShard, SolNode, Conclave, SteelPath } from '../types';
3
-
4
- /**
5
- * Rough Titlecase!
6
- * @param {string} str string to be titlecased
7
- * @returns {string} titlecased string
8
- */
9
- export const toTitleCase = (str: string): string => {
10
- return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase());
11
- };
12
-
13
- /**
14
- * Utility function to split the resource name and return somewhat human-readable string
15
- * @param {string} str localization resource key
16
- * @returns {string} human-readable string
17
- */
18
- export const splitResourceName = (str: string): string =>
19
- str
20
- .split(/([A-Z]?[^A-Z]*)/g)
21
- .filter(Boolean)
22
- .join(' ');
23
-
24
- export const lastResourceName = (str: string | undefined) => (str ? str.split?.('/').reverse()[0] : str);
25
-
26
- const i18n = (locale: Locale = 'en') => data[locale] || data;
27
-
28
- const keyInData = <T>(key: keyof WorldstateLangBundle, dataOverride?: Locale): T =>
29
- key in i18n(dataOverride) ? (i18n(dataOverride)[key] as T) : (key as T);
30
-
31
- /**
32
- *
33
- * @param {string} color - The internal color name
34
- * @param {string} dataOverride locale for use with translation
35
- * @returns {Object | undefined}
36
- */
37
- export const archonShard = (color: string, dataOverride: Locale = 'en') => {
38
- return keyInData<Record<string, ArchonShard>>('archonShards', dataOverride)[color] as ArchonShard;
39
- };
40
-
41
- /**
42
- *
43
- * @param {string} color - The internal color name
44
- * @param {string} dataOverride locale for use with translation
45
- * @returns {string}
46
- */
47
- export const archonShardColor = (color: string, dataOverride: Locale = 'en'): string =>
48
- archonShard(color, dataOverride)?.value ?? color;
49
-
50
- /**
51
- *
52
- * @param {string} color - The internal color name
53
- * @param {string} upgradeType - The upgrade type
54
- * @param {string} dataOverride locale for use with translation
55
- * @returns {string}
56
- */
57
- export const archonShardUpgradeType = (color: string, upgradeType: string, dataOverride: Locale = 'en'): string =>
58
- archonShard(color, dataOverride)?.upgradeTypes[upgradeType]?.value ?? lastResourceName(upgradeType);
59
-
60
- /**
61
- *
62
- * @param {string} key - The data key
63
- * @param {string} dataOverride locale for use with translation
64
- * @returns {string} faction name
65
- */
66
- export const faction = (key: string, dataOverride: Locale = 'en'): string =>
67
- keyInData<Record<string, { value: string }>>('factions', dataOverride)[key]?.value ?? key;
68
-
69
- const solNode = (key: string, thing: keyof SolNode, dataOverride: Locale = 'en') =>
70
- keyInData<Record<string, SolNode>>('solNodes', dataOverride)?.[key]?.[thing] ?? lastResourceName(key) ?? key;
71
-
72
- /**
73
- *
74
- * @param {string} key - The data key
75
- * @param {string} dataOverride locale for use with translation
76
- * @returns {string} node name
77
- */
78
- export const node = (key: string, dataOverride: Locale = 'en'): string => solNode(key, 'value', dataOverride);
79
-
80
- /**
81
- *
82
- * @param {string} key - The data key
83
- * @param {string} dataOverride locale for use with translation
84
- * @returns {string} mission type of the node
85
- */
86
- export const nodeMissionType = (key: string, dataOverride: Locale = 'en'): string => solNode(key, 'type', dataOverride);
87
- /**
88
- *
89
- * @param {string} key - The data key
90
- * @param {string} dataOverride locale for use with translation
91
- * @returns {string} faction that controls the node
92
- */
93
- export const nodeEnemy = (key: string, dataOverride: Locale = 'en'): string => {
94
- return key in i18n(dataOverride).solNodes ? i18n(dataOverride).solNodes[key].enemy : (lastResourceName(key) ?? key);
95
- };
96
-
97
- /**
98
- *
99
- * @param {string} key - The data key
100
- * @param {string} dataOverride locale for use with translation
101
- * @returns {string} localization for language string
102
- */
103
- export const languageString = (key: string, dataOverride: Locale = 'en'): string => {
104
- const lowerKey: string = String(key).toLowerCase();
105
- return (
106
- i18n(dataOverride).languages[lowerKey]?.value ??
107
- i18n(dataOverride).languages[key]?.value ??
108
- (key ? toTitleCase(splitResourceName(lastResourceName(String(key)) ?? '')) : key)
109
- );
110
- };
111
-
112
- /**
113
- *
114
- * @param {string} key - The data key
115
- * @param {string} dataOverride locale for use with translation
116
- * @returns {string} localization for language description
117
- */
118
- export const languageDesc = (key: string, dataOverride: Locale = 'en'): string => {
119
- const lowerKey = String(key).toLowerCase();
120
- return (
121
- i18n(dataOverride).languages[lowerKey]?.desc ??
122
- i18n(dataOverride).languages[key]?.desc ??
123
- (key ? `[PH] ${toTitleCase(splitResourceName(lastResourceName(String(key)) ?? ''))} Desc` : key)
124
- );
125
- };
126
-
127
- /**
128
- *
129
- * @param {string} key - The data key
130
- * @param {string} dataOverride locale for use with translation
131
- * @returns {string} translation for mission type
132
- */
133
- export const missionType = (key: string, dataOverride: Locale = 'en'): string => {
134
- const keyBased = key && typeof key === 'string' && toTitleCase((key ?? '').replace(/^MT_/, ''));
135
- return key in i18n(dataOverride).missionTypes ? i18n(dataOverride).missionTypes[key].value : (keyBased as string);
136
- };
137
-
138
- const conclave = (key: string, thing: keyof Conclave, dataOverride: Locale = 'en') =>
139
- keyInData<Conclave>('conclave', dataOverride)?.[thing]?.[key];
140
-
141
- /**
142
- *
143
- * @param {string} key - The data key
144
- * @param {string} dataOverride locale for use with translation
145
- * @returns {string} conclave mode
146
- */
147
- export const conclaveMode = (key: string, dataOverride: Locale = 'en'): string =>
148
- (conclave(key, 'modes', dataOverride) as { value: string })?.value ?? key;
149
-
150
- /**
151
- *
152
- * @param {string} key - The data key
153
- * @param {string} dataOverride locale for use with translation
154
- * @returns {{ value: string; description: string }} conclave category
155
- */
156
- export const conclaveCategory = (key: string, dataOverride: Locale = 'en'): string =>
157
- (conclave(key, 'categories', dataOverride) as { value: string; description: string })?.value ?? key;
158
-
159
- const fissure = (key: string, dataOverride: Locale = 'en') =>
160
- keyInData<Record<string, { value: string; num: number }>>('fissureModifiers', dataOverride)?.[key] ?? key;
161
-
162
- /**
163
- *
164
- * @param {string} key - The data key
165
- * @param {string} dataOverride locale for use with translation
166
- * @returns {string} fissure modifier data
167
- */
168
- export const fissureModifier = (key: string, dataOverride: Locale = 'en'): string =>
169
- fissure(key, dataOverride)?.value ?? key;
170
-
171
- /**
172
- *
173
- * @param {string} key - The data key
174
- * @param {string} dataOverride locale for use with translation
175
- * @returns {number | string} fissure tier
176
- */
177
- export const fissureTier = (key: string, dataOverride: Locale = 'en'): number | string =>
178
- fissure(key, dataOverride).num ?? key;
179
-
180
- /**
181
- *
182
- * @param {string} key - The data key
183
- * @param {string} dataOverride locale for use with translation
184
- * @returns {string} syndicate name
185
- */
186
- export const syndicate = (key: string, dataOverride: Locale = 'en'): string =>
187
- i18n(dataOverride).syndicates[key]?.name ?? key;
188
-
189
- /**
190
- *
191
- * @param {string} key - The data key
192
- * @param {string} dataOverride locale for use with translation
193
- * @returns {string} upgrade type
194
- */
195
- export const upgrade = (key: string, dataOverride: Locale = 'en'): string =>
196
- i18n(dataOverride).upgradeTypes[key]?.value ?? key;
197
-
198
- const oppo = (key: string, dataOverride: Locale = 'en') => i18n(dataOverride).operationTypes[key];
199
-
200
- /**
201
- *
202
- * @param {string} key - The data key
203
- * @param {string} dataOverride locale for use with translation
204
- * @returns {string} mathematical operation value
205
- */
206
- export const operation = (key: string, dataOverride: Locale = 'en'): string => oppo(key, dataOverride)?.value ?? key;
207
-
208
- /**
209
- *
210
- * @param {string} key - The data key
211
- * @param {string} dataOverride locale for use with translation
212
- * @returns {string} symbol of mathematical operation
213
- */
214
- export const operationSymbol = (key: string, dataOverride: Locale = 'en'): string =>
215
- oppo(key, dataOverride)?.symbol ?? key;
216
-
217
- const sortie = (key: string, dataOverride: Locale = 'en') => i18n(dataOverride).sortie.bosses[key];
218
-
219
- /**
220
- * @param {string} key - The data key
221
- * @param {string} dataOverride locale for use with translation
222
- * @returns {string} sortie boss name
223
- */
224
- export const sortieBoss = (key: string, dataOverride: Locale = 'en'): string => sortie(key, dataOverride)?.name ?? key;
225
-
226
- /**
227
- * @param {string} key - The data key
228
- * @param {string} dataOverride locale for use with translation
229
- * @returns {string} faction for a sortie based on the boss
230
- */
231
- export const sortieFaction = (key: string, dataOverride: Locale = 'en'): string =>
232
- sortie(key, dataOverride)?.faction ?? key;
233
-
234
- /**
235
- *
236
- * @param {string} key - The data key
237
- * @param {string} dataOverride locale for use with translation
238
- * @returns {string} sortie modifier data
239
- */
240
- export const sortieModifier = (key: string, dataOverride: Locale = 'en'): string =>
241
- i18n(dataOverride).sortie.modifierTypes?.[key] ?? key;
242
-
243
- /**
244
- * @param {string} key - The data key
245
- * @param {string} dataOverride locale for use with translation
246
- * @returns {string} sortie modifier description
247
- */
248
- export const sortieModDesc = (key: string, dataOverride: Locale = 'en'): string =>
249
- i18n(dataOverride).sortie.modifierDescriptions?.[key] ?? key;
250
-
251
- /**
252
- * Retrieve the localized region for a given key
253
- * @param {string | number} key - The region key
254
- * @param {string} dataOverride - The locale to use for translations
255
- * @returns {string} localized region name
256
- */
257
- export const region = (key: number, dataOverride: Locale = 'en'): string | number =>
258
- (key && i18n(dataOverride).persistentEnemy?.regions[key]) ?? key;
259
-
260
- /**
261
- * Retrieve conclave challenge name for the given key and locale
262
- * @param {string} key key to retrieve
263
- * @param {string} dataOverride locale key override
264
- * @returns {{
265
- * title: string,
266
- * description: string,
267
- * standing: number,
268
- * }} - The conclave challenge name for the given key
269
- */
270
- export const conclaveChallenge = (
271
- key: string,
272
- dataOverride: Locale = 'en'
273
- ): {
274
- title: string;
275
- description: string;
276
- standing: number;
277
- } => {
278
- const splitKey = lastResourceName(String(key))!;
279
-
280
- if (splitKey !== undefined && i18n(dataOverride).conclave?.challenges?.[splitKey]) {
281
- return i18n(dataOverride).conclave.challenges[splitKey];
282
- }
283
- return {
284
- title: toTitleCase(splitResourceName(splitKey)),
285
- description: toTitleCase(splitResourceName(splitKey)),
286
- standing: 0,
287
- };
288
- };
289
-
290
- /**
291
- * Get the steel path data for given key
292
- * @param {string} dataOverride - The locale to use for translations
293
- * @returns {string} - The steel path data for the given key
294
- */
295
- export const steelPath = (dataOverride: Locale = 'en'): SteelPath =>
296
- (i18n(dataOverride) || /* istanbul ignore next */ data).steelPath;
297
-
298
- const valMapping = (key: string, map: Record<string, string>) => {
299
- let val = 'None';
300
- Object.keys(map).forEach((k) => {
301
- if (key.includes(k)) {
302
- val = map[k];
303
- }
304
- });
305
- return val;
306
- };
307
-
308
- const focusMap = {
309
- 'Focus/Attack': 'Madurai',
310
- 'Focus/Defense': 'Vazarin',
311
- 'Focus/Tactic': 'Naramon',
312
- 'Focus/Power': 'Zenurik',
313
- 'Focus/Ward': 'Unairu',
314
- };
315
- /**
316
- * Translate the given focus school
317
- * @param {string} focus The focus school to translate
318
- * @returns {string} The translated focus school
319
- */
320
- export const translateFocus = (focus: string = ''): string => valMapping(focus, focusMap);
321
-
322
- const polarityMap = {
323
- AP_ATTACK: 'Madurai',
324
- AP_DEFENSE: 'Vazarin',
325
- AP_TACTIC: 'Naramon',
326
- AP_POWER: 'Zenurik',
327
- AP_WARD: 'Unairu',
328
- AP_UMBRA: 'Umbra',
329
- AP_ANY: 'Aura',
330
- };
331
-
332
- /**
333
- * Translate the given polarity
334
- * @param {string?} pol The polarity to translate
335
- * @returns {string} The translated polarity
336
- */
337
- export const translatePolarity = (pol: string = ''): string => valMapping(pol, polarityMap);
338
-
339
- const eventTypeMap = {
340
- CET_CHALLENGE: 'To Do',
341
- CET_UPGRADE: 'Override',
342
- CET_REWARD: 'Big Prize!',
343
- CET_PLOT: 'Birthday',
344
- };
345
-
346
- /**
347
- * Translate the given event key
348
- * @param {string} key Unique event type
349
- * @returns {string}
350
- */
351
- export const translateCalendarEvent = (key: string): string => valMapping(key, eventTypeMap);
352
-
353
- /**
354
- * Translate the given season name to a non-unique string
355
- * @param {string} season Unique season name
356
- * @returns {string}
357
- */
358
- export const translateSeason = (season: string): string => toTitleCase(season.replace('CST_', ''));
359
-
360
- const archimedeaTypes = {
361
- CT_LAB: "Deep Archimedea",
362
- CT_HEX: "Temporal Archimedea"
363
- }
364
-
365
- export const translateArchimedeaType = (type: string) => valMapping(type, archimedeaTypes);
366
-
367
- /**
368
- * An object containing functions to convert in-game names to their localizations
369
- * @typedef {Record<string, function>} Translator
370
- * @property {function} faction - Converts faction names
371
- * @property {function} node - Converts star map node names
372
- * @property {function} nodeMissionType - Returns the mission type of given node
373
- * @property {function} nodeEnemy - Returns the faction that controls a given node
374
- * @property {function} languageString - Converts generic language strings
375
- * @property {function} languageDesc - Converts generic language strings
376
- * and retrieves the description
377
- * @property {function} missionType - Converts mission types
378
- * @property {function} conclaveMode - Converts conclave modes
379
- * @property {function} conclaveCategory - Converts conclave challenge categories
380
- * @property {function} fissureModifier - Converts fissure mission modifiers
381
- * @property {function} syndicate - Converts syndicate names
382
- * @property {function} upgrade - Converts upgrade types
383
- * @property {function} operation - Converts operation types
384
- * @property {function} sortieBoss - Converts sortie boss names
385
- * @property {function} sortieModifier - Converts sortie modifier types
386
- * @property {function} sortieModDesc - Converts sortie modifier type descriptions
387
- * @property {function} region - Converts persistent enemy region indicies
388
- * @property {function} conclaveChallenge - Convert conclave identifiers into standing data
389
- * @property {function} steelPath - Retrieve Steel Path rotation data for locale
390
- * @property {function} toTitleCase - Format provided string as titlecase
391
- * @property {function} translateFocus - Translate focus schools
392
- * @property {function} translatePolarity - Translate polarities
393
- * @property {function} archonShard - Converts archon shard names
394
- * @property {function} archonShardColor - Converts archon shard names to in-game color values
395
- * @property {function} archonShardUpgradeType - Convert archon shard upgrade type
396
- * @property {function} translateCalendarEvent - Translate the given event key
397
- * @property {function} translateSeason - Translate the given season name to a non-unique string
398
- */
399
- export default {
400
- faction,
401
- node,
402
- nodeMissionType,
403
- nodeEnemy,
404
- languageString,
405
- languageDesc,
406
- missionType,
407
- conclaveMode,
408
- conclaveCategory,
409
- fissureModifier,
410
- fissureTier,
411
- syndicate,
412
- upgrade,
413
- operation,
414
- operationSymbol,
415
- sortieBoss,
416
- sortieModifier,
417
- sortieModDesc,
418
- sortieFaction,
419
- region,
420
- conclaveChallenge,
421
- steelPath,
422
- toTitleCase,
423
- translateFocus,
424
- translatePolarity,
425
- archonShard,
426
- archonShardColor,
427
- archonShardUpgradeType,
428
- translateCalendarEvent,
429
- translateSeason,
430
- };
@@ -1,5 +0,0 @@
1
- /* istanbul ignore file */
2
-
3
- export * from './integrity';
4
- export * from './timeDate';
5
- export * from './translation';
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "exclude": [
3
- "node_modules"
4
- ],
5
- "compilerOptions": {
6
- "module": "esnext",
7
- "target": "es2024", // set to the *lowest* target you support
8
- "strict": true,
9
- "moduleResolution": "bundler",
10
- "esModuleInterop": true,
11
- "isolatedModules": true,
12
- }
13
- }
package/tsdown.config.ts DELETED
@@ -1,15 +0,0 @@
1
- import { defineConfig } from 'tsdown';
2
-
3
- export default defineConfig({
4
- entry: [
5
- 'exports.ts',
6
- 'safeImport.ts',
7
- 'types.ts',
8
- './tools/timeDate.ts',
9
- './tools/translation.ts',
10
- './tools/utilities.ts',
11
- ],
12
- copy: ['./data'],
13
- dts: true,
14
- format: 'esm',
15
- });
package/types.ts DELETED
@@ -1,70 +0,0 @@
1
- export interface Arcane {
2
- regex: string;
3
- name: string;
4
- effect: string;
5
- rarity: string;
6
- location: string;
7
- thumbnail: string;
8
- }
9
-
10
- export interface ArchonShard {
11
- value: string;
12
- upgradeTypes: Record<string, { value: string }>;
13
- }
14
-
15
- export interface Conclave {
16
- modes: Record<string, { value: string }>;
17
- categories: Record<string, { value: string; description: string }>;
18
- challenges: Record<string, { title: string; description: string; standing: number }>;
19
- affectors: Record<string, { title: string; description: string; standing: number }>;
20
- }
21
-
22
- export interface Events {
23
- tags: Record<string, { value: string }>;
24
- scoreVariables: Record<string, { value: { value: string } }>;
25
- scoreMaxTags: Record<string, { value: { value: string } }>;
26
- }
27
-
28
- export interface SteelPath {
29
- rotation: SteelPathOffering[];
30
- evergreen: SteelPathOffering[];
31
- }
32
-
33
- export interface SteelPathOffering {
34
- name: string;
35
- cost: number;
36
- }
37
-
38
- export interface SynthesisTarget {
39
- name: string;
40
- locations: SynthesisTargetLocation[];
41
- }
42
-
43
- interface SynthesisTargetLocation {
44
- last_verified: string;
45
- level: string;
46
- spawn_rate: string;
47
- mission: string;
48
- planet: string;
49
- type: string;
50
- faction: string;
51
- }
52
-
53
- export interface SolNode {
54
- value: string;
55
- enemy: string;
56
- type: string;
57
- }
58
-
59
- interface SortieEndState {
60
- bossName: string;
61
- regions: { name: string; missions: string[] }[];
62
- }
63
-
64
- export interface SortieData {
65
- modifierTypes: Record<string, string>;
66
- modifierDescriptions: Record<string, string>;
67
- bosses: Record<string, { name: string; faction: string }>;
68
- endStates: SortieEndState[];
69
- modifiers: string[];
70
- }