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