chore: move baro cheats to worldstate section (#2695)

Reviewed-on: OpenWF/SpaceNinjaServer#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>
This commit is contained in:
AMelonInsideLemon 2025-08-27 01:29:38 -07:00 committed by Sainan
parent 9d034824f7
commit 15578b04d2
5 changed files with 24 additions and 21 deletions

View File

@ -19,8 +19,6 @@
"unlockAllSkins": false,
"unlockAllCapturaScenes": false,
"fullyStockedVendors": false,
"baroAlwaysAvailable": false,
"baroFullyStocked": false,
"unlockAllProfitTakerStages": false,
"skipClanKeyCrafting": false,
"noDojoRoomBuildStage": false,
@ -45,6 +43,10 @@
"affinityBoost": false,
"resourceBoost": false,
"tennoLiveRelay": false,
"baroTennoConRelay": false,
"baroAlwaysAvailable": false,
"baroFullyStocked": false,
"varziaFullyStocked": false,
"wolfHunt": false,
"orphixVenom": false,
"longShadow": false,
@ -71,10 +73,9 @@
"duviriOverride": "",
"nightwaveOverride": "",
"allTheFissures": "",
"circuitGameModes": null,
"darvoStockMultiplier": 1,
"varziaOverride": "",
"varziaFullyStocked": false
"circuitGameModes": null,
"darvoStockMultiplier": 1
},
"dev": {
"keepVendorsExpired": false

View File

@ -27,8 +27,6 @@ export interface IConfig extends IConfigRemovedOptions {
unlockAllCapturaScenes?: boolean;
unlockAllDecoRecipes?: boolean;
fullyStockedVendors?: boolean;
baroAlwaysAvailable?: boolean;
baroFullyStocked?: boolean;
unlockAllProfitTakerStages?: boolean;
skipClanKeyCrafting?: boolean;
noDojoRoomBuildStage?: boolean;
@ -57,6 +55,9 @@ export interface IConfig extends IConfigRemovedOptions {
resourceBoost?: boolean;
tennoLiveRelay?: boolean;
baroTennoConRelay?: boolean;
baroAlwaysAvailable?: boolean;
baroFullyStocked?: boolean;
varziaFullyStocked?: boolean;
wolfHunt?: boolean;
orphixVenom?: boolean;
longShadow?: boolean;
@ -83,10 +84,9 @@ export interface IConfig extends IConfigRemovedOptions {
duviriOverride?: string;
nightwaveOverride?: string;
allTheFissures?: string;
varziaOverride?: string;
circuitGameModes?: string[];
darvoStockMultiplier?: number;
varziaOverride?: string;
varziaFullyStocked?: boolean;
};
dev?: {
keepVendorsExpired?: boolean;
@ -120,7 +120,9 @@ export const configRemovedOptionsKeys = [
"syndicateMissionsRepeatable",
"instantFinishRivenChallenge",
"instantResourceExtractorDrones",
"noResourceExtractorDronesDamage"
"noResourceExtractorDronesDamage",
"baroAlwaysAvailable",
"baroFullyStocked"
] as const;
type IConfigRemovedOptions = {

View File

@ -36,7 +36,7 @@ export const createNewEventMessages = async (req: Request): Promise<void> => {
// Baro
const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14));
const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000;
const baroActualStart = baroStart + unixTimesInMs.day * (config.baroAlwaysAvailable ? 0 : 12);
const baroActualStart = baroStart + unixTimesInMs.day * (config.worldState?.baroAlwaysAvailable ? 0 : 12);
if (Date.now() >= baroActualStart && account.LatestEventMessageDate.getTime() < baroActualStart) {
newEventMessages.push({
sndr: "/Lotus/Language/G1Quests/VoidTraderName",

View File

@ -2933,7 +2933,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
{
const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14));
const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000;
const baroActualStart = baroStart + unixTimesInMs.day * (config.baroAlwaysAvailable ? 0 : 12);
const baroActualStart = baroStart + unixTimesInMs.day * (config.worldState?.baroAlwaysAvailable ? 0 : 12);
const baroEnd = baroStart + unixTimesInMs.day * 14;
const baroNode = ["EarthHUB", "MercuryHUB", "SaturnHUB", "PlutoHUB"][baroIndex % 4];
const vt: IVoidTrader = {
@ -2946,7 +2946,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
};
worldState.VoidTraders.push(vt);
if (isBeforeNextExpectedWorldStateRefresh(timeMs, baroActualStart)) {
if (config.baroFullyStocked) {
if (config.worldState?.baroFullyStocked) {
fullyStockBaro(vt);
} else {
const rng = new SRng(new SRng(baroIndex).randomInt(0, 100_000));

View File

@ -822,14 +822,6 @@
<input class="form-check-input" type="checkbox" id="fullyStockedVendors" />
<label class="form-check-label" for="fullyStockedVendors" data-loc="cheats_fullyStockedVendors"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="baroAlwaysAvailable" />
<label class="form-check-label" for="baroAlwaysAvailable" data-loc="cheats_baroAlwaysAvailable"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="baroFullyStocked" />
<label class="form-check-label" for="baroFullyStocked" data-loc="cheats_baroFullyStocked"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="unlockAllProfitTakerStages" />
<label class="form-check-label" for="unlockAllProfitTakerStages" data-loc="cheats_unlockAllProfitTakerStages"></label>
@ -933,6 +925,14 @@
<input class="form-check-input" type="checkbox" id="worldState.baroTennoConRelay" />
<label class="form-check-label" for="worldState.baroTennoConRelay" data-loc="worldState_baroTennoConRelay"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="worldState.baroAlwaysAvailable" />
<label class="form-check-label" for="worldState.baroAlwaysAvailable" data-loc="cheats_baroAlwaysAvailable"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="worldState.baroFullyStocked" />
<label class="form-check-label" for="worldState.baroFullyStocked" data-loc="cheats_baroFullyStocked"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="worldState.varziaFullyStocked" />
<label class="form-check-label" for="worldState.varziaFullyStocked" data-loc="worldState_varziaFullyStocked"></label>