forked from OpenWF/SpaceNinjaServer
fix: tutorial being skipped with skipTutorial disabled (#613)
This commit is contained in:
parent
9dbb0fe4bf
commit
607ec836e9
@ -9,7 +9,6 @@
|
|||||||
"httpsPort": 443,
|
"httpsPort": 443,
|
||||||
"administratorNames": [],
|
"administratorNames": [],
|
||||||
"autoCreateAccount": true,
|
"autoCreateAccount": true,
|
||||||
"skipStoryModeChoice": true,
|
|
||||||
"skipTutorial": true,
|
"skipTutorial": true,
|
||||||
"skipAllDialogue": true,
|
"skipAllDialogue": true,
|
||||||
"unlockAllScans": true,
|
"unlockAllScans": true,
|
||||||
|
@ -685,15 +685,15 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
RewardSeed: Number,
|
RewardSeed: Number,
|
||||||
|
|
||||||
//Credit
|
//Credit
|
||||||
RegularCredits: Number,
|
RegularCredits: { type: Number, default: 3000 },
|
||||||
//Platinum
|
//Platinum
|
||||||
PremiumCredits: Number,
|
PremiumCredits: { type: Number, default: 50 },
|
||||||
//Gift Platinum(Non trade)
|
//Gift Platinum(Non trade)
|
||||||
PremiumCreditsFree: Number,
|
PremiumCreditsFree: { type: Number, default: 50 },
|
||||||
//Endo
|
//Endo
|
||||||
FusionPoints: Number,
|
FusionPoints: { type: Number, default: 0 },
|
||||||
//Regal Aya
|
//Regal Aya
|
||||||
PrimeTokens: Number,
|
PrimeTokens: { type: Number, default: 0 },
|
||||||
|
|
||||||
//Slots
|
//Slots
|
||||||
SuitBin: slotsBinSchema,
|
SuitBin: slotsBinSchema,
|
||||||
@ -710,9 +710,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
CrewMemberBin: slotsBinSchema,
|
CrewMemberBin: slotsBinSchema,
|
||||||
|
|
||||||
//How many trades do you have left
|
//How many trades do you have left
|
||||||
TradesRemaining: Number,
|
TradesRemaining: { type: Number, default: 0 },
|
||||||
//How many Gift do you have left*(gift spends the trade)
|
//How many Gift do you have left*(gift spends the trade)
|
||||||
GiftsRemaining: Number,
|
GiftsRemaining: { type: Number, default: 8 },
|
||||||
//Curent trade info Giving or Getting items
|
//Curent trade info Giving or Getting items
|
||||||
PendingTrades: [Schema.Types.Mixed],
|
PendingTrades: [Schema.Types.Mixed],
|
||||||
|
|
||||||
@ -723,23 +723,23 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//Syndicates Missions complate(Navigation->Syndicate)
|
//Syndicates Missions complate(Navigation->Syndicate)
|
||||||
CompletedSyndicates: [String],
|
CompletedSyndicates: [String],
|
||||||
//Daily Syndicates Exp
|
//Daily Syndicates Exp
|
||||||
DailyAffiliation: Number,
|
DailyAffiliation: { type: Number, default: 0 },
|
||||||
DailyAffiliationPvp: Number,
|
DailyAffiliationPvp: { type: Number, default: 0 },
|
||||||
DailyAffiliationLibrary: Number,
|
DailyAffiliationLibrary: { type: Number, default: 0 },
|
||||||
DailyAffiliationCetus: Number,
|
DailyAffiliationCetus: { type: Number, default: 0 },
|
||||||
DailyAffiliationQuills: Number,
|
DailyAffiliationQuills: { type: Number, default: 0 },
|
||||||
DailyAffiliationSolaris: Number,
|
DailyAffiliationSolaris: { type: Number, default: 0 },
|
||||||
DailyAffiliationVentkids: Number,
|
DailyAffiliationVentkids: { type: Number, default: 0 },
|
||||||
DailyAffiliationVox: Number,
|
DailyAffiliationVox: { type: Number, default: 0 },
|
||||||
DailyAffiliationEntrati: Number,
|
DailyAffiliationEntrati: { type: Number, default: 0 },
|
||||||
DailyAffiliationNecraloid: Number,
|
DailyAffiliationNecraloid: { type: Number, default: 0 },
|
||||||
DailyAffiliationZariman: Number,
|
DailyAffiliationZariman: { type: Number, default: 0 },
|
||||||
DailyAffiliationKahl: Number,
|
DailyAffiliationKahl: { type: Number, default: 0 },
|
||||||
DailyAffiliationCavia: Number,
|
DailyAffiliationCavia: { type: Number, default: 0 },
|
||||||
DailyAffiliationHex: Number,
|
DailyAffiliationHex: { type: Number, default: 0 },
|
||||||
|
|
||||||
//Daily Focus limit
|
//Daily Focus limit
|
||||||
DailyFocus: Number,
|
DailyFocus: { type: Number, default: 250000 },
|
||||||
//Focus XP per School
|
//Focus XP per School
|
||||||
FocusXP: focusXPSchema,
|
FocusXP: focusXPSchema,
|
||||||
//Curent active like Active school focuses is = "Zenurik"
|
//Curent active like Active school focuses is = "Zenurik"
|
||||||
@ -853,7 +853,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
Scoops: [EquipmentSchema],
|
Scoops: [EquipmentSchema],
|
||||||
|
|
||||||
//Mastery Rank*(Need item XPInfo to rank up)
|
//Mastery Rank*(Need item XPInfo to rank up)
|
||||||
PlayerLevel: Number,
|
PlayerLevel: { type: Number, default: 0 },
|
||||||
//Item Mastery Rank exp
|
//Item Mastery Rank exp
|
||||||
XPInfo: [TypeXPItemSchema],
|
XPInfo: [TypeXPItemSchema],
|
||||||
//Mastery Rank next availability
|
//Mastery Rank next availability
|
||||||
@ -1027,7 +1027,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
Robotics: [Schema.Types.Mixed],
|
Robotics: [Schema.Types.Mixed],
|
||||||
UsedDailyDeals: [Schema.Types.Mixed],
|
UsedDailyDeals: [Schema.Types.Mixed],
|
||||||
CollectibleSeries: [Schema.Types.Mixed],
|
CollectibleSeries: [Schema.Types.Mixed],
|
||||||
HasResetAccount: Boolean,
|
HasResetAccount: { type: Boolean, default: false },
|
||||||
|
|
||||||
//Discount Coupon
|
//Discount Coupon
|
||||||
PendingCoupon: Schema.Types.Mixed,
|
PendingCoupon: Schema.Types.Mixed,
|
||||||
|
@ -34,7 +34,6 @@ interface IConfig {
|
|||||||
myIrcAddresses?: string[];
|
myIrcAddresses?: string[];
|
||||||
administratorNames?: string[];
|
administratorNames?: string[];
|
||||||
autoCreateAccount?: boolean;
|
autoCreateAccount?: boolean;
|
||||||
skipStoryModeChoice?: boolean;
|
|
||||||
skipTutorial?: boolean;
|
skipTutorial?: boolean;
|
||||||
skipAllDialogue?: boolean;
|
skipAllDialogue?: boolean;
|
||||||
unlockAllScans?: boolean;
|
unlockAllScans?: boolean;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
import new_inventory from "@/static/fixed_responses/postTutorialInventory.json";
|
import postTutorialInventory from "@/static/fixed_responses/postTutorialInventory.json";
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { SlotNames, IInventoryChanges, IBinChanges } from "@/src/types/purchaseTypes";
|
import { SlotNames, IInventoryChanges, IBinChanges } from "@/src/types/purchaseTypes";
|
||||||
@ -49,20 +49,19 @@ export const createInventory = async (
|
|||||||
defaultItemReferences: { loadOutPresetId: Types.ObjectId; ship: Types.ObjectId }
|
defaultItemReferences: { loadOutPresetId: Types.ObjectId; ship: Types.ObjectId }
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
const inventory = new Inventory({
|
const inventory = config.skipTutorial
|
||||||
...new_inventory,
|
? new Inventory({
|
||||||
accountOwnerId: accountOwnerId,
|
accountOwnerId: accountOwnerId,
|
||||||
LoadOutPresets: defaultItemReferences.loadOutPresetId,
|
LoadOutPresets: defaultItemReferences.loadOutPresetId,
|
||||||
Ships: [defaultItemReferences.ship]
|
Ships: [defaultItemReferences.ship],
|
||||||
});
|
...postTutorialInventory
|
||||||
if (config.skipStoryModeChoice) {
|
})
|
||||||
inventory.StoryModeChoice = "WARFRAME";
|
: new Inventory({
|
||||||
}
|
accountOwnerId: accountOwnerId,
|
||||||
if (config.skipTutorial) {
|
LoadOutPresets: defaultItemReferences.loadOutPresetId,
|
||||||
inventory.PlayedParkourTutorial = true;
|
Ships: [defaultItemReferences.ship],
|
||||||
inventory.ReceivedStartingGear = true;
|
TrainingDate: 0
|
||||||
}
|
});
|
||||||
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
|
@ -229,7 +229,7 @@ export interface IInventoryResponse {
|
|||||||
FocusUpgrades: IFocusUpgrade[];
|
FocusUpgrades: IFocusUpgrade[];
|
||||||
OperatorAmps: IEquipmentDatabase[];
|
OperatorAmps: IEquipmentDatabase[];
|
||||||
HasContributedToDojo?: boolean;
|
HasContributedToDojo?: boolean;
|
||||||
HWIDProtectEnabled: boolean;
|
HWIDProtectEnabled?: boolean;
|
||||||
KubrowPetPrints: IKubrowPetPrint[];
|
KubrowPetPrints: IKubrowPetPrint[];
|
||||||
AlignmentReplay: IAlignment;
|
AlignmentReplay: IAlignment;
|
||||||
PersonalGoalProgress: IPersonalGoalProgress[];
|
PersonalGoalProgress: IPersonalGoalProgress[];
|
||||||
@ -284,7 +284,7 @@ export interface IInventoryResponse {
|
|||||||
NemesisAbandonedRewards: string[];
|
NemesisAbandonedRewards: string[];
|
||||||
DailyAffiliationKahl: number;
|
DailyAffiliationKahl: number;
|
||||||
DailyAffiliationCavia: number;
|
DailyAffiliationCavia: number;
|
||||||
DailyAffiliationHex?: number;
|
DailyAffiliationHex: number;
|
||||||
LastInventorySync: IOid;
|
LastInventorySync: IOid;
|
||||||
NextRefill: IMongoDate; // Next time argon crystals will have a decay tick
|
NextRefill: IMongoDate; // Next time argon crystals will have a decay tick
|
||||||
FoundToday?: IMiscItem[]; // for Argon Crystals
|
FoundToday?: IMiscItem[]; // for Argon Crystals
|
||||||
|
@ -5,35 +5,17 @@
|
|||||||
"CrewMemberBin": { "Slots": 3 },
|
"CrewMemberBin": { "Slots": 3 },
|
||||||
"CrewShipSalvageBin": { "Slots": 8 },
|
"CrewShipSalvageBin": { "Slots": 8 },
|
||||||
"DrifterMelee": [{ "ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
"DrifterMelee": [{ "ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||||
"FusionPoints": 0,
|
|
||||||
"MechBin": { "Slots": 4 },
|
"MechBin": { "Slots": 4 },
|
||||||
"OperatorAmpBin": { "Slots": 8 },
|
"OperatorAmpBin": { "Slots": 8 },
|
||||||
"PveBonusLoadoutBin": { "Slots": 0 },
|
"PveBonusLoadoutBin": { "Slots": 0 },
|
||||||
"PvpBonusLoadoutBin": { "Slots": 0 },
|
"PvpBonusLoadoutBin": { "Slots": 0 },
|
||||||
"RandomModBin": { "Slots": 15 },
|
"RandomModBin": { "Slots": 15 },
|
||||||
"RegularCredits": 3000,
|
|
||||||
"SentinelBin": { "Slots": 10 },
|
"SentinelBin": { "Slots": 10 },
|
||||||
"SpaceSuitBin": { "Slots": 4 },
|
"SpaceSuitBin": { "Slots": 4 },
|
||||||
"SpaceWeaponBin": { "Slots": 4 },
|
"SpaceWeaponBin": { "Slots": 4 },
|
||||||
"SuitBin": { "Slots": 1 },
|
"SuitBin": { "Slots": 1 },
|
||||||
"WeaponBin": { "Slots": 5 },
|
"WeaponBin": { "Slots": 5 },
|
||||||
"DailyAffiliation": 16000,
|
|
||||||
"DailyAffiliationCetus": 16000,
|
|
||||||
"DailyAffiliationEntrati": 16000,
|
|
||||||
"DailyAffiliationKahl": 16000,
|
|
||||||
"DailyAffiliationLibrary": 16000,
|
|
||||||
"DailyAffiliationNecraloid": 16000,
|
|
||||||
"DailyAffiliationPvp": 16000,
|
|
||||||
"DailyAffiliationQuills": 16000,
|
|
||||||
"DailyAffiliationSolaris": 16000,
|
|
||||||
"DailyAffiliationVentkids": 16000,
|
|
||||||
"DailyAffiliationVox": 16000,
|
|
||||||
"DailyAffiliationZariman": 16000,
|
|
||||||
"DailyAffiliationCavia": 16000,
|
|
||||||
"DailyFocus": 250000,
|
|
||||||
"DuviriInfo": { "Seed": 5898912197983600352, "NumCompletions": 0 },
|
"DuviriInfo": { "Seed": 5898912197983600352, "NumCompletions": 0 },
|
||||||
"GiftsRemaining": 8,
|
|
||||||
"TradesRemaining": 0,
|
|
||||||
"Recipes": [{ "ItemCount": 1, "ItemType": "/Lotus/Types/Recipes/Weapons/BoltonfaBlueprint" }],
|
"Recipes": [{ "ItemCount": 1, "ItemType": "/Lotus/Types/Recipes/Weapons/BoltonfaBlueprint" }],
|
||||||
"SeasonChallengeHistory": [
|
"SeasonChallengeHistory": [
|
||||||
{ "challenge": "SeasonDailySolveCiphers", "id": "001000220000000000000308" },
|
{ "challenge": "SeasonDailySolveCiphers", "id": "001000220000000000000308" },
|
||||||
@ -63,12 +45,10 @@
|
|||||||
"Melee": [{ "ItemType": "/Lotus/Weapons/Tenno/Melee/LongSword/LongSword", "XP": 0, "Configs": [{}, {}, {}], "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
"Melee": [{ "ItemType": "/Lotus/Weapons/Tenno/Melee/LongSword/LongSword", "XP": 0, "Configs": [{}, {}, {}], "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||||
"Pistols": [{ "ItemType": "/Lotus/Weapons/MK1Series/MK1Kunai", "XP": 0, "Configs": [{}, {}, {}], "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
"Pistols": [{ "ItemType": "/Lotus/Weapons/MK1Series/MK1Kunai", "XP": 0, "Configs": [{}, {}, {}], "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||||
"PlayedParkourTutorial": true,
|
"PlayedParkourTutorial": true,
|
||||||
"PremiumCreditsFree": 50,
|
|
||||||
"QuestKeys": [{ "ItemType": "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain" }],
|
"QuestKeys": [{ "ItemType": "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain" }],
|
||||||
"RawUpgrades": [{ "ItemCount": 1, "LastAdded": { "$oid": "6450f9bfe0714a4d6703f05f" }, "ItemType": "/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod" }],
|
"RawUpgrades": [{ "ItemCount": 1, "LastAdded": { "$oid": "6450f9bfe0714a4d6703f05f" }, "ItemType": "/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod" }],
|
||||||
"ReceivedStartingGear": true,
|
"ReceivedStartingGear": true,
|
||||||
"Scoops": [{ "ItemType": "/Lotus/Weapons/Tenno/Speedball/SpeedballWeaponTest", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
"Scoops": [{ "ItemType": "/Lotus/Weapons/Tenno/Speedball/SpeedballWeaponTest", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||||
"Ships": [{ "ItemType": "/Lotus/Types/Items/Ships/DefaultShip", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
|
||||||
"Suits": [{ "ItemType": "/Lotus/Powersuits/Volt/Volt", "XP": 0, "Configs": [{}, {}, {}], "UpgradeVer": 101, "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
"Suits": [{ "ItemType": "/Lotus/Powersuits/Volt/Volt", "XP": 0, "Configs": [{}, {}, {}], "UpgradeVer": 101, "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||||
"TrainingRetriesLeft": 0,
|
"TrainingRetriesLeft": 0,
|
||||||
"WeaponSkins": [{ "ItemType": "/Lotus/Upgrades/Skins/Volt/VoltHelmet", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
"WeaponSkins": [{ "ItemType": "/Lotus/Upgrades/Skins/Volt/VoltHelmet", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||||
@ -114,7 +94,6 @@
|
|||||||
"KahlLoadOuts": [],
|
"KahlLoadOuts": [],
|
||||||
"PendingRecipes": [],
|
"PendingRecipes": [],
|
||||||
"TrainingDate": 0,
|
"TrainingDate": 0,
|
||||||
"PlayerLevel": 0,
|
|
||||||
"PersonalGoalProgress": [],
|
"PersonalGoalProgress": [],
|
||||||
"PersonalTechProjects": [],
|
"PersonalTechProjects": [],
|
||||||
"QualifyingInvasions": [],
|
"QualifyingInvasions": [],
|
||||||
@ -157,8 +136,5 @@
|
|||||||
"RewardQuantity": 10,
|
"RewardQuantity": 10,
|
||||||
"RewardStanding": 10000
|
"RewardStanding": 10000
|
||||||
},
|
},
|
||||||
"HasContributedToDojo": false,
|
"PendingCoupon": { "Expiry": { "$date": { "$numberLong": "0" } }, "Discount": 0 }
|
||||||
"HasResetAccount": false,
|
|
||||||
"PendingCoupon": { "Expiry": { "$date": { "$numberLong": "0" } }, "Discount": 0 },
|
|
||||||
"PremiumCredits": 50
|
|
||||||
}
|
}
|
||||||
|
@ -203,10 +203,6 @@
|
|||||||
<p>You must be an administrator to use this feature. To become an administrator, add <code>"<span class="displayname"></span>"</code> to <code>administratorNames</code> in the config.json.</p>
|
<p>You must be an administrator to use this feature. To become an administrator, add <code>"<span class="displayname"></span>"</code> to <code>administratorNames</code> in the config.json.</p>
|
||||||
</div>
|
</div>
|
||||||
<form id="server-settings" class="d-none" onsubmit="doChangeSettings();return false;">
|
<form id="server-settings" class="d-none" onsubmit="doChangeSettings();return false;">
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="checkbox" id="skipStoryModeChoice" />
|
|
||||||
<label class="form-check-label" for="skipStoryModeChoice">Skip Story Mode Choice</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="skipTutorial" />
|
<input class="form-check-input" type="checkbox" id="skipTutorial" />
|
||||||
<label class="form-check-label" for="skipTutorial">Skip Tutorial</label>
|
<label class="form-check-label" for="skipTutorial">Skip Tutorial</label>
|
||||||
|
@ -792,7 +792,6 @@ $("#mod-to-acquire").on("input", () => {
|
|||||||
|
|
||||||
const uiConfigs = [
|
const uiConfigs = [
|
||||||
"autoCreateAccount",
|
"autoCreateAccount",
|
||||||
"skipStoryModeChoice",
|
|
||||||
"skipTutorial",
|
"skipTutorial",
|
||||||
"skipAllDialogue",
|
"skipAllDialogue",
|
||||||
"unlockAllScans",
|
"unlockAllScans",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user