forked from OpenWF/SpaceNinjaServer
feat: unlockAllScans (#151)
This commit is contained in:
parent
19d4b4e265
commit
eb1f472d4c
@ -5,6 +5,7 @@
|
||||
"version": "35.5.10",
|
||||
"skipStoryModeChoice": true,
|
||||
"skipTutorial": true,
|
||||
"unlockAllScans": true,
|
||||
"unlockAllMissions": true,
|
||||
"unlockAllQuests": true,
|
||||
"infiniteResources": true,
|
||||
|
@ -1,8 +1,15 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { IStatsView } from "@/src/types/statTypes";
|
||||
import config from "@/config.json";
|
||||
import view from "@/static/fixed_responses/view.json";
|
||||
import allScans from "@/static/fixed_responses/allScans.json";
|
||||
|
||||
const viewController: RequestHandler = (_req, res) => {
|
||||
res.json(view);
|
||||
let responseJson: IStatsView = view;
|
||||
if (config.unlockAllScans) {
|
||||
responseJson.Scans = allScans;
|
||||
}
|
||||
res.json(responseJson);
|
||||
};
|
||||
|
||||
export { viewController };
|
||||
|
63
src/types/statTypes.ts
Normal file
63
src/types/statTypes.ts
Normal file
@ -0,0 +1,63 @@
|
||||
export interface IStatsView {
|
||||
CiphersSolved?: number;
|
||||
CiphersFailed?: number;
|
||||
CipherTime?: number;
|
||||
Weapons?: IWeapon[];
|
||||
Enemies?: IEnemy[];
|
||||
MeleeKills?: number;
|
||||
MissionsCompleted?: number;
|
||||
MissionsQuit?: number;
|
||||
MissionsFailed?: number;
|
||||
TimePlayedSec?: number;
|
||||
PickupCount?: number;
|
||||
Tutorial?: { [key: string]: ITutorial };
|
||||
Abilities?: IAbility[];
|
||||
Rating?: number;
|
||||
Income?: number;
|
||||
Rank?: number;
|
||||
PlayerLevel?: number;
|
||||
Scans?: IScan[];
|
||||
Missions?: IMission[];
|
||||
Deaths?: number;
|
||||
HealCount?: number;
|
||||
ReviveCount?: number;
|
||||
}
|
||||
|
||||
export interface IAbility {
|
||||
used: number;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface IEnemy {
|
||||
executions?: number;
|
||||
headshots?: number;
|
||||
kills?: number;
|
||||
type: string;
|
||||
assists?: number;
|
||||
deaths?: number;
|
||||
}
|
||||
|
||||
export interface IMission {
|
||||
highScore: number;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface IScan {
|
||||
scans: number;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface ITutorial {
|
||||
stage: number;
|
||||
}
|
||||
|
||||
export interface IWeapon {
|
||||
equipTime?: number;
|
||||
hits?: number;
|
||||
kills?: number;
|
||||
xp?: number;
|
||||
assists?: number;
|
||||
type: string;
|
||||
headshots?: number;
|
||||
fired?: number;
|
||||
}
|
14946
static/fixed_responses/allScans.json
Normal file
14946
static/fixed_responses/allScans.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user