warframe-worldstate-parser 4.6.1 → 5.0.1

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 (311) hide show
  1. package/dist/Alert-BS8PWPP3.d.ts +45 -0
  2. package/dist/Alert-DH1kglDU.js +52 -0
  3. package/dist/Archidemea-C0EMRUKc.js +59 -0
  4. package/dist/Archidemea-DOh4trTM.d.ts +55 -0
  5. package/dist/Calendar-CgEkm6e6.d.ts +78 -0
  6. package/dist/Calendar-CtzZQXj7.js +81 -0
  7. package/dist/CambionCycle-C6NHUjOU.js +30 -0
  8. package/dist/CambionCycle-uEBpbMim.d.ts +23 -0
  9. package/dist/CetusCycle-DIZdevob.js +90 -0
  10. package/dist/CetusCycle-ooMM7hkg.d.ts +49 -0
  11. package/dist/ChallengeInstance-Bi2zg4q-.d.ts +53 -0
  12. package/dist/ChallengeInstance-DHwTTwMH.js +48 -0
  13. package/dist/ConclaveChallenge-Dp5yOxVu.js +80 -0
  14. package/dist/ConclaveChallenge-JbcEcL4s.d.ts +76 -0
  15. package/dist/ConstructionProgress-DfcpaGL5.js +25 -0
  16. package/dist/ConstructionProgress-FAySTEod.d.ts +19 -0
  17. package/dist/DailyDeal-BGqZAp-j.js +66 -0
  18. package/dist/DailyDeal-Na-EaiFS.d.ts +66 -0
  19. package/dist/DarkSector-BQ97_8h6.js +138 -0
  20. package/dist/DarkSector-zkCUywz1.d.ts +142 -0
  21. package/dist/DarkSectorBattle-5PyUPhxY.js +53 -0
  22. package/dist/DarkSectorBattle-DY33Bfuq.d.ts +53 -0
  23. package/dist/Dependency-DkOHLql6.d.ts +38 -0
  24. package/dist/DuviriChoice-DRNDUbyc.js +22 -0
  25. package/dist/DuviriChoice-MIHsOBS7.d.ts +18 -0
  26. package/dist/DuviriCycle-B0zp0KxS.d.ts +25 -0
  27. package/dist/DuviriCycle-CmHJStJo.js +58 -0
  28. package/dist/EarthCycle-B9aIOAEY.js +75 -0
  29. package/dist/EarthCycle-RELuZL01.d.ts +60 -0
  30. package/dist/ExternalMission-DCzJkPC8.d.ts +49 -0
  31. package/dist/Fissure-7yFmOet3.js +85 -0
  32. package/dist/Fissure-Bj61i8dc.d.ts +78 -0
  33. package/dist/FlashSale-BxVI0J6A.js +75 -0
  34. package/dist/FlashSale-PDG4uQq4.d.ts +71 -0
  35. package/dist/GlobalUpgrade-BRQXf3JM.d.ts +55 -0
  36. package/dist/GlobalUpgrade-B_TKK1m_.js +58 -0
  37. package/dist/ImgCdn-BnbJ9K-0.js +7 -0
  38. package/dist/Invasion-BMic1K12.js +110 -0
  39. package/dist/Invasion-BskF60zh.d.ts +113 -0
  40. package/dist/Kinepage-CRRKVulq.d.ts +22 -0
  41. package/dist/Kinepage-iWFwTZtr.js +24 -0
  42. package/dist/Kuva-DqkxvPUg.js +85 -0
  43. package/dist/KuvaLogEntry-d5fskHaK.d.ts +21 -0
  44. package/dist/MidrathCycle-BfQtfG4p.d.ts +25 -0
  45. package/dist/MidrathCycle-DDfT7zVx.js +69 -0
  46. package/dist/Mission-CWE16ouO.d.ts +138 -0
  47. package/dist/Mission-ZuSsAYNm.js +140 -0
  48. package/dist/News-7F8Nbp4A.js +122 -0
  49. package/dist/News-BfAgbYSY.d.ts +101 -0
  50. package/dist/Nightwave-DDX0_zJU.js +60 -0
  51. package/dist/Nightwave-_0RzWikV.d.ts +59 -0
  52. package/dist/NightwaveChallenge-DDdrqvge.d.ts +51 -0
  53. package/dist/NightwaveChallenge-DwilvXfi.js +53 -0
  54. package/dist/PersistentEnemy-DRcO4V2r.d.ts +79 -0
  55. package/dist/PersistentEnemy-axYxYzv_.js +76 -0
  56. package/dist/Reward-5VIpHu9A.d.ts +68 -0
  57. package/dist/Reward-OauJ45jJ.js +73 -0
  58. package/dist/RewardData-qEvfHYxA.js +76 -0
  59. package/dist/RewardTypes-Cfq9FeIl.js +328 -0
  60. package/dist/RewardTypes-DYaUn77A.d.ts +34 -0
  61. package/dist/SentientOutpost-B2KZUJ7H.js +65 -0
  62. package/dist/SentientOutpost-DmlClvel.d.ts +47 -0
  63. package/dist/Simaris-B9Mvso2q.js +35 -0
  64. package/dist/Simaris-Bc-jNhED.d.ts +37 -0
  65. package/dist/Sortie-DPv-7SQ-.d.ts +60 -0
  66. package/dist/Sortie-DcoAnEaJ.js +73 -0
  67. package/dist/SortieVariant-BFkYiBho.d.ts +49 -0
  68. package/dist/SortieVariant-eWuI1uh9.js +51 -0
  69. package/dist/SteelPathOffering-DyAzr3P9.js +85 -0
  70. package/dist/SteelPathOffering-OHNTCFo5.d.ts +38 -0
  71. package/dist/SyndicateJob-BK7OMLmv.js +141 -0
  72. package/dist/SyndicateJob-DOtXWjRF.d.ts +76 -0
  73. package/dist/SyndicateMission-5PZIEM8P.js +66 -0
  74. package/dist/SyndicateMission-DmGG5lGy.d.ts +58 -0
  75. package/dist/Tmp-DkQq1arD.js +21 -0
  76. package/dist/VallisCycle-BX8yyKx3.js +76 -0
  77. package/dist/VallisCycle-BXcmzqqG.d.ts +31 -0
  78. package/dist/VoidTrader-CbLMfEVj.js +77 -0
  79. package/dist/VoidTrader-CihLWgSV.d.ts +74 -0
  80. package/dist/VoidTraderItem-BzeD-S6-.js +38 -0
  81. package/dist/VoidTraderItem-CkYAKAEn.d.ts +43 -0
  82. package/dist/VoidTraderSchedule-C-K8Zdfk.js +14 -0
  83. package/dist/VoidTraderSchedule-DKDtu-9d.d.ts +16 -0
  84. package/dist/WeeklyChallenge-C6sc4j7i.d.ts +20 -0
  85. package/dist/WeeklyChallenge-MzUEZAjv.js +21 -0
  86. package/dist/WorldEvent-BS9QHG_f.d.ts +205 -0
  87. package/dist/WorldEvent-nis9w9cn.js +213 -0
  88. package/dist/WorldState-DNSPrZR_.d.ts +257 -0
  89. package/dist/WorldState-uppX0Xt1.js +330 -0
  90. package/dist/WorldstateObject-BSTYuZwm.js +54 -0
  91. package/dist/WorldstateObject-wfRTeGpm.d.ts +48 -0
  92. package/dist/ZarimanCycle-BJ84QUFg.js +81 -0
  93. package/dist/ZarimanCycle-CjNQXhVO.d.ts +45 -0
  94. package/dist/lib/Tmp.d.ts +24 -0
  95. package/dist/lib/Tmp.js +6 -0
  96. package/dist/lib/WorldState.d.ts +47 -0
  97. package/dist/lib/WorldState.js +49 -0
  98. package/dist/lib/models/Alert.d.ts +8 -0
  99. package/dist/lib/models/Alert.js +9 -0
  100. package/dist/lib/models/Archidemea.d.ts +2 -0
  101. package/dist/lib/models/Archidemea.js +3 -0
  102. package/dist/lib/models/Calendar.d.ts +3 -0
  103. package/dist/lib/models/Calendar.js +4 -0
  104. package/dist/lib/models/CambionCycle.d.ts +4 -0
  105. package/dist/lib/models/CambionCycle.js +4 -0
  106. package/dist/lib/models/CetusCycle.d.ts +3 -0
  107. package/dist/lib/models/CetusCycle.js +4 -0
  108. package/dist/lib/models/ChallengeInstance.d.ts +4 -0
  109. package/dist/lib/models/ChallengeInstance.js +3 -0
  110. package/dist/lib/models/ConclaveChallenge.d.ts +5 -0
  111. package/dist/lib/models/ConclaveChallenge.js +4 -0
  112. package/dist/lib/models/ConstructionProgress.d.ts +3 -0
  113. package/dist/lib/models/ConstructionProgress.js +4 -0
  114. package/dist/lib/models/DailyDeal.d.ts +5 -0
  115. package/dist/lib/models/DailyDeal.js +4 -0
  116. package/dist/lib/models/DarkSector.d.ts +9 -0
  117. package/dist/lib/models/DarkSector.js +10 -0
  118. package/dist/lib/models/DarkSectorBattle.d.ts +3 -0
  119. package/dist/lib/models/DarkSectorBattle.js +3 -0
  120. package/dist/lib/models/DuviriCycle.d.ts +4 -0
  121. package/dist/lib/models/DuviriCycle.js +4 -0
  122. package/dist/lib/models/EarthCycle.d.ts +3 -0
  123. package/dist/lib/models/EarthCycle.js +4 -0
  124. package/dist/lib/models/Fissure.d.ts +5 -0
  125. package/dist/lib/models/Fissure.js +4 -0
  126. package/dist/lib/models/FlashSale.d.ts +5 -0
  127. package/dist/lib/models/FlashSale.js +4 -0
  128. package/dist/lib/models/GlobalUpgrade.d.ts +5 -0
  129. package/dist/lib/models/GlobalUpgrade.js +4 -0
  130. package/dist/lib/models/Invasion.d.ts +7 -0
  131. package/dist/lib/models/Invasion.js +8 -0
  132. package/dist/lib/models/Kinepage.d.ts +2 -0
  133. package/dist/lib/models/Kinepage.js +3 -0
  134. package/dist/lib/models/Kuva.d.ts +22 -0
  135. package/dist/lib/models/Kuva.js +3 -0
  136. package/dist/lib/models/MidrathCycle.d.ts +3 -0
  137. package/dist/lib/models/MidrathCycle.js +4 -0
  138. package/dist/lib/models/Mission.d.ts +6 -0
  139. package/dist/lib/models/Mission.js +7 -0
  140. package/dist/lib/models/News.d.ts +3 -0
  141. package/dist/lib/models/News.js +5 -0
  142. package/dist/lib/models/Nightwave.d.ts +4 -0
  143. package/dist/lib/models/Nightwave.js +5 -0
  144. package/dist/lib/models/NightwaveChallenge.d.ts +3 -0
  145. package/dist/lib/models/NightwaveChallenge.js +4 -0
  146. package/dist/lib/models/PersistentEnemy.d.ts +3 -0
  147. package/dist/lib/models/PersistentEnemy.js +4 -0
  148. package/dist/lib/models/Reward.d.ts +5 -0
  149. package/dist/lib/models/Reward.js +6 -0
  150. package/dist/lib/models/SentientOutpost.d.ts +4 -0
  151. package/dist/lib/models/SentientOutpost.js +3 -0
  152. package/dist/lib/models/Simaris.d.ts +4 -0
  153. package/dist/lib/models/Simaris.js +3 -0
  154. package/dist/lib/models/Sortie.d.ts +9 -0
  155. package/dist/lib/models/Sortie.js +10 -0
  156. package/dist/lib/models/SortieVariant.d.ts +4 -0
  157. package/dist/lib/models/SortieVariant.js +3 -0
  158. package/dist/lib/models/SteelPathOffering.d.ts +2 -0
  159. package/dist/lib/models/SteelPathOffering.js +3 -0
  160. package/dist/lib/models/SyndicateJob.d.ts +5 -0
  161. package/dist/lib/models/SyndicateJob.js +4 -0
  162. package/dist/lib/models/SyndicateMission.d.ts +6 -0
  163. package/dist/lib/models/SyndicateMission.js +5 -0
  164. package/dist/lib/models/VallisCycle.d.ts +3 -0
  165. package/dist/lib/models/VallisCycle.js +4 -0
  166. package/dist/lib/models/VoidTrader.d.ts +7 -0
  167. package/dist/lib/models/VoidTrader.js +6 -0
  168. package/dist/lib/models/VoidTraderItem.d.ts +4 -0
  169. package/dist/lib/models/VoidTraderItem.js +3 -0
  170. package/dist/lib/models/VoidTraderSchedule.d.ts +4 -0
  171. package/dist/lib/models/VoidTraderSchedule.js +3 -0
  172. package/dist/lib/models/WeeklyChallenge.d.ts +6 -0
  173. package/dist/lib/models/WeeklyChallenge.js +5 -0
  174. package/dist/lib/models/WorldEvent.d.ts +8 -0
  175. package/dist/lib/models/WorldEvent.js +9 -0
  176. package/dist/lib/models/WorldstateObject.d.ts +2 -0
  177. package/dist/lib/models/WorldstateObject.js +3 -0
  178. package/dist/lib/models/ZarimanCycle.d.ts +3 -0
  179. package/dist/lib/models/ZarimanCycle.js +4 -0
  180. package/dist/lib/supporting/Dependency.d.ts +3 -0
  181. package/dist/lib/supporting/Dependency.js +1 -0
  182. package/dist/lib/supporting/DuviriChoice.d.ts +3 -0
  183. package/dist/lib/supporting/DuviriChoice.js +3 -0
  184. package/dist/lib/supporting/ExternalMission.d.ts +2 -0
  185. package/dist/lib/supporting/ExternalMission.js +1 -0
  186. package/dist/lib/supporting/ImgCdn.d.ts +6 -0
  187. package/dist/lib/supporting/ImgCdn.js +3 -0
  188. package/dist/lib/supporting/KuvaLogEntry.d.ts +2 -0
  189. package/dist/lib/supporting/KuvaLogEntry.js +1 -0
  190. package/dist/lib/supporting/RewardData.d.ts +11 -0
  191. package/dist/lib/supporting/RewardData.js +3 -0
  192. package/dist/lib/supporting/RewardTypes.d.ts +2 -0
  193. package/dist/lib/supporting/RewardTypes.js +5 -0
  194. package/dist/main.d.ts +47 -0
  195. package/dist/main.js +49 -0
  196. package/dist/resources/.gitkeep +1 -0
  197. package/dist/resources/alt_helmet_thumb.png +0 -0
  198. package/dist/resources/aura_thumb.png +0 -0
  199. package/dist/resources/clantech_thmb.png +0 -0
  200. package/dist/resources/endo_thumb.png +0 -0
  201. package/dist/resources/exilus_thumb.png +0 -0
  202. package/dist/resources/forma_thumb.png +0 -0
  203. package/dist/resources/glaive_thumb.png +0 -0
  204. package/dist/resources/mutalist_thumb.png +0 -0
  205. package/dist/resources/nightmare_thumb.png +0 -0
  206. package/dist/resources/nitain_thumb.png +0 -0
  207. package/dist/resources/potato_thumb.png +0 -0
  208. package/dist/resources/resource_thumb.png +0 -0
  209. package/dist/resources/vauban_thumb.png +0 -0
  210. package/dist/resources/weapon_skin_thumb.png +0 -0
  211. package/package.json +9 -11
  212. package/lib/WorldState.js +0 -404
  213. package/lib/models/Alert.js +0 -90
  214. package/lib/models/Calendar.js +0 -74
  215. package/lib/models/CambionCycle.js +0 -32
  216. package/lib/models/CetusCycle.js +0 -126
  217. package/lib/models/ChallengeInstance.js +0 -57
  218. package/lib/models/ConclaveChallenge.js +0 -154
  219. package/lib/models/ConstructionProgress.js +0 -31
  220. package/lib/models/DailyDeal.js +0 -103
  221. package/lib/models/DarkSector.js +0 -154
  222. package/lib/models/DarkSectorBattle.js +0 -56
  223. package/lib/models/DeepArchidemea.js +0 -33
  224. package/lib/models/DuviriCycle.js +0 -65
  225. package/lib/models/EarthCycle.js +0 -119
  226. package/lib/models/Fissure.js +0 -136
  227. package/lib/models/FlashSale.js +0 -123
  228. package/lib/models/GlobalUpgrade.js +0 -122
  229. package/lib/models/Invasion.js +0 -183
  230. package/lib/models/Kinepage.js +0 -11
  231. package/lib/models/Kuva.js +0 -122
  232. package/lib/models/MidrathCycle.js +0 -94
  233. package/lib/models/Mission.js +0 -179
  234. package/lib/models/News.js +0 -174
  235. package/lib/models/Nightwave.js +0 -91
  236. package/lib/models/NightwaveChallenge.js +0 -63
  237. package/lib/models/PersistentEnemy.js +0 -100
  238. package/lib/models/Reward.js +0 -111
  239. package/lib/models/SentientOutpost.js +0 -68
  240. package/lib/models/Simaris.js +0 -47
  241. package/lib/models/Sortie.js +0 -143
  242. package/lib/models/SortieVariant.js +0 -57
  243. package/lib/models/SteelPathOffering.js +0 -99
  244. package/lib/models/SyndicateJob.js +0 -185
  245. package/lib/models/SyndicateMission.js +0 -111
  246. package/lib/models/VallisCycle.js +0 -125
  247. package/lib/models/VoidTrader.js +0 -134
  248. package/lib/models/VoidTraderItem.js +0 -24
  249. package/lib/models/VoidTraderSchedule.js +0 -8
  250. package/lib/models/WeeklyChallenge.js +0 -27
  251. package/lib/models/WorldEvent.js +0 -326
  252. package/lib/models/WorldstateObject.js +0 -106
  253. package/lib/models/ZarimanCycle.js +0 -124
  254. package/lib/supporting/Dependency.js +0 -6
  255. package/lib/supporting/DuviriChoice.js +0 -16
  256. package/lib/supporting/ExternalMission.js +0 -13
  257. package/lib/supporting/ImgCdn.js +0 -9
  258. package/lib/supporting/MarkdownSettings.js +0 -30
  259. package/lib/supporting/RewardData.js +0 -77
  260. package/lib/supporting/RewardTypes.js +0 -327
  261. package/main.js +0 -4
  262. package/types/lib/WorldState.d.ts +0 -199
  263. package/types/lib/models/Alert.d.ts +0 -53
  264. package/types/lib/models/Calendar.d.ts +0 -16
  265. package/types/lib/models/CambionCycle.d.ts +0 -20
  266. package/types/lib/models/CetusCycle.d.ts +0 -47
  267. package/types/lib/models/ChallengeInstance.d.ts +0 -42
  268. package/types/lib/models/ConclaveChallenge.d.ts +0 -90
  269. package/types/lib/models/ConstructionProgress.d.ts +0 -14
  270. package/types/lib/models/DailyDeal.d.ts +0 -78
  271. package/types/lib/models/DarkSector.d.ts +0 -121
  272. package/types/lib/models/DarkSectorBattle.d.ts +0 -44
  273. package/types/lib/models/DeepArchidemea.d.ts +0 -8
  274. package/types/lib/models/DuviriCycle.d.ts +0 -21
  275. package/types/lib/models/EarthCycle.d.ts +0 -64
  276. package/types/lib/models/Fissure.d.ts +0 -83
  277. package/types/lib/models/FlashSale.d.ts +0 -86
  278. package/types/lib/models/GlobalUpgrade.d.ts +0 -86
  279. package/types/lib/models/Invasion.d.ts +0 -124
  280. package/types/lib/models/Kinepage.d.ts +0 -6
  281. package/types/lib/models/Kuva.d.ts +0 -60
  282. package/types/lib/models/MidrathCycle.d.ts +0 -39
  283. package/types/lib/models/Mission.d.ts +0 -136
  284. package/types/lib/models/News.d.ts +0 -104
  285. package/types/lib/models/Nightwave.d.ts +0 -53
  286. package/types/lib/models/NightwaveChallenge.d.ts +0 -45
  287. package/types/lib/models/PersistentEnemy.d.ts +0 -70
  288. package/types/lib/models/Reward.d.ts +0 -95
  289. package/types/lib/models/SentientOutpost.d.ts +0 -54
  290. package/types/lib/models/Simaris.d.ts +0 -33
  291. package/types/lib/models/Sortie.d.ts +0 -72
  292. package/types/lib/models/SortieVariant.d.ts +0 -43
  293. package/types/lib/models/SteelPathOffering.d.ts +0 -19
  294. package/types/lib/models/SyndicateJob.d.ts +0 -72
  295. package/types/lib/models/SyndicateMission.d.ts +0 -56
  296. package/types/lib/models/VallisCycle.d.ts +0 -53
  297. package/types/lib/models/VoidTrader.d.ts +0 -45
  298. package/types/lib/models/VoidTraderItem.d.ts +0 -25
  299. package/types/lib/models/VoidTraderSchedule.d.ts +0 -7
  300. package/types/lib/models/WeeklyChallenge.d.ts +0 -12
  301. package/types/lib/models/WorldEvent.d.ts +0 -216
  302. package/types/lib/models/WorldstateObject.d.ts +0 -120
  303. package/types/lib/models/ZarimanCycle.d.ts +0 -42
  304. package/types/lib/supporting/Dependency.d.ts +0 -7
  305. package/types/lib/supporting/DuviriChoice.d.ts +0 -9
  306. package/types/lib/supporting/ExternalMission.d.ts +0 -48
  307. package/types/lib/supporting/ImgCdn.d.ts +0 -3
  308. package/types/lib/supporting/MarkdownSettings.d.ts +0 -30
  309. package/types/lib/supporting/RewardData.d.ts +0 -9
  310. package/types/lib/supporting/RewardTypes.d.ts +0 -8
  311. package/types/main.d.ts +0 -3
