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: isleweaver fragments (#3935)

Closes #3934 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3935 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

3639e5a6
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

3 个文件 +41 -1
Modified src/controllers/api/inventoryController.ts +1 -1
@@ -641,7 +641,7 @@ export const getInventoryResponse = async (
641 641 // Old versions crash when faced with an unrecognised CollectibleType, so filter this array.
642 642 if (inventoryResponse.CollectibleSeries && version_compare(buildLabel, gameToBuildVersion["33.0.0"]) < 0) {
643 643 inventoryResponse.CollectibleSeries = inventoryResponse.CollectibleSeries.filter(
644 x => x.CollectibleType != "/Lotus/Types/Lore/Fragments/DuviriFragments/DuviriCollectibleDeco"
644 x => x.CollectibleType == "/Lotus/Objects/Orokin/Props/CollectibleSeriesOne"
645 645 );
646 646
647 647 // U22.13.4 crashes if there's more than 64 characters + a '1' here.
Modified src/controllers/custom/unlockAllScansController.ts +24 -0
@@ -97,6 +97,30 @@ export const unlockAllScansController: RequestHandler = async (req, res) => {
97 97 "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
98 98 }
99 99
100 // Unlock all isleweaver fragments
101 let spiderSeries = inventory.CollectibleSeries.find(
102 x => x.CollectibleType == "/Lotus/Types/Lore/Fragments/DuviriMITWFragments/DuviriMITWCollectibleDeco"
103 );
104 if (!spiderSeries) {
105 spiderSeries =
106 inventory.CollectibleSeries[
107 inventory.CollectibleSeries.push({
108 CollectibleType: "/Lotus/Types/Lore/Fragments/DuviriMITWFragments/DuviriMITWCollectibleDeco",
109 Count: 0,
110 Tracking:
111 "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
112 ReqScans: 15,
113 IncentiveStates: []
114 }) - 1
115 ];
116 }
117 if (spiderSeries.Count != spiderSeries.ReqScans) {
118 spiderSeries.Count = spiderSeries.ReqScans;
119 spiderSeries.Tracking =
120 "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
121 await updateIncentiveStates(accountId, spiderSeries);
122 }
123
100 124 // Unlock all lore fragment scans
101 125 const existingPrex = new Set<string>();
102 126 for (const lfs of inventory.LoreFragmentScans) {
Modified src/services/inventoryService.ts +16 -0
@@ -3176,5 +3176,21 @@ export const updateIncentiveStates = async (
3176 3176 if (progress >= 1.0) {
3177 3177 await createMessage(accountId, [kuriaMessage100]);
3178 3178 }
3179 } else if (entry.CollectibleType == "/Lotus/Types/Lore/Fragments/DuviriMITWFragments/DuviriMITWCollectibleDeco") {
3180 if (entry.Count == entry.ReqScans) {
3181 await createMessage(accountId, [
3182 {
3183 sub: "/Lotus/Language/Isleweaver/IsleweaverFragmentInboxMessageSender",
3184 sndr: "/Lotus/Language/Isleweaver/IsleweaverFragmentInboxMessageSubject",
3185 msg: "/Lotus/Language/Isleweaver/IsleweaverFragmentInboxMessageBody",
3186 icon: "/Lotus/Interface/Icons/Npcs/UnknownSource.png",
3187 att: [
3188 "/Lotus/Types/Items/ShipDecos/Duviri/Mitw/RusalkaHat",
3189 "/Lotus/Types/Items/ShipDecos/Duviri/Mitw/RusalkaMedals"
3190 ],
3191 highPriority: true
3192 }
3193 ]);
3194 }
3179 3195 }
3180 3196 };