feat: finishInvasionsInOneMission (#2715)

#2646

Co-authored-by: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com>
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Reviewed-on: OpenWF/SpaceNinjaServer#2715
Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com>
Co-authored-by: AlexisinGit <alexisingit@noreply.localhost>
Co-committed-by: AlexisinGit <alexisingit@noreply.localhost>
This commit is contained in:
AlexisinGit 2025-08-29 17:36:11 -07:00 committed by Sainan
parent a2171c80a5
commit 9add016d7b
12 changed files with 19 additions and 1 deletions

View File

@ -31,7 +31,7 @@ fs.readdirSync("../static/webui/translations").forEach(file => {
const strings = extractStrings(line);
if (Object.keys(strings).length > 0) {
Object.entries(strings).forEach(([key, value]) => {
if (targetStrings.hasOwnProperty(key) && !targetStrings[key].startsWith("[UNTRANSLATED] ")) {
if (targetStrings.hasOwnProperty(key) && !targetStrings[key].startsWith("[UNTRANSLATED]")) {
fs.writeSync(fileHandle, ` ${key}: \`${targetStrings[key]}\`,\n`);
} else {
fs.writeSync(fileHandle, ` ${key}: \`[UNTRANSLATED] ${value}\`,\n`);

View File

@ -1435,6 +1435,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
dontSubtractPurchaseStandingCost: Boolean,
dontSubtractVoidTraces: Boolean,
dontSubtractConsumables: Boolean,
finishInvasionsInOneMission: Boolean,
infiniteCredits: Boolean,
infinitePlatinum: Boolean,
infiniteEndo: Boolean,

View File

@ -775,6 +775,11 @@ export const addMissionInventoryUpdates = async (
}
case "InvasionProgress": {
for (const clientProgress of value) {
if (inventory.finishInvasionsInOneMission) {
clientProgress.Delta *= 3;
clientProgress.AttackerScore *= 3;
clientProgress.DefenderScore *= 3;
}
const dbProgress = inventory.QualifyingInvasions.find(x =>
x.invasionId.equals(clientProgress._id.$oid)
);

View File

@ -28,6 +28,7 @@ export interface IAccountCheats {
dontSubtractPurchaseStandingCost?: boolean;
dontSubtractVoidTraces?: boolean;
dontSubtractConsumables?: boolean;
finishInvasionsInOneMission?: boolean;
infiniteCredits?: boolean;
infinitePlatinum?: boolean;
infiniteEndo?: boolean;

View File

@ -783,6 +783,10 @@
<input class="form-check-input" type="checkbox" id="disableDailyTribute" />
<label class="form-check-label" for="disableDailyTribute" data-loc="cheats_disableDailyTribute"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="finishInvasionsInOneMission" />
<label class="form-check-label" for="finishInvasionsInOneMission" data-loc="cheats_finishInvasionsInOneMission"></label>
</div>
<div class="mt-2 mb-2 d-flex flex-wrap gap-2">
<button class="btn btn-primary" onclick="debounce(doUnlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
<button class="btn btn-primary" onclick="debounce(markAllAsRead);" data-loc="cheats_markAllAsRead"></button>

View File

@ -238,6 +238,7 @@ dict = {
cheats_changeSupportedSyndicate: `Unterstütztes Syndikat`,
cheats_changeButton: `Ändern`,
cheats_markAllAsRead: `Posteingang als gelesen markieren`,
cheats_finishInvasionsInOneMission: `[UNTRANSLATED] Finish Invasions in One Mission`,
worldState: `Weltstatus`,
worldState_creditBoost: `Event Booster: Credit`,

View File

@ -237,6 +237,7 @@ dict = {
cheats_changeSupportedSyndicate: `Supported syndicate`,
cheats_changeButton: `Change`,
cheats_markAllAsRead: `Mark Inbox As Read`,
cheats_finishInvasionsInOneMission: `Finish Invasions in One Mission`,
worldState: `World State`,
worldState_creditBoost: `Credit Boost`,

View File

@ -238,6 +238,7 @@ dict = {
cheats_changeSupportedSyndicate: `Sindicatos disponibles`,
cheats_changeButton: `Cambiar`,
cheats_markAllAsRead: `Marcar bandeja de entrada como leída`,
cheats_finishInvasionsInOneMission: `[UNTRANSLATED] Finish Invasions in One Mission`,
worldState: `Estado del mundo`,
worldState_creditBoost: `Potenciador de Créditos`,

View File

@ -238,6 +238,7 @@ dict = {
cheats_changeSupportedSyndicate: `Allégeance`,
cheats_changeButton: `Changer`,
cheats_markAllAsRead: `Marquer la boîte de réception comme lue`,
cheats_finishInvasionsInOneMission: `[UNTRANSLATED] Finish Invasions in One Mission`,
worldState: `Carte Solaire`,
worldState_creditBoost: `Booster de Crédit`,

View File

@ -238,6 +238,7 @@ dict = {
cheats_changeSupportedSyndicate: `Поддерживаемый синдикат`,
cheats_changeButton: `Изменить`,
cheats_markAllAsRead: `Пометить все входящие как прочитанные`,
cheats_finishInvasionsInOneMission: `[UNTRANSLATED] Finish Invasions in One Mission`,
worldState: `Состояние мира`,
worldState_creditBoost: `Глобальный бустер Кредитов`,

View File

@ -238,6 +238,7 @@ dict = {
cheats_changeSupportedSyndicate: `Підтримуваний синдикат`,
cheats_changeButton: `Змінити`,
cheats_markAllAsRead: `Помітити всі вхідні як прочитані`,
cheats_finishInvasionsInOneMission: `[UNTRANSLATED] Finish Invasions in One Mission`,
worldState: `Стан світу`,
worldState_creditBoost: `Глобальне посилення Кредитів`,

View File

@ -238,6 +238,7 @@ dict = {
cheats_changeSupportedSyndicate: `支持的集团`,
cheats_changeButton: `更改`,
cheats_markAllAsRead: `收件箱全部标记为已读`,
cheats_finishInvasionsInOneMission: `一场任务完成整场入侵`,
worldState: `世界状态配置`,
worldState_creditBoost: `现金加成`,