@@ -1,154 +0,0 @@
1
- import { parseDate, languageString } from 'warframe-worldstate-data/utilities';
2
-
3
- import WorldstateObject from './WorldstateObject.js';
4
- import Mission from './Mission.js';
5
- import DarkSectorBattle from './DarkSectorBattle.js';
6
-
7
- /**
8
- * Represents a dark sector
9
- * @augments {WorldstateObject}
10
- */
11
- export default class DarkSector extends WorldstateObject {
12
- /**
13
- * @param {object} data The dark sector data
14
- * @param {object} deps The dependencies object
15
- * @param {string} deps.locale Locale to use for translations
16
- */
17
- constructor(data, { locale = 'en' } = { locale: 'en' }) {
18
- super(data);
19
-
20
- const deps = {
21
- locale,
22
- };
23
-
24
- /**
25
- * The dark sector credit tax rate
26
- * @type {number}
27
- */
28
- this.creditTaxRate = data.DefenderInfo.CreditsTaxRate;
29
-
30
- /**
31
- * The dark sector credit tax rate for clan/alliance members
32
- * @type {number}
33
- */
34
- this.memberCreditsTaxRate = data.DefenderInfo.MemberCreditsTax;
35
-
36
- /**
37
- * The dark sector resource tax rate
38
- * @type {number}
39
- */
40
- this.itemsTaxRate = data.DefenderInfo.ItemsTaxRate;
41
-
42
- /**
43
- * The dark sector resource tax rate for clan/alliance members
44
- * @type {number}
45
- */
46
- this.memberItemsTaxRate = data.DefenderInfo.MemberItemsTaxRate;
47
-
48
- /**
49
- * Whether the dark sector holder is an alliance or not
50
- * @type {boolean}
51
- */
52
- this.isAlliance = data.DefenderInfo.IsAlliance;
53
-
54
- /**
55
- * The current holder of the dark sector
56
- * @type {string}
57
- */
58
- this.defenderName = data.DefenderInfo.Name;
59
-
60
- /**
61
- * The remaining health of the current solar rail
62
- * @type {number}
63
- */
64
- this.defenderPoolRemaining = Number.parseFloat(data.DefenderInfo.StrengthRemaining);
65
-
66
- /**
67
- * The maximum health of the solar rail
68
- * @type {number}
69
- */
70
- this.defenderMaxPool = Number.parseFloat(data.DefenderInfo.MaxStrength);
71
-
72
- /**
73
- * The date and time at which the rail was deployed
74
- * @type {Date}
75
- */
76
- this.defenderDeployemntActivation = data.DefenderInfo.DeploymentActivationTime
77
- ? parseDate(data.DefenderInfo.DeploymentActivationTime)
78
- : 0;
79
-
80
- /**
81
- * The solar rail type
82
- * @type {string}
83
- */
84
- this.railType = languageString(data.DefenderInfo.RailType, locale);
85
-
86
- /**
87
- * The MOTD set by the dark sector holder
88
- * @type {string}
89
- */
90
- this.defenderMOTD = data.DefenderInfo.MOTD;
91
-
92
- /**
93
- * The player who deployed the solar rail
94
- * @type {string}
95
- */
96
- this.deployerName = data.DefenderInfo.DeployerName;
97
-
98
- /**
99
- * The clan of the player who deployed the solar rail
100
- * @type {string}
101
- */
102
- this.deployerClan = data.DefenderInfo.DeployerClan;
103
-
104
- this.defenderRailHealReserve = data.DefenderInfo.RailHealReserve;
105
-
106
- this.healRate = Number.parseFloat(data.DefenderInfo.healRate);
107
-
108
- this.damagePerMission = data.DefenderInfo.DamagePerMission;
109
-
110
- /**
111
- * The dark sector's mission
112
- * @type {?Mission}
113
- */
114
- this.mission = data.DefenderInfo.MissionInfo ? new Mission(data.DefenderInfo.MissionInfo, deps) : undefined;
115
-
116
- this.battlePayReserve = data.DefenderInfo.BattlePayReserve;
117
-
118
- /**
119
- * The battle pay per mission offered to players
120
- * @type {number}
121
- */
122
- this.perMissionBattlePay = data.DefenderInfo.MissionBattlePay;
123
-
124
- /**
125
- * The player who set the battle pay
126
- * @type {string}
127
- */
128
- this.battlePaySetBy = data.DefenderInfo.BattlePaySetBy;
129
-
130
- /**
131
- * The clan of the player who set the battle pay
132
- * @type {string}
133
- */
134
- this.battlePaySetByClan = data.DefenderInfo.BattlePaySetByClan;
135
-
136
- /**
137
- * The player who changed the tax
138
- * @type {string}
139
- */
140
- this.taxChangedBy = data.DefenderInfo.TaxLastChangedBy;
141
-
142
- /**
143
- * The clan of the player who set the tax
144
- * @type {string}
145
- */
146
- this.taxChangedByClan = data.DefenderInfo.TaxLastChangedByClan;
147
-
148
- /**
149
- * The history of the dark sector
150
- * @type {Array.<DarkSectorBattle>}
151
- */
152
- this.history = data.History ? data.History.map((b) => new DarkSectorBattle(b, deps)) : [];
153
- }
154
- }
@@ -1,56 +0,0 @@
1
- import { parseDate } from 'warframe-worldstate-data/utilities';
2
-
3
- /**
4
- * Represents a battle over a dark sector
5
- */
6
- export default class DarkSectorBattle {
7
- /**
8
- * @param {object} data The battle data
9
- */
10
- constructor(data) {
11
- /**
12
- * The defenders of the dark sector
13
- * @type {string}
14
- */
15
- this.defender = data.Def;
16
-
17
- /**
18
- * Whether the defenders are an alliance or not
19
- * @type {boolean}
20
- */
21
- this.defenderIsAlliance = data.DefAli;
22
-
23
- /**
24
- * The attackers of the dark sector
25
- * @type {string}
26
- */
27
- this.attacker = data.Att;
28
-
29
- /**
30
- * Whether the attackers are an alliance or not
31
- * @type {boolean}
32
- */
33
- this.attackerIsAlliance = data.AttAli;
34
-
35
- const defId = data.DefId.$oid || data.DefId.$id;
36
- const winId = data.WinId.$oid || data.WinId.$id;
37
-
38
- /**
39
- * The winner of the battle
40
- * @type {string}
41
- */
42
- this.winner = defId === winId ? this.defender : this.attacker;
43
-
44
- /**
45
- * The date and time at which the battle started
46
- * @type {Date}
47
- */
48
- this.start = parseDate(data.Start);
49
-
50
- /**
51
- * The date and time at which the battle ended
52
- * @type {Date}
53
- */
54
- this.end = parseDate(data.End);
55
- }
56
- }
@@ -1,33 +0,0 @@
1
- import { languageDesc, languageString } from 'warframe-worldstate-data/utilities';
2
-
3
- class DeepArchidemeaMission {
4
- constructor(mission, deviation, risks, locale) {
5
- this.mission = mission;
6
-
7
- this.deviation = {
8
- key: deviation,
9
- name: languageString(deviation, locale),
10
- description: languageDesc(deviation, locale),
11
- };
12
-
13
- this.riskVariables = risks.map((i) => {
14
- return { key: i, name: languageString(i, locale), description: languageDesc(i, locale) };
15
- });
16
- }
17
- }
18
-
19
- export default class DeepArchimedea {
20
- constructor(activation, expiry, data, locale = 'en') {
21
- this.id = `${new Date(activation).getTime()}DeepArchimedea`;
22
-
23
- this.activation = activation;
24
-
25
- this.expiry = expiry;
26
-
27
- this.missions = data.mt.map((m, i) => new DeepArchidemeaMission(m, data.mv[i], data.c[i], locale));
28
-
29
- this.personalModifiers = data.fv.map((i) => {
30
- return { key: i, name: languageString(i, locale), description: languageDesc(i, locale) };
31
- });
32
- }
33
- }
@@ -1,65 +0,0 @@
1
- import { timeDeltaToString, toTitleCase } from 'warframe-worldstate-data/utilities';
2
-
3
- import WorldstateObject from './WorldstateObject.js';
4
-
5
- const cycleTime = 36000;
6
- const stateTime = 7200;
7
-
8
- const states = ['sorrow', 'fear', 'joy', 'anger', 'envy'];
9
-
10
- const getStageInfo = () => {
11
- const cycleDelta = (Math.floor(Date.now() / 1000) - 52) % cycleTime;
12
- const stateInd = Math.floor(cycleDelta / stateTime);
13
- const stateDelta = cycleDelta % stateTime;
14
- const untilNext = stateTime - stateDelta;
15
- const expiry = new Date(Date.now() + untilNext * 1000);
16
- expiry.setSeconds(0);
17
- expiry.setMilliseconds(0);
18
- const activation = new Date(expiry.getTime() - stateTime * 1000);
19
- activation.setSeconds(0);
20
- activation.setMilliseconds(0);
21
- return {
22
- state: states[stateInd],
23
- expiry,
24
- activation,
25
- };
26
- };
27
-
28
- /**
29
- * @typedef {WorldstateObject} DuviriCycle
30
- * @augments {WorldstateObject}
31
- */
32
- export default class DuviriCycle extends WorldstateObject {
33
- constructor({ duviriChoices }) {
34
- super({ _id: { $oid: 'duviriCycle0' } });
35
- const { activation, expiry, state } = getStageInfo();
36
-
37
- /**
38
- * When the cycle start(s/ed)
39
- * @type {Date}
40
- */
41
- this.activation = activation;
42
- /**
43
- * When the cycle end(s/ed)
44
- * @type {Date}
45
- */
46
- this.expiry = expiry;
47
- /**
48
- * Current stage key
49
- * @type {string}
50
- */
51
- this.state = state;
52
- /**
53
- * Choice options for this Cycle
54
- */
55
- this.choices = duviriChoices;
56
-
57
- this.id = `duviriCycle${this.state}${this.expiry.getTime()}`;
58
- }
59
-
60
- toString() {
61
- return `${toTitleCase(this.state)} spiral. ${toTitleCase(
62
- states[(states.indexOf(this.state) + 1) % 5]
63
- )} in ${timeDeltaToString(new Date(this.expiry).getTime() - Date.now())}`;
64
- }
65
- }
@@ -1,119 +0,0 @@
1
- import { fromNow } from 'warframe-worldstate-data/utilities';
2
-
3
- import mdConfig from '../supporting/MarkdownSettings.js';
4
-
5
- import WorldstateObject from './WorldstateObject.js';
6
-
7
- /**
8
- * @typedef {object} EarthCycle
9
- * @property {Date} expiry The date and time at which the event ends
10
- * @property {Date} activation The date and time at which the event started
11
- * @property {boolean} isDay Whether or not this it's daytime
12
- * @property {string} state Current cycle state. One of `day`, `night`
13
- * @property {string} timeLeft Time remaining string
14
- * @property {Date} rounded The date and time at which the event ends, rounded to the nearest minute
15
- * @property {Date} start The date and time at which the event started, 4 hours before the end
16
- * @property {boolean} expired Whether or not the event has expired
17
- */
18
-
19
- /**
20
- * Get the current Earth Day/Night Cycle
21
- * @returns {EarthCycle} The current Earth Day/Night Cycle
22
- */
23
- function getCurrentEarthCycle() {
24
- const now = Date.now();
25
- const cycleSeconds = Math.floor(now / 1000) % 28800; // One cycle = 8 hours = 28800 seconds
26
- const dayTime = cycleSeconds < 14400;
27
-
28
- let secondsLeft = 14400 - (cycleSeconds % 14400);
29
- const millisLeft = secondsLeft * 1000;
30
- const expiry = new Date(now + secondsLeft * 1000);
31
-
32
- const minutesCoef = 1000 * 60;
33
- const rounded = new Date(Math.round((now + millisLeft) / minutesCoef) * minutesCoef);
34
-
35
- const timePieces = [];
36
- if (secondsLeft > 3600) {
37
- timePieces.push(`${Math.floor(secondsLeft / 3600)}h`);
38
- secondsLeft %= 3600;
39
- }
40
- if (secondsLeft > 60) {
41
- timePieces.push(`${Math.floor(secondsLeft / 60)}m`);
42
- secondsLeft %= 60;
43
- }
44
- timePieces.push(`${secondsLeft}s`);
45
-
46
- return {
47
- dayTime,
48
- timeLeft: timePieces.join(' '),
49
- expiry,
50
- expiresIn: millisLeft,
51
- rounded,
52
- state: dayTime ? 'day' : 'night',
53
- start: new Date(expiry.getTime() - 1000 * 60 * 60 * 4), // start is 4h before end
54
- };
55
- }
56
-
57
- /**
58
- * Represents the current Earth Day/Night Cycle
59
- * @augments {WorldstateObject}
60
- */
61
- export default class EarthCycle extends WorldstateObject {
62
- #ec = getCurrentEarthCycle();
63
- constructor() {
64
- super({ _id: { $oid: 'earthCycle0' } });
65
-
66
- /**
67
- * The date and time at which the event ends
68
- * @type {Date}
69
- */
70
- this.expiry = this.#ec.expiry;
71
-
72
- /**
73
- * The date and time at which the event started
74
- * @type {Date}
75
- */
76
- this.activation = this.#ec.start;
77
-
78
- /**
79
- * Whether or not this it's daytime
80
- * @type {boolean}
81
- */
82
- this.isDay = this.#ec.dayTime;
83
-
84
- /**
85
- * Current cycle state. One of `day`, `night`
86
- * @type {string}
87
- */
88
- this.state = this.#ec.state;
89
-
90
- /**
91
- * Time remaining string
92
- * @type {string}
93
- */
94
- this.timeLeft = this.#ec.timeLeft;
95
-
96
- this.id = `earthCycle${this.#ec.rounded.getTime()}`;
97
- }
98
-
99
- /**
100
- * Get whether or not the event has expired
101
- * @returns {boolean} Whether or not the event has expired
102
- */
103
- getExpired() {
104
- return fromNow(this.expiry) < 0;
105
- }
106
-
107
- /**
108
- * The event's string representation
109
- * @returns {string} The string representation of the event
110
- */
111
- toString() {
112
- const lines = [
113
- `Operator, Earth is currently in ${this.isDay ? 'Day' : 'Night'}time`,
114
- `Time remaining until ${this.isDay ? 'night' : 'day'}: ${this.timeLeft}`,
115
- ];
116
-
117
- return lines.join(mdConfig.lineEnd);
118
- }
119
- }
@@ -1,136 +0,0 @@
1
- import {
2
- parseDate,
3
- fromNow,
4
- timeDeltaToString,
5
- node,
6
- nodeMissionType,
7
- missionType,
8
- nodeEnemy,
9
- fissureModifier,
10
- fissureTier,
11
- } from 'warframe-worldstate-data/utilities';
12
-
13
- import WorldstateObject from './WorldstateObject.js';
14
-
15
- /**
16
- * Represents a fissure mission
17
- * @augments {WorldstateObject}
18
- */
19
- export default class Fissure extends WorldstateObject {
20
- /**
21
- * @param {object} data The fissure data
22
- * @param {Dependency} deps The dependencies object
23
- * @param {string} deps.locale Locale to use for translations
24
- */
25
- constructor(data, { locale = 'en' } = { locale: 'en' }) {
26
- super(data);
27
-
28
- /**
29
- * The node where the fissure has appeared
30
- * @type {string}
31
- */
32
- this.node = node(data.Node, locale);
33
-
34
- /**
35
- * The fissure mission type
36
- * @type {string}
37
- */
38
- this.missionType = data.MissionType ? missionType(data.MissionType, locale) : nodeMissionType(data.Node, locale);
39
-
40
- /**
41
- * The fissure mission type key
42
- * @type {string}
43
- */
44
- this.missionKey = data.MissionType ? missionType(data.MissionType) : nodeMissionType(data.Node);
45
-
46
- /**
47
- * The faction controlling the node where the fissure has appeared
48
- * @type {string}
49
- */
50
- this.enemy = nodeEnemy(data.Node, locale);
51
-
52
- /**
53
- * Faction enum for the faction controlling the node where the fissure has appeared
54
- * @type {string}
55
- */
56
- this.enemyKey = nodeEnemy(data.Node);
57
-
58
- /**
59
- * The node key where the fissure has appeared
60
- * @type {string}
61
- */
62
- this.nodeKey = node(data.Node);
63
-
64
- /**
65
- * The fissure's tier
66
- * @type {string}
67
- */
68
- this.tier = fissureModifier(data.Modifier || data.ActiveMissionTier, locale);
69
-
70
- /**
71
- * The fissure's tier as a number
72
- * @type {number}
73
- */
74
- this.tierNum = fissureTier(data.Modifier || data.ActiveMissionTier, locale);
75
-
76
- /**
77
- * The date and time at which the fissure appeared
78
- * @type {Date}
79
- */
80
- this.activation = parseDate(data.Activation);
81
-
82
- /**
83
- * The date and time at which the fissure will disappear
84
- * @type {Date}
85
- */
86
- this.expiry = parseDate(data.Expiry);
87
-
88
- /**
89
- * Whether this is expired (at time of object creation)
90
- * @type {boolean}
91
- */
92
- this.expired = this.getExpired();
93
-
94
- /**
95
- * ETA string (at time of object creation)
96
- * @type {string}
97
- */
98
- this.eta = this.getETAString();
99
-
100
- /**
101
- * Whether this fissure corresponds to a RailJack Void Storm
102
- * @type {boolean}
103
- */
104
- this.isStorm = Boolean(data.ActiveMissionTier);
105
-
106
- /**
107
- * Whether this fissure is a Steel Path fissure
108
- * @type {boolean}
109
- */
110
- this.isHard = Boolean(data.Hard);
111
- }
112
-
113
- /**
114
- * Get whether this deal has expired
115
- * @returns {boolean} Whether or not the deal has expired
116
- */
117
- getExpired() {
118
- return fromNow(this.expiry) < 0;
119
- }
120
-
121
- /**
122
- * Get a string representation of how long the void fissure will remain active
123
- * @returns {string} The string representation of the fissure's remaining time
124
- */
125
- getETAString() {
126
- return timeDeltaToString(fromNow(this.expiry));
127
- }
128
-
129
- /**
130
- * Returns a string representation of the fissure
131
- * @returns {string} The string representation of the fissure
132
- */
133
- toString() {
134
- return `[${this.getETAString()}] ${this.tier} fissure at ${this.node} - ${this.enemy} ${this.missionType}`;
135
- }
136
- }
@@ -1,123 +0,0 @@
1
- import { parseDate, fromNow, timeDeltaToString, languageString } from 'warframe-worldstate-data/utilities';
2
-
3
- import mdConfig from '../supporting/MarkdownSettings.js';
4
-
5
- /**
6
- * Represents a flash sale
7
- */
8
- export default class FlashSale {
9
- /**
10
- * @param {object} data The flash sale data
11
- * @param {Dependency} deps The dependencies object
12
- * @param {string} deps.locale Locale to use for translations
13
- */
14
- constructor(data, { locale = 'en' } = { locale: 'en' }) {
15
- /**
16
- * The item being offered in the flash sale
17
- * @type {string}
18
- */
19
- this.item = languageString(data.TypeName, locale);
20
-
21
- /**
22
- * The date and time at which the sale will end
23
- * @type {Date}
24
- */
25
- this.expiry = parseDate(data.EndDate);
26
-
27
- /**
28
- * The date and time at which the sale will or did start
29
- * @type {Date}
30
- */
31
- this.activation = parseDate(data.StartDate);
32
-
33
- /**
34
- * The item's discount percentage
35
- * @type {number}
36
- */
37
- this.discount = data.Discount;
38
-
39
- /**
40
- * The item's discounted credit price
41
- * @type {number}
42
- */
43
- this.regularOverride = data.RegularOverride;
44
-
45
- /**
46
- * The item's discounted platinum price
47
- * @type {number}
48
- */
49
- this.premiumOverride = data.PremiumOverride;
50
-
51
- /**
52
- * Whether this item is show in the in-game market
53
- * @type {boolean}
54
- */
55
- this.isShownInMarket = data.ShowInMarket;
56
-
57
- /**
58
- * Whether this item is featured in the in-game market
59
- * @type {boolean}
60
- */
61
- this.isFeatured = data.Featured;
62
-
63
- /**
64
- * Whether this item is marked as popular in the in-game market
65
- * @type {boolean}
66
- */
67
- this.isPopular = data.Popular;
68
-
69
- /**
70
- * Unique identifier for this sale built from the end time and reward
71
- * @type {string}
72
- */
73
- this.id = `${data.TypeName.split('/').slice(-1)[0]}${this.expiry.getTime()}`;
74
-
75
- /**
76
- * Whether or not this is expired (at time of object creation)
77
- * @type {boolean}
78
- */
79
- this.expired = this.getExpired();
80
-
81
- /**
82
- * ETA string (at time of object creation)
83
- * @type {string}
84
- */
85
- this.eta = this.getETAString();
86
- }
87
-
88
- /**
89
- * Get how much time is left before the deal expires
90
- * @returns {string} The time left before the deal expires
91
- */
92
- getETAString() {
93
- return timeDeltaToString(fromNow(this.expiry));
94
- }
95
-
96
- /**
97
- * Get whether or not this deal has expired
98
- * @returns {boolean} Whether or not the deal has expired
99
- */
100
- getExpired() {
101
- return fromNow(this.expiry) < 0;
102
- }
103
-
104
- /**
105
- * Returns a string representation of the flash sale
106
- * @returns {string} The string representation of the flash sale
107
- */
108
- toString() {
109
- const lines = [`${this.item}, ${this.premiumOverride}p`, `Expires in ${this.getETAString()}`];
110
-
111
- if (this.discount) {
112
- lines.unshift(`${this.discount}% off!`);
113
- } else if (this.isShownInMarket) {
114
- lines.unshift('**ShowInMarket**');
115
- } else if (this.isPopular) {
116
- lines.unshift('**Popular**');
117
- } else if (this.isFeatured) {
118
- lines.unshift('**Featured**');
119
- }
120
-
121
- return `${mdConfig.codeBlock}${lines.join(mdConfig.lineEnd)}${mdConfig.blockEnd}`;
122
- }
123
- }