test
All checks were successful
Build / build (18) (push) Successful in 39s
Build / build (22) (push) Successful in 1m0s
Build / build (20) (push) Successful in 1m5s

This commit is contained in:
Ordis 2025-02-21 14:17:08 +01:00
parent 4d7b3b543b
commit 230534f243
3 changed files with 19 additions and 9 deletions

View File

@ -13,7 +13,8 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
| "completeAll"
| "ResetAll"
| "completeAllUnlocked"
| "updateKey";
| "updateKey"
| "giveAllQuests";
const questKeyUpdate = req.body as IUpdateQuestRequest["QuestKeys"];
const allQuestKeys: string[] = [];
@ -105,6 +106,12 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
inventory.ActiveQuest = "";
break;
}
case "giveAllQuests": {
for (const questKey of allQuestKeys) {
addQuestKey(inventory, { ItemType: questKey });
}
break;
}
}
await inventory.save();

View File

@ -539,10 +539,12 @@
</form>
<h5 class="mt-3" data-loc="cheats_quests"></h6>
<div class="mb-2 d-flex flex-wrap gap-2">
<button class="btn btn-primary" onclick="doQuestUpdate('unlockAll');" data-loc="cheats_quests_UnlockAll"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('completeAll');" data-loc="cheats_quests_CompleteAll"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('completeAllUnlocked');" data-loc="cheats_quests_CompleteAllUnlocked"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('ResetAll');" data-loc="cheats_quests_ResetAll"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('unlockAll');" data-loc="cheats_quests_unlockAll"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('completeAll');" data-loc="cheats_quests_completeAll"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('completeAllUnlocked');" data-loc="cheats_quests_completeAllUnlocked"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('ResetAll');" data-loc="cheats_quests_resetAll"></button>
<button class="btn btn-primary" onclick="doQuestUpdate('giveAll');" data-loc="cheats_quests_giveAll"></button>
</div>
</div>
</div>

View File

@ -118,10 +118,11 @@ dict = {
cheats_changeButton: `Change`,
cheats_none: `None`,
cheats_quests: `Quests`,
cheats_quests_UnlockAll: `Unlock All Quests`,
cheats_quests_CompleteAll: `Complete All Quests`,
cheats_quests_CompleteAllUnlocked: `Complete All Unlocked Quests`,
cheats_quests_ResetAll: `Reset All Quests`,
cheats_quests_unlockAll: `Unlock All Quests`,
cheats_quests_completeAll: `Complete All Quests`,
cheats_quests_completeAllUnlocked: `Complete All Unlocked Quests`,
cheats_quests_resetAll: `Reset All Quests`,
cheats_quests_giveAll: `Give All Quests`,
import_importNote: `You can provide a full or partial inventory response (client respresentation) here. All fields that are supported by the importer <b>will be overwritten</b> in your account.`,
import_submit: `Submit`
};