返回提交历史
Modified
src/controllers/api/guildTechController.ts
+9
-1
XFEstudio/SpaceNinjaServer
fix: isPersonalResearch false positive (#4344)
close #4343 --------- Co-authored-by: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4344 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AlexisinGit <209+alexisingit@noreply.localhost> Co-committed-by: AlexisinGit <209+alexisingit@noreply.localhost>
edc42c82
代码差异
1 个文件
+9
-1
@@ -509,7 +509,7 @@ const isPersonalResearch = (uniqueName: string): boolean | null => {
509
509
if (!(uniqueName in ExportDojoRecipes.research)) {
510
510
return null;
511
511
}
512
return uniqueName in ExportDojoRecipes.fabrications || !!ExportDojoRecipes.research[uniqueName].resultType;
512
return !!ExportDojoRecipes.research[uniqueName].resultType;
513
513
};
514
514
515
515
const getSalvageCategory = (
@@ -582,4 +582,12 @@ export const selfTestGuildTech = (): void => {
582
582
if (isPersonalResearch("/Lotus/Types/Items/ShipFeatureItems/Railjack/RailjackHullFeatureItemBlueprint") !== true) {
583
583
logger.warn(`isPersonalResearch self-test failed for RailjackHullFeatureItemBlueprint`);
584
584
}
585
586
if (isPersonalResearch("/Lotus/Types/Recipes/Railjack/Weapons/MissileLauncherEMPTierABlueprint") !== false) {
587
logger.warn(`isPersonalResearch self-test failed for MissileLauncherEMPTierABlueprint`);
588
}
589
590
if (isPersonalResearch("I am not a recipe") !== null) {
591
logger.warn(`isPersonalResearch self-test failed for non-existent recipe`);
592
}
585
593
};