返回提交历史
Modified
src/controllers/api/inventoryController.ts
+11
-0
Modified
src/services/configService.ts
+1
-0
Modified
src/services/worldStateService.ts
+47
-17
Modified
static/webui/index.html
+4
-0
Modified
static/webui/translations/de.js
+1
-0
Modified
static/webui/translations/en.js
+1
-0
Modified
static/webui/translations/es.js
+1
-0
Modified
static/webui/translations/fr.js
+1
-0
Modified
static/webui/translations/ru.js
+1
-0
Modified
static/webui/translations/zh.js
+1
-0
XFEstudio/XFESpaceNinjaServer
feat: worldState.baroTennoConRelay config (#2574)
Closes #2531 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2574 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
f561884f
代码差异
10 个文件
+69
-17
@@ -335,6 +335,17 @@ export const getInventoryResponse = async (
335
335
for (const uniqueName in ExportFlavour) {
336
336
inventoryResponse.FlavourItems.push({ ItemType: uniqueName });
337
337
}
338
} else if (config.worldState?.baroTennoConRelay) {
339
[
340
"/Lotus/Types/Items/Events/TennoConRelay2022EarlyAccess",
341
"/Lotus/Types/Items/Events/TennoConRelay2023EarlyAccess",
342
"/Lotus/Types/Items/Events/TennoConRelay2024EarlyAccess",
343
"/Lotus/Types/Items/Events/TennoConRelay2025EarlyAccess"
344
].forEach(uniqueName => {
345
if (!inventoryResponse.FlavourItems.some(x => x.ItemType == uniqueName)) {
346
inventoryResponse.FlavourItems.push({ ItemType: uniqueName });
347
}
348
});
338
349
}
339
350
340
351
if (config.unlockAllSkins) {
@@ -82,6 +82,7 @@ export interface IConfig {
82
82
affinityBoost?: boolean;
83
83
resourceBoost?: boolean;
84
84
tennoLiveRelay?: boolean;
85
baroTennoConRelay?: boolean;
85
86
galleonOfGhouls?: number;
86
87
starDaysOverride?: boolean;
87
88
eidolonOverride?: string;
@@ -1157,6 +1157,25 @@ const getIdealTimeSatsifyingConstraints = (constraints: ITimeConstraint[]): numb
1157
1157
return timeSecs;
1158
1158
};
1159
1159
1160
const fullyStockBaro = (vt: IVoidTrader): void => {
1161
for (const armorSet of baro.armorSets) {
1162
if (Array.isArray(armorSet[0])) {
1163
for (const set of armorSet as IVoidTraderOffer[][]) {
1164
for (const item of set) {
1165
vt.Manifest.push(item);
1166
}
1167
}
1168
} else {
1169
for (const item of armorSet as IVoidTraderOffer[]) {
1170
vt.Manifest.push(item);
1171
}
1172
}
1173
}
1174
for (const item of baro.rest) {
1175
vt.Manifest.push(item);
1176
}
1177
};
1178
1160
1179
const getVarziaRotation = (week: number): string => {
1161
1180
const seed = new SRng(week).randomInt(0, 100_000);
1162
1181
const rng = new SRng(seed);
@@ -1402,6 +1421,33 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1402
1421
Node: "TennoConBHUB6"
1403
1422
});
1404
1423
}
1424
if (config.worldState?.baroTennoConRelay) {
1425
worldState.Goals.push({
1426
_id: { $oid: "687bb2f00000000000000000" },
1427
Activation: { $date: { $numberLong: "1752937200000" } },
1428
Expiry: { $date: { $numberLong: "2000000000000" } },
1429
Count: 0,
1430
Goal: 0,
1431
Success: 0,
1432
Personal: true,
1433
//"Faction": "FC_GRINEER",
1434
Desc: "/Lotus/Language/Locations/RelayStationTennoCon",
1435
ToolTip: "/Lotus/Language/Locations/RelayStationTennoConDesc",
1436
Icon: "/Lotus/Interface/Icons/Categories/IconTennoConSigil.png",
1437
Tag: "TennoConRelay",
1438
Node: "TennoConHUB2"
1439
});
1440
const vt: IVoidTrader = {
1441
_id: { $oid: "687809030379266d790495c6" },
1442
Activation: { $date: { $numberLong: "1752937200000" } },
1443
Expiry: { $date: { $numberLong: "2000000000000" } },
1444
Character: "Baro'Ki Teel",
1445
Node: "TennoConHUB2",
1446
Manifest: []
1447
};
1448
worldState.VoidTraders.push(vt);
1449
fullyStockBaro(vt);
1450
}
1405
1451
const isFebruary = date.getUTCMonth() == 1;
1406
1452
if (config.worldState?.starDaysOverride ?? isFebruary) {
1407
1453
worldState.Goals.push({
@@ -1633,24 +1679,8 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1633
1679
};
1634
1680
worldState.VoidTraders.push(vt);
1635
1681
if (isBeforeNextExpectedWorldStateRefresh(timeMs, baroActualStart)) {
1636
vt.Manifest = [];
1637
1682
if (config.baroFullyStocked) {
1638
for (const armorSet of baro.armorSets) {
1639
if (Array.isArray(armorSet[0])) {
1640
for (const set of armorSet as IVoidTraderOffer[][]) {
1641
for (const item of set) {
1642
vt.Manifest.push(item);
1643
}
1644
}
1645
} else {
1646
for (const item of armorSet as IVoidTraderOffer[]) {
1647
vt.Manifest.push(item);
1648
}
1649
}
1650
}
1651
for (const item of baro.rest) {
1652
vt.Manifest.push(item);
1653
}
1683
fullyStockBaro(vt);
1654
1684
} else {
1655
1685
const rng = new SRng(new SRng(baroIndex).randomInt(0, 100_000));
1656
1686
// TOVERIFY: Constraint for upgrades amount?
@@ -929,6 +929,10 @@
929
929
<input class="form-check-input" type="checkbox" id="worldState.tennoLiveRelay" />
930
930
<label class="form-check-label" for="worldState.tennoLiveRelay" data-loc="worldState_tennoLiveRelay"></label>
931
931
</div>
932
<div class="form-check">
933
<input class="form-check-input" type="checkbox" id="worldState.baroTennoConRelay" />
934
<label class="form-check-label" for="worldState.baroTennoConRelay" data-loc="worldState_baroTennoConRelay"></label>
935
</div>
932
936
<div class="form-check">
933
937
<input class="form-check-input" type="checkbox" id="worldState.varziaFullyStocked" />
934
938
<label class="form-check-label" for="worldState.varziaFullyStocked" data-loc="worldState_varziaFullyStocked"></label>
@@ -243,6 +243,7 @@ dict = {
243
243
worldState_affinityBoost: `Event Booster: Erfahrung`,
244
244
worldState_resourceBoost: `Event Booster: Ressourcen`,
245
245
worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
246
worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
246
247
worldState_starDays: `Sternen-Tage`,
247
248
worldState_galleonOfGhouls: `Galeone der Ghule`,
248
249
enabled: `[UNTRANSLATED] Enabled`,
@@ -242,6 +242,7 @@ dict = {
242
242
worldState_affinityBoost: `Affinity Boost`,
243
243
worldState_resourceBoost: `Resource Boost`,
244
244
worldState_tennoLiveRelay: `TennoLive Relay`,
245
worldState_baroTennoConRelay: `Baro's TennoCon Relay`,
245
246
worldState_starDays: `Star Days`,
246
247
worldState_galleonOfGhouls: `Galleon of Ghouls`,
247
248
enabled: `Enabled`,
@@ -243,6 +243,7 @@ dict = {
243
243
worldState_affinityBoost: `Potenciador de Afinidad`,
244
244
worldState_resourceBoost: `Potenciador de Recursos`,
245
245
worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
246
worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
246
247
worldState_starDays: `Días estelares`,
247
248
worldState_galleonOfGhouls: `Galeón de Gules`,
248
249
enabled: `[UNTRANSLATED] Enabled`,
@@ -243,6 +243,7 @@ dict = {
243
243
worldState_affinityBoost: `Booster d'Affinité`,
244
244
worldState_resourceBoost: `Booster de Ressource`,
245
245
worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
246
worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
246
247
worldState_starDays: `Jours Stellaires`,
247
248
worldState_galleonOfGhouls: `Galion des Goules`,
248
249
enabled: `[UNTRANSLATED] Enabled`,
@@ -243,6 +243,7 @@ dict = {
243
243
worldState_affinityBoost: `[UNTRANSLATED] Affinity Boost`,
244
244
worldState_resourceBoost: `[UNTRANSLATED] Resource Boost`,
245
245
worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
246
worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
246
247
worldState_starDays: `[UNTRANSLATED] Star Days`,
247
248
worldState_galleonOfGhouls: `[UNTRANSLATED] Galleon of Ghouls`,
248
249
enabled: `[UNTRANSLATED] Enabled`,
@@ -243,6 +243,7 @@ dict = {
243
243
worldState_affinityBoost: `经验加成`,
244
244
worldState_resourceBoost: `资源加成`,
245
245
worldState_tennoLiveRelay: `TennoLive 中继站`,
246
worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
246
247
worldState_starDays: `活动:星日`,
247
248
worldState_galleonOfGhouls: `战术警报:尸鬼的帆船战舰`,
248
249
enabled: `启用`,