From 0a28eab65db7568d8d86934737118f5fe6d52581 Mon Sep 17 00:00:00 2001
From: Sainan <63328889+Sainan@users.noreply.github.com>
Date: Wed, 30 Jul 2025 01:50:43 -0700
Subject: [PATCH] feat: worldState.tennoLiveRelay config (#2568)
Re #2531
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2568
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
---
 config.json.example               |  1 +
 src/services/configService.ts     |  1 +
 src/services/worldStateService.ts | 26 ++++++++++++++++++++++++++
 static/webui/index.html           |  4 ++++
 static/webui/translations/de.js   |  1 +
 static/webui/translations/en.js   |  1 +
 static/webui/translations/es.js   |  1 +
 static/webui/translations/fr.js   |  1 +
 static/webui/translations/ru.js   |  1 +
 static/webui/translations/zh.js   |  1 +
 10 files changed, 38 insertions(+)
diff --git a/config.json.example b/config.json.example
index 66276fb3..94bd5744 100644
--- a/config.json.example
+++ b/config.json.example
@@ -70,6 +70,7 @@
     "creditBoost": false,
     "affinityBoost": false,
     "resourceBoost": false,
+    "tennoLiveRelay": false,
     "starDays": true,
     "galleonOfGhouls": 0,
     "eidolonOverride": "",
diff --git a/src/services/configService.ts b/src/services/configService.ts
index 3fd0483e..d76db1bd 100644
--- a/src/services/configService.ts
+++ b/src/services/configService.ts
@@ -81,6 +81,7 @@ export interface IConfig {
         creditBoost?: boolean;
         affinityBoost?: boolean;
         resourceBoost?: boolean;
+        tennoLiveRelay?: boolean;
         starDays?: boolean;
         galleonOfGhouls?: number;
         eidolonOverride?: string;
diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts
index ac4f9b5d..69b3eb2d 100644
--- a/src/services/worldStateService.ts
+++ b/src/services/worldStateService.ts
@@ -1375,6 +1375,32 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
         worldState.PVPChallengeInstances = [];
     }
 
+    if (config.worldState?.tennoLiveRelay) {
+        worldState.Goals.push({
+            _id: {
+                $oid: "687bf9400000000000000000"
+            },
+            Activation: {
+                $date: {
+                    $numberLong: "1752955200000"
+                }
+            },
+            Expiry: {
+                $date: {
+                    $numberLong: "2000000000000"
+                }
+            },
+            Count: 0,
+            Goal: 0,
+            Success: 0,
+            Personal: true,
+            Desc: "/Lotus/Language/Locations/RelayStationTennoConB",
+            ToolTip: "/Lotus/Language/Locations/RelayStationTennoConDescB",
+            Icon: "/Lotus/Interface/Icons/Categories/IconTennoLive.png",
+            Tag: "TennoConRelayB",
+            Node: "TennoConBHUB6"
+        });
+    }
     if (config.worldState?.starDays) {
         worldState.Goals.push({
             _id: { $oid: "67a4dcce2a198564d62e1647" },
diff --git a/static/webui/index.html b/static/webui/index.html
index 0e0a6941..78deadc7 100644
--- a/static/webui/index.html
+++ b/static/webui/index.html
@@ -925,6 +925,10 @@
                                     
                                     
                                 
+                                
+                                    
+                                    
+                                
                                 
                                     
                                     
diff --git a/static/webui/translations/de.js b/static/webui/translations/de.js
index 2a325d4c..1ad0b9d1 100644
--- a/static/webui/translations/de.js
+++ b/static/webui/translations/de.js
@@ -242,6 +242,7 @@ dict = {
     worldState_creditBoost: `Event Booster: Credit`,
     worldState_affinityBoost: `Event Booster: Erfahrung`,
     worldState_resourceBoost: `Event Booster: Ressourcen`,
+    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
     worldState_starDays: `Sternen-Tage`,
     worldState_galleonOfGhouls: `Galeone der Ghule`,
     disabled: `Deaktiviert`,
diff --git a/static/webui/translations/en.js b/static/webui/translations/en.js
index b825f923..90c548d6 100644
--- a/static/webui/translations/en.js
+++ b/static/webui/translations/en.js
@@ -241,6 +241,7 @@ dict = {
     worldState_creditBoost: `Credit Boost`,
     worldState_affinityBoost: `Affinity Boost`,
     worldState_resourceBoost: `Resource Boost`,
+    worldState_tennoLiveRelay: `TennoLive Relay`,
     worldState_starDays: `Star Days`,
     worldState_galleonOfGhouls: `Galleon of Ghouls`,
     disabled: `Disabled`,
diff --git a/static/webui/translations/es.js b/static/webui/translations/es.js
index 84390567..43f2f3cf 100644
--- a/static/webui/translations/es.js
+++ b/static/webui/translations/es.js
@@ -242,6 +242,7 @@ dict = {
     worldState_creditBoost: `Potenciador de Créditos`,
     worldState_affinityBoost: `Potenciador de Afinidad`,
     worldState_resourceBoost: `Potenciador de Recursos`,
+    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
     worldState_starDays: `Días estelares`,
     worldState_galleonOfGhouls: `Galeón de Gules`,
     disabled: `Desactivado`,
diff --git a/static/webui/translations/fr.js b/static/webui/translations/fr.js
index 626591f5..c582ac39 100644
--- a/static/webui/translations/fr.js
+++ b/static/webui/translations/fr.js
@@ -242,6 +242,7 @@ dict = {
     worldState_creditBoost: `Booster de Crédit`,
     worldState_affinityBoost: `Booster d'Affinité`,
     worldState_resourceBoost: `Booster de Ressource`,
+    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
     worldState_starDays: `Jours Stellaires`,
     worldState_galleonOfGhouls: `Galion des Goules`,
     disabled: `Désactivé`,
diff --git a/static/webui/translations/ru.js b/static/webui/translations/ru.js
index 5af30117..502cd69d 100644
--- a/static/webui/translations/ru.js
+++ b/static/webui/translations/ru.js
@@ -242,6 +242,7 @@ dict = {
     worldState_creditBoost: `[UNTRANSLATED] Credit Boost`,
     worldState_affinityBoost: `[UNTRANSLATED] Affinity Boost`,
     worldState_resourceBoost: `[UNTRANSLATED] Resource Boost`,
+    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
     worldState_starDays: `[UNTRANSLATED] Star Days`,
     worldState_galleonOfGhouls: `[UNTRANSLATED] Galleon of Ghouls`,
     disabled: `[UNTRANSLATED] Disabled`,
diff --git a/static/webui/translations/zh.js b/static/webui/translations/zh.js
index d7ceb437..dfb44f40 100644
--- a/static/webui/translations/zh.js
+++ b/static/webui/translations/zh.js
@@ -242,6 +242,7 @@ dict = {
     worldState_creditBoost: `现金加成`,
     worldState_affinityBoost: `经验加成`,
     worldState_resourceBoost: `资源加成`,
+    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
     worldState_starDays: `活动:星日`,
     worldState_galleonOfGhouls: `战术警报:尸鬼的帆船战舰`,
     disabled: `关闭/取消配置`,