feat: obtaining crewship related items on mission update #897

Merged
OrdisPrime merged 3 commits from AMelonInsideLemon/SpaceNinjaServer:crewship-rewards into main 2025-02-05 12:23:35 -08:00
Contributor
No description provided.
AMelonInsideLemon added 1 commit 2025-02-04 11:39:12 -08:00
feat: obtaining crewship related items
All checks were successful
Build / build (18) (pull_request) Successful in 36s
Build / build (22) (pull_request) Successful in 31s
Build / build (20) (pull_request) Successful in 1m49s
c678cac49d
Sainan approved these changes 2025-02-04 11:40:36 -08:00
OrdisPrime was assigned by Sainan 2025-02-04 11:54:00 -08:00
OrdisPrime reviewed 2025-02-05 06:05:54 -08:00
@ -291,2 +297,3 @@
function getRandomMissionDrops(RewardInfo: IRewardInfo | undefined): IRngResult[] {
const drops: IRngResult[] = [];
if (RewardInfo.node in ExportRegions) {
if (RewardInfo && RewardInfo.node in ExportRegions) {
Owner

why was the return upon no rewardInfo removed and this check here added?
could you explain the logic behind it? In my testing I did not see game scenarios where random mission rewards would need to be applied when rewardInfo is missing. Could you name me the scenario?

why was the return upon no rewardInfo removed and this check here added? could you explain the logic behind it? In my testing I did not see game scenarios where random mission rewards would need to be applied when rewardInfo is missing. Could you name me the scenario?
Owner

Allowing undefined here and proceeding with the function upon undefined rewardInfo removes a lot of the control and leaves a possibility for hard to trace bugs I would think

Allowing undefined here and proceeding with the function upon undefined rewardInfo removes a lot of the control and leaves a possibility for hard to trace bugs I would think
AMelonInsideLemon added 1 commit 2025-02-05 08:17:42 -08:00
add BonusMiscItems
All checks were successful
Build / build (22) (pull_request) Successful in 33s
Build / build (18) (pull_request) Successful in 56s
Build / build (20) (pull_request) Successful in 1m16s
604c87637e
Owner

If you're also adding BonusMiscItems now to this 'crewship related items' PR, then I guess this also closes #421.

If you're also adding BonusMiscItems now to this 'crewship related items' PR, then I guess this also closes #421.
Sainan reviewed 2025-02-05 09:50:39 -08:00
@ -918,0 +926,4 @@
if (itemIndex !== -1) {
CrewShipRawSalvage[itemIndex].ItemCount += ItemCount;
inventory.markModified(`CrewShipRawSalvage.${itemIndex}.ItemCount`);
Owner

markModified shouldn't be needed with a proper schema.

`markModified` shouldn't be needed with a proper schema.
Sainan marked this conversation as resolved
AMelonInsideLemon added 1 commit 2025-02-05 09:53:50 -08:00
remove markModified
All checks were successful
Build / build (20) (pull_request) Successful in 33s
Build / build (22) (pull_request) Successful in 52s
Build / build (18) (pull_request) Successful in 1m9s
5b525916d0
OrdisPrime changed title from feat: obtaining crewship related items to feat: obtaining crewship related items on mission update 2025-02-05 12:23:24 -08:00
OrdisPrime merged commit 1c82b90033 into main 2025-02-05 12:23:35 -08:00
Sign in to join this conversation.
No description provided.