chore: move baro cheats to worldstate section #2695

Merged
Sainan merged 3 commits from AMelonInsideLemon/SpaceNinjaServer:move-baro into main 2025-08-27 01:29:39 -07:00
5 changed files with 24 additions and 21 deletions

View File

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

View File

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

View File

@ -36,7 +36,7 @@ export const createNewEventMessages = async (req: Request): Promise<void> => {
// Baro // Baro
const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14)); const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14));
const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000; 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) { if (Date.now() >= baroActualStart && account.LatestEventMessageDate.getTime() < baroActualStart) {
newEventMessages.push({ newEventMessages.push({
sndr: "/Lotus/Language/G1Quests/VoidTraderName", 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 baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14));
const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000; 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 baroEnd = baroStart + unixTimesInMs.day * 14;
const baroNode = ["EarthHUB", "MercuryHUB", "SaturnHUB", "PlutoHUB"][baroIndex % 4]; const baroNode = ["EarthHUB", "MercuryHUB", "SaturnHUB", "PlutoHUB"][baroIndex % 4];
const vt: IVoidTrader = { const vt: IVoidTrader = {
@ -2946,7 +2946,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
}; };
worldState.VoidTraders.push(vt); worldState.VoidTraders.push(vt);
if (isBeforeNextExpectedWorldStateRefresh(timeMs, baroActualStart)) { if (isBeforeNextExpectedWorldStateRefresh(timeMs, baroActualStart)) {
if (config.baroFullyStocked) { if (config.worldState?.baroFullyStocked) {
fullyStockBaro(vt); fullyStockBaro(vt);
} else { } else {
const rng = new SRng(new SRng(baroIndex).randomInt(0, 100_000)); 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" /> <input class="form-check-input" type="checkbox" id="fullyStockedVendors" />
<label class="form-check-label" for="fullyStockedVendors" data-loc="cheats_fullyStockedVendors"></label> <label class="form-check-label" for="fullyStockedVendors" data-loc="cheats_fullyStockedVendors"></label>
</div> </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"> <div class="form-check">
<input class="form-check-input" type="checkbox" id="unlockAllProfitTakerStages" /> <input class="form-check-input" type="checkbox" id="unlockAllProfitTakerStages" />
<label class="form-check-label" for="unlockAllProfitTakerStages" data-loc="cheats_unlockAllProfitTakerStages"></label> <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" /> <input class="form-check-input" type="checkbox" id="worldState.baroTennoConRelay" />
<label class="form-check-label" for="worldState.baroTennoConRelay" data-loc="worldState_baroTennoConRelay"></label> <label class="form-check-label" for="worldState.baroTennoConRelay" data-loc="worldState_baroTennoConRelay"></label>
</div> </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"> <div class="form-check">
<input class="form-check-input" type="checkbox" id="worldState.varziaFullyStocked" /> <input class="form-check-input" type="checkbox" id="worldState.varziaFullyStocked" />
<label class="form-check-label" for="worldState.varziaFullyStocked" data-loc="worldState_varziaFullyStocked"></label> <label class="form-check-label" for="worldState.varziaFullyStocked" data-loc="worldState_varziaFullyStocked"></label>