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,
|
||||
"administratorNames": [],
|
||||
"autoCreateAccount": true,
|
||||
"skipStoryModeChoice": true,
|
||||
"skipTutorial": true,
|
||||
"skipAllDialogue": true,
|
||||
"unlockAllScans": true,
|
||||
|
@ -685,15 +685,15 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
RewardSeed: Number,
|
||||
|
||||
//Credit
|
||||
RegularCredits: Number,
|
||||
RegularCredits: { type: Number, default: 3000 },
|
||||
//Platinum
|
||||
PremiumCredits: Number,
|
||||
PremiumCredits: { type: Number, default: 50 },
|
||||
//Gift Platinum(Non trade)
|
||||
PremiumCreditsFree: Number,
|
||||
PremiumCreditsFree: { type: Number, default: 50 },
|
||||
//Endo
|
||||
FusionPoints: Number,
|
||||
FusionPoints: { type: Number, default: 0 },
|
||||
//Regal Aya
|
||||
PrimeTokens: Number,
|
||||
PrimeTokens: { type: Number, default: 0 },
|
||||
|
||||
//Slots
|
||||
SuitBin: slotsBinSchema,
|
||||
@ -710,9 +710,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
CrewMemberBin: slotsBinSchema,
|
||||
|
||||
//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)
|
||||
GiftsRemaining: Number,
|
||||
GiftsRemaining: { type: Number, default: 8 },
|
||||
//Curent trade info Giving or Getting items
|
||||
PendingTrades: [Schema.Types.Mixed],
|
||||
|
||||
@ -723,23 +723,23 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
//Syndicates Missions complate(Navigation->Syndicate)
|
||||
CompletedSyndicates: [String],
|
||||
//Daily Syndicates Exp
|
||||
DailyAffiliation: Number,
|
||||
DailyAffiliationPvp: Number,
|
||||
DailyAffiliationLibrary: Number,
|
||||
DailyAffiliationCetus: Number,
|
||||
DailyAffiliationQuills: Number,
|
||||
DailyAffiliationSolaris: Number,
|
||||
DailyAffiliationVentkids: Number,
|
||||
DailyAffiliationVox: Number,
|
||||
DailyAffiliationEntrati: Number,
|
||||
DailyAffiliationNecraloid: Number,
|
||||
DailyAffiliationZariman: Number,
|
||||
DailyAffiliationKahl: Number,
|
||||
DailyAffiliationCavia: Number,
|
||||
DailyAffiliationHex: Number,
|
||||
DailyAffiliation: { type: Number, default: 0 },
|
||||
DailyAffiliationPvp: { type: Number, default: 0 },
|
||||
DailyAffiliationLibrary: { type: Number, default: 0 },
|
||||
DailyAffiliationCetus: { type: Number, default: 0 },
|
||||
DailyAffiliationQuills: { type: Number, default: 0 },
|
||||
DailyAffiliationSolaris: { type: Number, default: 0 },
|
||||
DailyAffiliationVentkids: { type: Number, default: 0 },
|
||||
DailyAffiliationVox: { type: Number, default: 0 },
|
||||
DailyAffiliationEntrati: { type: Number, default: 0 },
|
||||
DailyAffiliationNecraloid: { type: Number, default: 0 },
|
||||
DailyAffiliationZariman: { type: Number, default: 0 },
|
||||
DailyAffiliationKahl: { type: Number, default: 0 },
|
||||
DailyAffiliationCavia: { type: Number, default: 0 },
|
||||
DailyAffiliationHex: { type: Number, default: 0 },
|
||||
|
||||
//Daily Focus limit
|
||||
DailyFocus: Number,
|
||||
DailyFocus: { type: Number, default: 250000 },
|
||||
//Focus XP per School
|
||||
FocusXP: focusXPSchema,
|
||||
//Curent active like Active school focuses is = "Zenurik"
|
||||
@ -853,7 +853,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
Scoops: [EquipmentSchema],
|
||||
|
||||
//Mastery Rank*(Need item XPInfo to rank up)
|
||||
PlayerLevel: Number,
|
||||
PlayerLevel: { type: Number, default: 0 },
|
||||
//Item Mastery Rank exp
|
||||
XPInfo: [TypeXPItemSchema],
|
||||
//Mastery Rank next availability
|
||||
@ -1027,7 +1027,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||
Robotics: [Schema.Types.Mixed],
|
||||
UsedDailyDeals: [Schema.Types.Mixed],
|
||||
CollectibleSeries: [Schema.Types.Mixed],
|
||||
HasResetAccount: Boolean,
|
||||
HasResetAccount: { type: Boolean, default: false },
|
||||
|
||||
//Discount Coupon
|
||||
PendingCoupon: Schema.Types.Mixed,
|
||||
|
@ -34,7 +34,6 @@ interface IConfig {
|
||||
myIrcAddresses?: string[];
|
||||
administratorNames?: string[];
|
||||
autoCreateAccount?: boolean;
|
||||
skipStoryModeChoice?: boolean;
|
||||
skipTutorial?: boolean;
|
||||
skipAllDialogue?: boolean;
|
||||
unlockAllScans?: boolean;
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 { Types } from "mongoose";
|
||||
import { SlotNames, IInventoryChanges, IBinChanges } from "@/src/types/purchaseTypes";
|
||||
@ -49,20 +49,19 @@ export const createInventory = async (
|
||||
defaultItemReferences: { loadOutPresetId: Types.ObjectId; ship: Types.ObjectId }
|
||||
) => {
|
||||
try {
|
||||
const inventory = new Inventory({
|
||||
...new_inventory,
|
||||
accountOwnerId: accountOwnerId,
|
||||
LoadOutPresets: defaultItemReferences.loadOutPresetId,
|
||||
Ships: [defaultItemReferences.ship]
|
||||
});
|
||||
if (config.skipStoryModeChoice) {
|
||||
inventory.StoryModeChoice = "WARFRAME";
|
||||
}
|
||||
if (config.skipTutorial) {
|
||||
inventory.PlayedParkourTutorial = true;
|
||||
inventory.ReceivedStartingGear = true;
|
||||
}
|
||||
|
||||
const inventory = config.skipTutorial
|
||||
? new Inventory({
|
||||
accountOwnerId: accountOwnerId,
|
||||
LoadOutPresets: defaultItemReferences.loadOutPresetId,
|
||||
Ships: [defaultItemReferences.ship],
|
||||
...postTutorialInventory
|
||||
})
|
||||
: new Inventory({
|
||||
accountOwnerId: accountOwnerId,
|
||||
LoadOutPresets: defaultItemReferences.loadOutPresetId,
|
||||
Ships: [defaultItemReferences.ship],
|
||||
TrainingDate: 0
|
||||
});
|
||||
await inventory.save();
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
|
@ -229,7 +229,7 @@ export interface IInventoryResponse {
|
||||
FocusUpgrades: IFocusUpgrade[];
|
||||
OperatorAmps: IEquipmentDatabase[];
|
||||
HasContributedToDojo?: boolean;
|
||||
HWIDProtectEnabled: boolean;
|
||||
HWIDProtectEnabled?: boolean;
|
||||
KubrowPetPrints: IKubrowPetPrint[];
|
||||
AlignmentReplay: IAlignment;
|
||||
PersonalGoalProgress: IPersonalGoalProgress[];
|
||||
@ -284,7 +284,7 @@ export interface IInventoryResponse {
|
||||
NemesisAbandonedRewards: string[];
|
||||
DailyAffiliationKahl: number;
|
||||
DailyAffiliationCavia: number;
|
||||
DailyAffiliationHex?: number;
|
||||
DailyAffiliationHex: number;
|
||||
LastInventorySync: IOid;
|
||||
NextRefill: IMongoDate; // Next time argon crystals will have a decay tick
|
||||
FoundToday?: IMiscItem[]; // for Argon Crystals
|
||||
|
@ -5,35 +5,17 @@
|
||||
"CrewMemberBin": { "Slots": 3 },
|
||||
"CrewShipSalvageBin": { "Slots": 8 },
|
||||
"DrifterMelee": [{ "ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||
"FusionPoints": 0,
|
||||
"MechBin": { "Slots": 4 },
|
||||
"OperatorAmpBin": { "Slots": 8 },
|
||||
"PveBonusLoadoutBin": { "Slots": 0 },
|
||||
"PvpBonusLoadoutBin": { "Slots": 0 },
|
||||
"RandomModBin": { "Slots": 15 },
|
||||
"RegularCredits": 3000,
|
||||
"SentinelBin": { "Slots": 10 },
|
||||
"SpaceSuitBin": { "Slots": 4 },
|
||||
"SpaceWeaponBin": { "Slots": 4 },
|
||||
"SuitBin": { "Slots": 1 },
|
||||
"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 },
|
||||
"GiftsRemaining": 8,
|
||||
"TradesRemaining": 0,
|
||||
"Recipes": [{ "ItemCount": 1, "ItemType": "/Lotus/Types/Recipes/Weapons/BoltonfaBlueprint" }],
|
||||
"SeasonChallengeHistory": [
|
||||
{ "challenge": "SeasonDailySolveCiphers", "id": "001000220000000000000308" },
|
||||
@ -63,12 +45,10 @@
|
||||
"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" } }],
|
||||
"PlayedParkourTutorial": true,
|
||||
"PremiumCreditsFree": 50,
|
||||
"QuestKeys": [{ "ItemType": "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain" }],
|
||||
"RawUpgrades": [{ "ItemCount": 1, "LastAdded": { "$oid": "6450f9bfe0714a4d6703f05f" }, "ItemType": "/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod" }],
|
||||
"ReceivedStartingGear": true,
|
||||
"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" } }],
|
||||
"TrainingRetriesLeft": 0,
|
||||
"WeaponSkins": [{ "ItemType": "/Lotus/Upgrades/Skins/Volt/VoltHelmet", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
|
||||
@ -114,7 +94,6 @@
|
||||
"KahlLoadOuts": [],
|
||||
"PendingRecipes": [],
|
||||
"TrainingDate": 0,
|
||||
"PlayerLevel": 0,
|
||||
"PersonalGoalProgress": [],
|
||||
"PersonalTechProjects": [],
|
||||
"QualifyingInvasions": [],
|
||||
@ -157,8 +136,5 @@
|
||||
"RewardQuantity": 10,
|
||||
"RewardStanding": 10000
|
||||
},
|
||||
"HasContributedToDojo": false,
|
||||
"HasResetAccount": false,
|
||||
"PendingCoupon": { "Expiry": { "$date": { "$numberLong": "0" } }, "Discount": 0 },
|
||||
"PremiumCredits": 50
|
||||
"PendingCoupon": { "Expiry": { "$date": { "$numberLong": "0" } }, "Discount": 0 }
|
||||
}
|
||||
|
@ -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>
|
||||
</div>
|
||||
<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">
|
||||
<input class="form-check-input" type="checkbox" id="skipTutorial" />
|
||||
<label class="form-check-label" for="skipTutorial">Skip Tutorial</label>
|
||||
|
@ -792,7 +792,6 @@ $("#mod-to-acquire").on("input", () => {
|
||||
|
||||
const uiConfigs = [
|
||||
"autoCreateAccount",
|
||||
"skipStoryModeChoice",
|
||||
"skipTutorial",
|
||||
"skipAllDialogue",
|
||||
"unlockAllScans",
|
||||
|
Loading…
x
Reference in New Issue
Block a user