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

chore: consistently use safe navigation for legacy conversions (#3360)

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

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

代码差异

1 个文件 +18 -18
Modified src/controllers/api/inventoryController.ts +18 -18
@@ -696,8 +696,8 @@ const mapLegacyLoadoutConfig = (
696 696 CustSlot: normPreset.s?.cus ?? 0,
697 697 Customization: {
698 698 Emblem: "",
699 Colors: convertIColorToLegacyColors(s?.Configs[normPreset.s?.cus ?? 0].pricol),
700 Skins: s?.Configs[normPreset.s?.cus ?? 0].Skins ?? []
699 Colors: convertIColorToLegacyColors(s?.Configs[normPreset.s?.cus ?? 0]?.pricol),
700 Skins: s?.Configs[normPreset.s?.cus ?? 0]?.Skins ?? []
701 701 }
702 702 },
703 703 {
@@ -706,8 +706,8 @@ const mapLegacyLoadoutConfig = (
706 706 CustSlot: normPreset.p?.cus ?? 0,
707 707 Customization: {
708 708 Emblem: "",
709 Colors: convertIColorToLegacyColors(p?.Configs[normPreset.p?.cus ?? 0].pricol),
710 Skins: p?.Configs[normPreset.p?.cus ?? 0].Skins ?? []
709 Colors: convertIColorToLegacyColors(p?.Configs[normPreset.p?.cus ?? 0]?.pricol),
710 Skins: p?.Configs[normPreset.p?.cus ?? 0]?.Skins ?? []
711 711 }
712 712 },
713 713 {
@@ -716,8 +716,8 @@ const mapLegacyLoadoutConfig = (
716 716 CustSlot: normPreset.l?.cus ?? 0,
717 717 Customization: {
718 718 Emblem: "",
719 Colors: convertIColorToLegacyColors(l?.Configs[normPreset.l?.cus ?? 0].pricol),
720 Skins: l?.Configs[normPreset.l?.cus ?? 0].Skins ?? []
719 Colors: convertIColorToLegacyColors(l?.Configs[normPreset.l?.cus ?? 0]?.pricol),
720 Skins: l?.Configs[normPreset.l?.cus ?? 0]?.Skins ?? []
721 721 }
722 722 },
723 723 {
@@ -726,8 +726,8 @@ const mapLegacyLoadoutConfig = (
726 726 CustSlot: normPreset.m?.cus ?? 0,
727 727 Customization: {
728 728 Emblem: "",
729 Colors: convertIColorToLegacyColors(m?.Configs[normPreset.m?.cus ?? 0].pricol),
730 Skins: m?.Configs[normPreset.m?.cus ?? 0].Skins ?? []
729 Colors: convertIColorToLegacyColors(m?.Configs[normPreset.m?.cus ?? 0]?.pricol),
730 Skins: m?.Configs[normPreset.m?.cus ?? 0]?.Skins ?? []
731 731 }
732 732 }
733 733 ]
@@ -750,8 +750,8 @@ const mapLegacyLoadoutConfig = (
750 750 CustSlot: compPreset.s?.cus ?? 0,
751 751 Customization: {
752 752 Emblem: "",
753 Colors: convertIColorToLegacyColors(s?.Configs[compPreset.s?.cus ?? 0].pricol),
754 Skins: s?.Configs[compPreset.s?.cus ?? 0].Skins ?? []
753 Colors: convertIColorToLegacyColors(s?.Configs[compPreset.s?.cus ?? 0]?.pricol),
754 Skins: s?.Configs[compPreset.s?.cus ?? 0]?.Skins ?? []
755 755 }
756 756 },
757 757 {
@@ -760,8 +760,8 @@ const mapLegacyLoadoutConfig = (
760 760 CustSlot: compPreset.l?.cus ?? 0,
761 761 Customization: {
762 762 Emblem: "",
763 Colors: convertIColorToLegacyColors(l?.Configs[compPreset.l?.cus ?? 0].pricol),
764 Skins: l?.Configs[compPreset.l?.cus ?? 0].Skins ?? []
763 Colors: convertIColorToLegacyColors(l?.Configs[compPreset.l?.cus ?? 0]?.pricol),
764 Skins: l?.Configs[compPreset.l?.cus ?? 0]?.Skins ?? []
765 765 }
766 766 }
767 767 );
@@ -812,8 +812,8 @@ const mapLegacyLoadoutConfig = (
812 812 CustSlot: archPreset.s?.cus ?? 0,
813 813 Customization: {
814 814 Emblem: "",
815 Colors: convertIColorToLegacyColors(s?.Configs[archPreset.s?.cus ?? 0].pricol),
816 Skins: s?.Configs[0].Skins ?? []
815 Colors: convertIColorToLegacyColors(s?.Configs[archPreset.s?.cus ?? 0]?.pricol),
816 Skins: s?.Configs[0]?.Skins ?? []
817 817 }
818 818 },
819 819 {
@@ -822,8 +822,8 @@ const mapLegacyLoadoutConfig = (
822 822 CustSlot: archPreset.l?.cus ?? 0,
823 823 Customization: {
824 824 Emblem: "",
825 Colors: convertIColorToLegacyColors(l?.Configs[archPreset.l?.cus ?? 0].pricol),
826 Skins: l?.Configs[0].Skins ?? []
825 Colors: convertIColorToLegacyColors(l?.Configs[archPreset.l?.cus ?? 0]?.pricol),
826 Skins: l?.Configs[0]?.Skins ?? []
827 827 }
828 828 },
829 829 {
@@ -832,8 +832,8 @@ const mapLegacyLoadoutConfig = (
832 832 CustSlot: archPreset.m?.cus ?? 0,
833 833 Customization: {
834 834 Emblem: "",
835 Colors: convertIColorToLegacyColors(m?.Configs[archPreset.m?.cus ?? 0].pricol),
836 Skins: m?.Configs[0].Skins ?? []
835 Colors: convertIColorToLegacyColors(m?.Configs[archPreset.m?.cus ?? 0]?.pricol),
836 Skins: m?.Configs[0]?.Skins ?? []
837 837 }
838 838 }
839 839 );