feat: obtaining crewship related items on mission update #897
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "AMelonInsideLemon/SpaceNinjaServer:crewship-rewards"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -291,2 +297,3 @@
function getRandomMissionDrops(RewardInfo: IRewardInfo | undefined): IRngResult[] {
const drops: IRngResult[] = [];
if (RewardInfo.node in ExportRegions) {
if (RewardInfo && RewardInfo.node in ExportRegions) {
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?
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
If you're also adding BonusMiscItems now to this 'crewship related items' PR, then I guess this also closes #421.
@ -918,0 +926,4 @@
if (itemIndex !== -1) {
CrewShipRawSalvage[itemIndex].ItemCount += ItemCount;
inventory.markModified(`CrewShipRawSalvage.${itemIndex}.ItemCount`);
markModified
shouldn't be needed with a proper schema.feat: obtaining crewship related itemsto feat: obtaining crewship related items on mission update