返回提交历史
Modified
config-vanilla.json
+6
-5
Modified
src/services/configService.ts
+7
-5
Modified
src/services/inboxService.ts
+1
-1
Modified
src/services/worldStateService.ts
+2
-2
Modified
static/webui/index.html
+8
-8
XFEstudio/SpaceNinjaServer
chore: move baro cheats to worldstate section (#2695)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2695 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
15578b04
代码差异
5 个文件
+24
-21
@@ -19,8 +19,6 @@
19
19
"unlockAllSkins": false,
20
20
"unlockAllCapturaScenes": false,
21
21
"fullyStockedVendors": false,
22
"baroAlwaysAvailable": false,
23
"baroFullyStocked": false,
24
22
"unlockAllProfitTakerStages": false,
25
23
"skipClanKeyCrafting": false,
26
24
"noDojoRoomBuildStage": false,
@@ -45,6 +43,10 @@
45
43
"affinityBoost": false,
46
44
"resourceBoost": false,
47
45
"tennoLiveRelay": false,
46
"baroTennoConRelay": false,
47
"baroAlwaysAvailable": false,
48
"baroFullyStocked": false,
49
"varziaFullyStocked": false,
48
50
"wolfHunt": false,
49
51
"orphixVenom": false,
50
52
"longShadow": false,
@@ -71,10 +73,9 @@
71
73
"duviriOverride": "",
72
74
"nightwaveOverride": "",
73
75
"allTheFissures": "",
74
"circuitGameModes": null,
75
"darvoStockMultiplier": 1,
76
76
"varziaOverride": "",
77
"varziaFullyStocked": false
77
"circuitGameModes": null,
78
"darvoStockMultiplier": 1
78
79
},
79
80
"dev": {
80
81
"keepVendorsExpired": false
@@ -27,8 +27,6 @@ export interface IConfig extends IConfigRemovedOptions {
27
27
unlockAllCapturaScenes?: boolean;
28
28
unlockAllDecoRecipes?: boolean;
29
29
fullyStockedVendors?: boolean;
30
baroAlwaysAvailable?: boolean;
31
baroFullyStocked?: boolean;
32
30
unlockAllProfitTakerStages?: boolean;
33
31
skipClanKeyCrafting?: boolean;
34
32
noDojoRoomBuildStage?: boolean;
@@ -57,6 +55,9 @@ export interface IConfig extends IConfigRemovedOptions {
57
55
resourceBoost?: boolean;
58
56
tennoLiveRelay?: boolean;
59
57
baroTennoConRelay?: boolean;
58
baroAlwaysAvailable?: boolean;
59
baroFullyStocked?: boolean;
60
varziaFullyStocked?: boolean;
60
61
wolfHunt?: boolean;
61
62
orphixVenom?: boolean;
62
63
longShadow?: boolean;
@@ -83,10 +84,9 @@ export interface IConfig extends IConfigRemovedOptions {
83
84
duviriOverride?: string;
84
85
nightwaveOverride?: string;
85
86
allTheFissures?: string;
87
varziaOverride?: string;
86
88
circuitGameModes?: string[];
87
89
darvoStockMultiplier?: number;
88
varziaOverride?: string;
89
varziaFullyStocked?: boolean;
90
90
};
91
91
dev?: {
92
92
keepVendorsExpired?: boolean;
@@ -120,7 +120,9 @@ export const configRemovedOptionsKeys = [
120
120
"syndicateMissionsRepeatable",
121
121
"instantFinishRivenChallenge",
122
122
"instantResourceExtractorDrones",
123
"noResourceExtractorDronesDamage"
123
"noResourceExtractorDronesDamage",
124
"baroAlwaysAvailable",
125
"baroFullyStocked"
124
126
] as const;
125
127
126
128
type IConfigRemovedOptions = {
@@ -36,7 +36,7 @@ export const createNewEventMessages = async (req: Request): Promise<void> => {
36
36
// Baro
37
37
const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14));
38
38
const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000;
39
const baroActualStart = baroStart + unixTimesInMs.day * (config.baroAlwaysAvailable ? 0 : 12);
39
const baroActualStart = baroStart + unixTimesInMs.day * (config.worldState?.baroAlwaysAvailable ? 0 : 12);
40
40
if (Date.now() >= baroActualStart && account.LatestEventMessageDate.getTime() < baroActualStart) {
41
41
newEventMessages.push({
42
42
sndr: "/Lotus/Language/G1Quests/VoidTraderName",
@@ -2933,7 +2933,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2933
2933
{
2934
2934
const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14));
2935
2935
const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000;
2936
const baroActualStart = baroStart + unixTimesInMs.day * (config.baroAlwaysAvailable ? 0 : 12);
2936
const baroActualStart = baroStart + unixTimesInMs.day * (config.worldState?.baroAlwaysAvailable ? 0 : 12);
2937
2937
const baroEnd = baroStart + unixTimesInMs.day * 14;
2938
2938
const baroNode = ["EarthHUB", "MercuryHUB", "SaturnHUB", "PlutoHUB"][baroIndex % 4];
2939
2939
const vt: IVoidTrader = {
@@ -2946,7 +2946,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2946
2946
};
2947
2947
worldState.VoidTraders.push(vt);
2948
2948
if (isBeforeNextExpectedWorldStateRefresh(timeMs, baroActualStart)) {
2949
if (config.baroFullyStocked) {
2949
if (config.worldState?.baroFullyStocked) {
2950
2950
fullyStockBaro(vt);
2951
2951
} else {
2952
2952
const rng = new SRng(new SRng(baroIndex).randomInt(0, 100_000));
@@ -822,14 +822,6 @@
822
822
<input class="form-check-input" type="checkbox" id="fullyStockedVendors" />
823
823
<label class="form-check-label" for="fullyStockedVendors" data-loc="cheats_fullyStockedVendors"></label>
824
824
</div>
825
<div class="form-check">
826
<input class="form-check-input" type="checkbox" id="baroAlwaysAvailable" />
827
<label class="form-check-label" for="baroAlwaysAvailable" data-loc="cheats_baroAlwaysAvailable"></label>
828
</div>
829
<div class="form-check">
830
<input class="form-check-input" type="checkbox" id="baroFullyStocked" />
831
<label class="form-check-label" for="baroFullyStocked" data-loc="cheats_baroFullyStocked"></label>
832
</div>
833
825
<div class="form-check">
834
826
<input class="form-check-input" type="checkbox" id="unlockAllProfitTakerStages" />
835
827
<label class="form-check-label" for="unlockAllProfitTakerStages" data-loc="cheats_unlockAllProfitTakerStages"></label>
@@ -933,6 +925,14 @@
933
925
<input class="form-check-input" type="checkbox" id="worldState.baroTennoConRelay" />
934
926
<label class="form-check-label" for="worldState.baroTennoConRelay" data-loc="worldState_baroTennoConRelay"></label>
935
927
</div>
928
<div class="form-check">
929
<input class="form-check-input" type="checkbox" id="worldState.baroAlwaysAvailable" />
930
<label class="form-check-label" for="worldState.baroAlwaysAvailable" data-loc="cheats_baroAlwaysAvailable"></label>
931
</div>
932
<div class="form-check">
933
<input class="form-check-input" type="checkbox" id="worldState.baroFullyStocked" />
934
<label class="form-check-label" for="worldState.baroFullyStocked" data-loc="cheats_baroFullyStocked"></label>
935
</div>
936
936
<div class="form-check">
937
937
<input class="form-check-input" type="checkbox" id="worldState.varziaFullyStocked" />
938
938
<label class="form-check-label" for="worldState.varziaFullyStocked" data-loc="worldState_varziaFullyStocked"></label>