test
All checks were successful
Build / build (20) (push) Successful in 39s
Build / build (22) (push) Successful in 1m2s
Build / build (18) (push) Successful in 1m15s
Build / build (20) (pull_request) Successful in 39s
Build / build (18) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 1m12s
All checks were successful
Build / build (20) (push) Successful in 39s
Build / build (22) (push) Successful in 1m2s
Build / build (18) (push) Successful in 1m15s
Build / build (20) (pull_request) Successful in 39s
Build / build (18) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 1m12s
This commit is contained in:
parent
837e041db8
commit
c9b34a30e0
@ -23,8 +23,8 @@ export const createAccount = async (accountData: IDatabaseAccount): Promise<IDat
|
|||||||
await account.save();
|
await account.save();
|
||||||
const loadoutId = await createLoadout(account._id);
|
const loadoutId = await createLoadout(account._id);
|
||||||
const shipId = await createShip(account._id);
|
const shipId = await createShip(account._id);
|
||||||
await createInventory(account._id, { loadOutPresetId: loadoutId, ship: shipId });
|
|
||||||
await createPersonalRooms(account._id, shipId);
|
await createPersonalRooms(account._id, shipId);
|
||||||
|
await createInventory(account._id, { loadOutPresetId: loadoutId, ship: shipId });
|
||||||
await createStats(account._id.toString());
|
await createStats(account._id.toString());
|
||||||
return account.toJSON();
|
return account.toJSON();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -47,16 +47,15 @@ export const createPersonalRooms = async (accountId: Types.ObjectId, shipId: Typ
|
|||||||
activeShipId: shipId
|
activeShipId: shipId
|
||||||
});
|
});
|
||||||
if (config.skipTutorial) {
|
if (config.skipTutorial) {
|
||||||
// // Vor's Prize rewards
|
// unlocked during Vor's Prize
|
||||||
// const defaultFeatures = [
|
const defaultFeatures = [
|
||||||
// "/Lotus/Types/Items/ShipFeatureItems/EarthNavigationFeatureItem",
|
"/Lotus/Types/Items/ShipFeatureItems/MercuryNavigationFeatureItem",
|
||||||
// "/Lotus/Types/Items/ShipFeatureItems/MercuryNavigationFeatureItem",
|
"/Lotus/Types/Items/ShipFeatureItems/ArsenalFeatureItem",
|
||||||
// "/Lotus/Types/Items/ShipFeatureItems/ArsenalFeatureItem",
|
"/Lotus/Types/Items/ShipFeatureItems/SocialMenuFeatureItem",
|
||||||
// "/Lotus/Types/Items/ShipFeatureItems/SocialMenuFeatureItem",
|
"/Lotus/Types/Items/ShipFeatureItems/FoundryFeatureItem",
|
||||||
// "/Lotus/Types/Items/ShipFeatureItems/FoundryFeatureItem",
|
"/Lotus/Types/Items/ShipFeatureItems/ModsFeatureItem"
|
||||||
// "/Lotus/Types/Items/ShipFeatureItems/ModsFeatureItem"
|
];
|
||||||
// ];
|
personalRooms.Ship.Features.push(...defaultFeatures);
|
||||||
// personalRooms.Ship.Features.push(...defaultFeatures);
|
|
||||||
}
|
}
|
||||||
await personalRooms.save();
|
await personalRooms.save();
|
||||||
};
|
};
|
||||||
|
@ -3,8 +3,8 @@ import { isEmptyObject } from "@/src/helpers/general";
|
|||||||
import { IMessage } from "@/src/models/inboxModel";
|
import { IMessage } from "@/src/models/inboxModel";
|
||||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
import { createMessage } from "@/src/services/inboxService";
|
import { createMessage } from "@/src/services/inboxService";
|
||||||
import { addKeyChainItems } from "@/src/services/inventoryService";
|
import { addItem, addKeyChainItems } from "@/src/services/inventoryService";
|
||||||
import { getKeyChainMessage } from "@/src/services/itemDataService";
|
import { getKeyChainMessage, getLevelKeyRewards } from "@/src/services/itemDataService";
|
||||||
import { IInventoryDatabase, IQuestKeyDatabase, IQuestStage } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IInventoryDatabase, IQuestKeyDatabase, IQuestStage } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { HydratedDocument } from "mongoose";
|
import { HydratedDocument } from "mongoose";
|
||||||
@ -125,6 +125,23 @@ export const completeQuest = async (inventory: TInventoryDatabaseDocument, quest
|
|||||||
ChainStage: i
|
ChainStage: i
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const missionName = chainStages[i].key;
|
||||||
|
if (missionName) {
|
||||||
|
const fixedLevelRewards = getLevelKeyRewards(missionName);
|
||||||
|
//logger.debug(`fixedLevelRewards ${fixedLevelRewards}`);
|
||||||
|
for (const reward of fixedLevelRewards) {
|
||||||
|
if (reward.rewardType == "RT_CREDITS") {
|
||||||
|
inventory.RegularCredits += reward.amount;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (reward.rewardType == "RT_RESOURCE") {
|
||||||
|
await addItem(inventory, reward.itemType.replace("StoreItems/", ""), reward.amount);
|
||||||
|
} else {
|
||||||
|
await addItem(inventory, reward.itemType.replace("StoreItems/", ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inventory.ActiveQuest = "";
|
inventory.ActiveQuest = "";
|
||||||
//TODO: handle quest completion items
|
//TODO: handle quest completion items
|
||||||
|
Loading…
x
Reference in New Issue
Block a user