stable quests 1
This commit is contained in:
parent
aca258e32c
commit
c88b3af6f8
@ -37,5 +37,6 @@ export const updateQuestController: RequestHandler = async (req, res) => {
|
||||
return;
|
||||
}
|
||||
|
||||
await inventory.save();
|
||||
res.send({ MissionRewards: [] });
|
||||
};
|
||||
|
@ -941,6 +941,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
//Complete Mission\Quests
|
||||
Missions: [Schema.Types.Mixed],
|
||||
QuestKeys: [questKeysSchema],
|
||||
ActiveQuest: { type: String, default: "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain" }, //TODO: check after mission starting gear
|
||||
//item like DojoKey or Boss missions key
|
||||
LevelKeys: [Schema.Types.Mixed],
|
||||
//Active quests
|
||||
|
@ -88,7 +88,7 @@ const apartmentDefault: IApartment = {
|
||||
|
||||
const orbiterSchema = new Schema<IOrbiter>(
|
||||
{
|
||||
Features: { type: [String], default: ["/Lotus/Types/Items/ShipFeatureItems/EarthNavigationFeatureItem"] },
|
||||
Features: [String],
|
||||
Rooms: [roomSchema],
|
||||
ContentUrlSignature: { type: String, required: false },
|
||||
BootLocation: String
|
||||
@ -96,7 +96,7 @@ const orbiterSchema = new Schema<IOrbiter>(
|
||||
{ _id: false }
|
||||
);
|
||||
const orbiterDefault: IOrbiter = {
|
||||
Features: [],
|
||||
Features: ["/Lotus/Types/Items/ShipFeatureItems/EarthNavigationFeatureItem"], //TODO: potentially remove after missionstarting gear
|
||||
Rooms: [
|
||||
{ Name: "AlchemyRoom", MaxCapacity: 1600 },
|
||||
{ Name: "BridgeRoom", MaxCapacity: 1600 },
|
||||
|
@ -71,8 +71,10 @@ export const createInventory = async (
|
||||
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem2" },
|
||||
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem3" },
|
||||
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem4" },
|
||||
{ ItemCount: 1, ItemType: "/Lotus/Types/Restoratives/LisetAutoHack" },
|
||||
{ ItemCount: 1, ItemType: "/Lotus/Types/Restoratives/LisetAutoHack" }
|
||||
];
|
||||
|
||||
const vorsPrizeRewards = [
|
||||
// Vor's Prize rewards
|
||||
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarHealthMaxMod" },
|
||||
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod" },
|
||||
@ -95,7 +97,6 @@ export const createInventory = async (
|
||||
{ ItemCount: 400, ItemType: "/Lotus/Types/Items/MiscItems/PolymerBundle" },
|
||||
{ ItemCount: 150, ItemType: "/Lotus/Types/Items/MiscItems/AlloyPlate" }
|
||||
];
|
||||
|
||||
for (const equipment of defaultEquipment) {
|
||||
await addItem(inventory, equipment.ItemType, equipment.ItemCount);
|
||||
}
|
||||
|
@ -45,16 +45,16 @@ export const createPersonalRooms = async (accountId: Types.ObjectId, shipId: Typ
|
||||
activeShipId: shipId
|
||||
});
|
||||
if (config.skipTutorial) {
|
||||
// Vor's Prize rewards
|
||||
const defaultFeatures = [
|
||||
"/Lotus/Types/Items/ShipFeatureItems/EarthNavigationFeatureItem",
|
||||
"/Lotus/Types/Items/ShipFeatureItems/MercuryNavigationFeatureItem",
|
||||
"/Lotus/Types/Items/ShipFeatureItems/ArsenalFeatureItem",
|
||||
"/Lotus/Types/Items/ShipFeatureItems/SocialMenuFeatureItem",
|
||||
"/Lotus/Types/Items/ShipFeatureItems/FoundryFeatureItem",
|
||||
"/Lotus/Types/Items/ShipFeatureItems/ModsFeatureItem"
|
||||
];
|
||||
personalRooms.Ship.Features.push(...defaultFeatures);
|
||||
// // Vor's Prize rewards
|
||||
// const defaultFeatures = [
|
||||
// "/Lotus/Types/Items/ShipFeatureItems/EarthNavigationFeatureItem",
|
||||
// "/Lotus/Types/Items/ShipFeatureItems/MercuryNavigationFeatureItem",
|
||||
// "/Lotus/Types/Items/ShipFeatureItems/ArsenalFeatureItem",
|
||||
// "/Lotus/Types/Items/ShipFeatureItems/SocialMenuFeatureItem",
|
||||
// "/Lotus/Types/Items/ShipFeatureItems/FoundryFeatureItem",
|
||||
// "/Lotus/Types/Items/ShipFeatureItems/ModsFeatureItem"
|
||||
// ];
|
||||
// personalRooms.Ship.Features.push(...defaultFeatures);
|
||||
}
|
||||
await personalRooms.save();
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { PersonalRooms } from "@/src/models/personalRoomsModel";
|
||||
import { addItem, getInventory } from "@/src/services/inventoryService";
|
||||
|
||||
export const getPersonalRooms = async (accountId: string) => {
|
||||
const personalRooms = await PersonalRooms.findOne({ personalRoomsOwnerId: accountId });
|
||||
@ -11,10 +12,15 @@ export const getPersonalRooms = async (accountId: string) => {
|
||||
|
||||
export const updateShipFeature = async (accountId: string, shipFeature: string) => {
|
||||
const personalRooms = await getPersonalRooms(accountId);
|
||||
|
||||
// if (personalRooms.Ship.Features.includes(shipFeature)) {
|
||||
// throw new Error(`ship feature ${shipFeature} already unlocked`);
|
||||
// }
|
||||
|
||||
personalRooms.Ship.Features.push(shipFeature);
|
||||
|
||||
//push if not already present
|
||||
|
||||
//remove ship feature item from misc items
|
||||
await personalRooms.save();
|
||||
|
||||
const inventory = await getInventory(accountId);
|
||||
await addItem(inventory, shipFeature, -1);
|
||||
await inventory.save();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user