XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

feat: QTCC floofs alerts (#2886)

Re #2842 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2886 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

ca589cb7
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

12 个文件 +130 -3
Modified config-vanilla.json +1 -0
@@ -45,6 +45,7 @@
45 45 "voidCorruption2025Week2": false,
46 46 "voidCorruption2025Week3": false,
47 47 "voidCorruption2025Week4": false,
48 "qtccAlerts": false,
48 49 "galleonOfGhouls": 0,
49 50 "ghoulEmergenceOverride": null,
50 51 "plagueStarOverride": null,
Modified src/services/configService.ts +1 -0
@@ -55,6 +55,7 @@ export interface IConfig {
55 55 voidCorruption2025Week2?: boolean;
56 56 voidCorruption2025Week3?: boolean;
57 57 voidCorruption2025Week4?: boolean;
58 qtccAlerts?: boolean;
58 59 galleonOfGhouls?: number;
59 60 ghoulEmergenceOverride?: boolean;
60 61 plagueStarOverride?: boolean;
Modified src/services/worldStateService.ts +110 -1
@@ -151,7 +151,7 @@ const configAlerts: Record<string, IAlert> = {
151 151 enemySpec: "/Lotus/Types/Game/EnemySpecs/CorpusShipEnemySpecs/CorpusShipSquadDefenseB",
152 152 minEnemyLevel: 20,
153 153 maxEnemyLevel: 25,
154 maxWaveNum: 6
154 maxRotations: 2
155 155 }
156 156 },
157 157 voidCorruption2025Week3: {
@@ -1476,6 +1476,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1476 1476 const weekStart = EPOCH + week * 604800000;
1477 1477 const weekEnd = weekStart + 604800000;
1478 1478 const date = new Date(timeMs);
1479 const defenseWavesPerRotation = buildLabel && version_compare(buildLabel, "2025.03.18.16.07") < 0 ? 5 : 3;
1479 1480
1480 1481 const worldState: IWorldState = {
1481 1482 BuildLabel: typeof buildLabel == "string" ? buildLabel.split(" ").join("+") : buildConfig.buildLabel,
@@ -1569,11 +1570,119 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1569 1570 if (config.worldState) {
1570 1571 for (const [key, alert] of Object.entries(configAlerts)) {
1571 1572 if (config.worldState[key as keyof typeof config.worldState]) {
1573 if (alert.MissionInfo.missionType == "MT_DEFENSE") {
1574 alert.MissionInfo.maxWaveNum = defenseWavesPerRotation * (alert.MissionInfo.maxRotations ?? 1);
1575 alert.MissionInfo.maxRotations = undefined;
1576 }
1572 1577 worldState.Alerts.push(alert);
1573 1578 }
1574 1579 }
1575 1580 }
1576 1581
1582 if (config.worldState?.qtccAlerts) {
1583 worldState.Alerts.push(
1584 {
1585 _id: {
1586 $oid: "68dc23c42e9d3acfa708ff3b"
1587 },
1588 Activation: {
1589 $date: {
1590 $numberLong: "1759327200000"
1591 }
1592 },
1593 Expiry: {
1594 $date: {
1595 $numberLong: "2000000000000"
1596 }
1597 },
1598 MissionInfo: {
1599 location: "SolNode123",
1600 missionType: "MT_SURVIVAL",
1601 faction: "FC_CORPUS",
1602 difficulty: 1,
1603 missionReward: {
1604 credits: 10000,
1605 items: ["/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/Plushy2021QTCC"]
1606 },
1607 levelOverride: "/Lotus/Levels/Proc/Corpus/CorpusShipSurvivalRaid",
1608 enemySpec: "/Lotus/Types/Game/EnemySpecs/CorpusShipEnemySpecs/CorpusShipSurvivalA",
1609 minEnemyLevel: 20,
1610 maxEnemyLevel: 30,
1611 descText: "/Lotus/Language/Alerts/TennoUnitedAlert",
1612 maxWaveNum: 5
1613 },
1614 Tag: "LotusGift",
1615 ForceUnlock: true
1616 },
1617 {
1618 _id: {
1619 $oid: "68dc2466e298b4f04206687a"
1620 },
1621 Activation: {
1622 $date: {
1623 $numberLong: "1759327200000"
1624 }
1625 },
1626 Expiry: {
1627 $date: {
1628 $numberLong: "2000000000000"
1629 }
1630 },
1631 MissionInfo: {
1632 location: "SolNode149",
1633 missionType: "MT_DEFENSE",
1634 faction: "FC_GRINEER",
1635 difficulty: 1,
1636 missionReward: {
1637 credits: 10000,
1638 items: ["/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/Plushy2022QTCC"]
1639 },
1640 levelOverride: "/Lotus/Levels/Proc/Grineer/GrineerShipyardsDefense",
1641 enemySpec: "/Lotus/Types/Game/EnemySpecs/GrineerShipyardsDefenseA",
1642 minEnemyLevel: 20,
1643 maxEnemyLevel: 30,
1644 descText: "/Lotus/Language/Alerts/TennoUnitedAlert",
1645 maxWaveNum: defenseWavesPerRotation * 1
1646 },
1647 Tag: "LotusGift",
1648 ForceUnlock: true
1649 },
1650 {
1651 _id: {
1652 $oid: "68dc26865e7cb56b820b4252"
1653 },
1654 Activation: {
1655 $date: {
1656 $numberLong: "1759327200000"
1657 }
1658 },
1659 Expiry: {
1660 $date: {
1661 $numberLong: "2000000000000"
1662 }
1663 },
1664 MissionInfo: {
1665 location: "SolNode39",
1666 missionType: "MT_EXCAVATE",
1667 faction: "FC_GRINEER",
1668 difficulty: 1,
1669 missionReward: {
1670 credits: 10000,
1671 items: ["/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/PlushyVirminkQTCC"]
1672 },
1673 levelOverride: "/Lotus/Levels/Proc/Grineer/GrineerForestExcavation",
1674 enemySpec: "/Lotus/Types/Game/EnemySpecs/ForestGrineerExcavationA",
1675 minEnemyLevel: 20,
1676 maxEnemyLevel: 30,
1677 descText: "/Lotus/Language/Alerts/TennoUnitedAlert",
1678 maxWaveNum: 5
1679 },
1680 Tag: "LotusGift",
1681 ForceUnlock: true
1682 }
1683 );
1684 }
1685
1577 1686 const isFebruary = date.getUTCMonth() == 1;
1578 1687 if (config.worldState?.starDaysOverride ?? isFebruary) {
1579 1688 worldState.Goals.push({
Modified src/types/worldStateTypes.ts +7 -2
@@ -1,4 +1,4 @@
1 import type { IMissionReward, TFaction } from "warframe-public-export-plus";
1 import type { IMissionReward, TFaction, TMissionType } from "warframe-public-export-plus";
2 2 import type { IMongoDate, IOid } from "./commonTypes.ts";
3 3
4 4 export interface IWorldState {
@@ -40,11 +40,13 @@ export interface IAlert {
40 40 Activation: IMongoDate;
41 41 Expiry: IMongoDate;
42 42 MissionInfo: IAlertMissionInfo;
43 Tag?: string;
44 ForceUnlock?: true;
43 45 }
44 46
45 47 export interface IAlertMissionInfo {
46 48 location: string;
47 missionType: string;
49 missionType: TMissionType;
48 50 faction: TFaction;
49 51 difficulty: number;
50 52 missionReward?: IMissionReward;
@@ -55,6 +57,9 @@ export interface IAlertMissionInfo {
55 57 minEnemyLevel?: number;
56 58 maxEnemyLevel?: number;
57 59 maxWaveNum?: number;
60 descText?: string;
61
62 maxRotations?: number; // SNS specific field
58 63 }
59 64
60 65 export interface IGoal {
Modified static/webui/index.html +4 -0
@@ -1189,6 +1189,10 @@
1189 1189 <label class="form-check-label" for="worldState.hallowedFlame" data-loc="worldState_hallowedFlame"></label>
1190 1190 <abbr data-loc-inc="worldState_hallowedNightmares|worldState_dogDays|worldState_anniversary"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><path d="M320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM320 200C333.3 200 344 210.7 344 224L344 336C344 349.3 333.3 360 320 360C306.7 360 296 349.3 296 336L296 224C296 210.7 306.7 200 320 200zM293.3 416C292.7 406.1 297.6 396.7 306.1 391.5C314.6 386.4 325.3 386.4 333.8 391.5C342.3 396.7 347.2 406.1 346.6 416C347.2 425.9 342.3 435.3 333.8 440.5C325.3 445.6 314.6 445.6 306.1 440.5C297.6 435.3 292.7 425.9 293.3 416z"/></svg></abbr>
1191 1191 </div>
1192 <div class="form-check">
1193 <input class="form-check-input" type="checkbox" id="worldState.qtccAlerts" />
1194 <label class="form-check-label" for="worldState.qtccAlerts" data-loc="worldState_qtccAlerts"></label>
1195 </div>
1192 1196 <div class="form-group mt-2 d-flex gap-2">
1193 1197 <div class="flex-fill">
1194 1198 <label class="form-label" for="worldState.hallowedNightmares" data-loc="worldState_hallowedNightmares"></label>
Modified static/webui/translations/de.js +1 -0
@@ -294,6 +294,7 @@ dict = {
294 294 worldState_eightClawProgressOverride: `[UNTRANSLATED] Eight Claw Progress`,
295 295 worldState_thermiaFractures: `Thermische Risse`,
296 296 worldState_thermiaFracturesProgressOverride: `[UNTRANSLATED] Thermia Fractures Progress`,
297 worldState_qtccAlerts: `[UNTRANSLATED] Quest to Conquer Cancer Alerts`,
297 298 worldState_from_year: `[UNTRANSLATED] from |VAL|`,
298 299 worldState_pre_year: `[UNTRANSLATED] pre |VAL|`,
299 300 worldState_week: `[UNTRANSLATED] Week |VAL|`,
Modified static/webui/translations/en.js +1 -0
@@ -293,6 +293,7 @@ dict = {
293 293 worldState_eightClawProgressOverride: `Eight Claw Progress`,
294 294 worldState_thermiaFractures: `Thermia Fractures`,
295 295 worldState_thermiaFracturesProgressOverride: `Thermia Fractures Progress`,
296 worldState_qtccAlerts: `Quest to Conquer Cancer Alerts`,
296 297 worldState_from_year: `from |VAL|`,
297 298 worldState_pre_year: `pre |VAL|`,
298 299 worldState_week: `Week |VAL|`,
Modified static/webui/translations/es.js +1 -0
@@ -294,6 +294,7 @@ dict = {
294 294 worldState_eightClawProgressOverride: `Progreso de Octava Garra`,
295 295 worldState_thermiaFractures: `Fracturas Thermia`,
296 296 worldState_thermiaFracturesProgressOverride: `Progreso de Fracturas Thermia`,
297 worldState_qtccAlerts: `[UNTRANSLATED] Quest to Conquer Cancer Alerts`,
297 298 worldState_from_year: `de |VAL|`,
298 299 worldState_pre_year: `antes de |VAL|`,
299 300 worldState_week: `Semana |VAL|`,
Modified static/webui/translations/fr.js +1 -0
@@ -294,6 +294,7 @@ dict = {
294 294 worldState_eightClawProgressOverride: `Progrès de la Huitième Griffe`,
295 295 worldState_thermiaFractures: `Crevasses Thermia`,
296 296 worldState_thermiaFracturesProgressOverride: `Progrès des Fractures Thermia`,
297 worldState_qtccAlerts: `[UNTRANSLATED] Quest to Conquer Cancer Alerts`,
297 298 worldState_from_year: `de |VAL|`,
298 299 worldState_pre_year: `pre-|VAL|`,
299 300 worldState_week: `Semaine |VAL|`,
Modified static/webui/translations/ru.js +1 -0
@@ -294,6 +294,7 @@ dict = {
294 294 worldState_eightClawProgressOverride: `Прогресс Восьми когтей`,
295 295 worldState_thermiaFractures: `Разломы Термии`,
296 296 worldState_thermiaFracturesProgressOverride: `Прогресс Разломов Термии`,
297 worldState_qtccAlerts: `Тревоги Quest to Conquer Cancer`,
297 298 worldState_from_year: `из |VAL|`,
298 299 worldState_pre_year: `до |VAL|`,
299 300 worldState_week: `Неделя |VAL|`,
Modified static/webui/translations/uk.js +1 -0
@@ -294,6 +294,7 @@ dict = {
294 294 worldState_eightClawProgressOverride: `Прогрес Восьми кігтів`,
295 295 worldState_thermiaFractures: `Розломи термії`,
296 296 worldState_thermiaFracturesProgressOverride: `Прогрес Розломів термії`,
297 worldState_qtccAlerts: `[UNTRANSLATED] Quest to Conquer Cancer Alerts`,
297 298 worldState_from_year: `з |VAL|`,
298 299 worldState_pre_year: `до |VAL|`,
299 300 worldState_week: `Тиждень |VAL|`,
Modified static/webui/translations/zh.js +1 -0
@@ -294,6 +294,7 @@ dict = {
294 294 worldState_eightClawProgressOverride: `大帝金币收集进度(%)`,
295 295 worldState_thermiaFractures: `热美亚裂缝`,
296 296 worldState_thermiaFracturesProgressOverride: `[UNTRANSLATED] Thermia Fractures Progress`,
297 worldState_qtccAlerts: `[UNTRANSLATED] Quest to Conquer Cancer Alerts`,
297 298 worldState_from_year: `|VAL|`,
298 299 worldState_pre_year: `|VAL|之前`,
299 300 worldState_week: `第|VAL|周`,