forked from OpenWF/SpaceNinjaServer
		
	feat: worldState.baroTennoConRelay config (#2574)
Closes #2531 Reviewed-on: OpenWF/SpaceNinjaServer#2574 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									6e1cb0c9f9
								
							
						
					
					
						commit
						f561884f2c
					
				@ -335,6 +335,17 @@ export const getInventoryResponse = async (
 | 
			
		||||
        for (const uniqueName in ExportFlavour) {
 | 
			
		||||
            inventoryResponse.FlavourItems.push({ ItemType: uniqueName });
 | 
			
		||||
        }
 | 
			
		||||
    } else if (config.worldState?.baroTennoConRelay) {
 | 
			
		||||
        [
 | 
			
		||||
            "/Lotus/Types/Items/Events/TennoConRelay2022EarlyAccess",
 | 
			
		||||
            "/Lotus/Types/Items/Events/TennoConRelay2023EarlyAccess",
 | 
			
		||||
            "/Lotus/Types/Items/Events/TennoConRelay2024EarlyAccess",
 | 
			
		||||
            "/Lotus/Types/Items/Events/TennoConRelay2025EarlyAccess"
 | 
			
		||||
        ].forEach(uniqueName => {
 | 
			
		||||
            if (!inventoryResponse.FlavourItems.some(x => x.ItemType == uniqueName)) {
 | 
			
		||||
                inventoryResponse.FlavourItems.push({ ItemType: uniqueName });
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (config.unlockAllSkins) {
 | 
			
		||||
 | 
			
		||||
@ -82,6 +82,7 @@ export interface IConfig {
 | 
			
		||||
        affinityBoost?: boolean;
 | 
			
		||||
        resourceBoost?: boolean;
 | 
			
		||||
        tennoLiveRelay?: boolean;
 | 
			
		||||
        baroTennoConRelay?: boolean;
 | 
			
		||||
        galleonOfGhouls?: number;
 | 
			
		||||
        starDaysOverride?: boolean;
 | 
			
		||||
        eidolonOverride?: string;
 | 
			
		||||
 | 
			
		||||
@ -1157,6 +1157,25 @@ const getIdealTimeSatsifyingConstraints = (constraints: ITimeConstraint[]): numb
 | 
			
		||||
    return timeSecs;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const fullyStockBaro = (vt: IVoidTrader): void => {
 | 
			
		||||
    for (const armorSet of baro.armorSets) {
 | 
			
		||||
        if (Array.isArray(armorSet[0])) {
 | 
			
		||||
            for (const set of armorSet as IVoidTraderOffer[][]) {
 | 
			
		||||
                for (const item of set) {
 | 
			
		||||
                    vt.Manifest.push(item);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            for (const item of armorSet as IVoidTraderOffer[]) {
 | 
			
		||||
                vt.Manifest.push(item);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    for (const item of baro.rest) {
 | 
			
		||||
        vt.Manifest.push(item);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const getVarziaRotation = (week: number): string => {
 | 
			
		||||
    const seed = new SRng(week).randomInt(0, 100_000);
 | 
			
		||||
    const rng = new SRng(seed);
 | 
			
		||||
@ -1402,6 +1421,33 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
 | 
			
		||||
            Node: "TennoConBHUB6"
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    if (config.worldState?.baroTennoConRelay) {
 | 
			
		||||
        worldState.Goals.push({
 | 
			
		||||
            _id: { $oid: "687bb2f00000000000000000" },
 | 
			
		||||
            Activation: { $date: { $numberLong: "1752937200000" } },
 | 
			
		||||
            Expiry: { $date: { $numberLong: "2000000000000" } },
 | 
			
		||||
            Count: 0,
 | 
			
		||||
            Goal: 0,
 | 
			
		||||
            Success: 0,
 | 
			
		||||
            Personal: true,
 | 
			
		||||
            //"Faction": "FC_GRINEER",
 | 
			
		||||
            Desc: "/Lotus/Language/Locations/RelayStationTennoCon",
 | 
			
		||||
            ToolTip: "/Lotus/Language/Locations/RelayStationTennoConDesc",
 | 
			
		||||
            Icon: "/Lotus/Interface/Icons/Categories/IconTennoConSigil.png",
 | 
			
		||||
            Tag: "TennoConRelay",
 | 
			
		||||
            Node: "TennoConHUB2"
 | 
			
		||||
        });
 | 
			
		||||
        const vt: IVoidTrader = {
 | 
			
		||||
            _id: { $oid: "687809030379266d790495c6" },
 | 
			
		||||
            Activation: { $date: { $numberLong: "1752937200000" } },
 | 
			
		||||
            Expiry: { $date: { $numberLong: "2000000000000" } },
 | 
			
		||||
            Character: "Baro'Ki Teel",
 | 
			
		||||
            Node: "TennoConHUB2",
 | 
			
		||||
            Manifest: []
 | 
			
		||||
        };
 | 
			
		||||
        worldState.VoidTraders.push(vt);
 | 
			
		||||
        fullyStockBaro(vt);
 | 
			
		||||
    }
 | 
			
		||||
    const isFebruary = date.getUTCMonth() == 1;
 | 
			
		||||
    if (config.worldState?.starDaysOverride ?? isFebruary) {
 | 
			
		||||
        worldState.Goals.push({
 | 
			
		||||
@ -1633,24 +1679,8 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
 | 
			
		||||
        };
 | 
			
		||||
        worldState.VoidTraders.push(vt);
 | 
			
		||||
        if (isBeforeNextExpectedWorldStateRefresh(timeMs, baroActualStart)) {
 | 
			
		||||
            vt.Manifest = [];
 | 
			
		||||
            if (config.baroFullyStocked) {
 | 
			
		||||
                for (const armorSet of baro.armorSets) {
 | 
			
		||||
                    if (Array.isArray(armorSet[0])) {
 | 
			
		||||
                        for (const set of armorSet as IVoidTraderOffer[][]) {
 | 
			
		||||
                            for (const item of set) {
 | 
			
		||||
                                vt.Manifest.push(item);
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    } else {
 | 
			
		||||
                        for (const item of armorSet as IVoidTraderOffer[]) {
 | 
			
		||||
                            vt.Manifest.push(item);
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                for (const item of baro.rest) {
 | 
			
		||||
                    vt.Manifest.push(item);
 | 
			
		||||
                }
 | 
			
		||||
                fullyStockBaro(vt);
 | 
			
		||||
            } else {
 | 
			
		||||
                const rng = new SRng(new SRng(baroIndex).randomInt(0, 100_000));
 | 
			
		||||
                // TOVERIFY: Constraint for upgrades amount?
 | 
			
		||||
 | 
			
		||||
@ -929,6 +929,10 @@
 | 
			
		||||
                                    <input class="form-check-input" type="checkbox" id="worldState.tennoLiveRelay" />
 | 
			
		||||
                                    <label class="form-check-label" for="worldState.tennoLiveRelay" data-loc="worldState_tennoLiveRelay"></label>
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="form-check">
 | 
			
		||||
                                    <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.varziaFullyStocked" />
 | 
			
		||||
                                    <label class="form-check-label" for="worldState.varziaFullyStocked" data-loc="worldState_varziaFullyStocked"></label>
 | 
			
		||||
 | 
			
		||||
@ -243,6 +243,7 @@ dict = {
 | 
			
		||||
    worldState_affinityBoost: `Event Booster: Erfahrung`,
 | 
			
		||||
    worldState_resourceBoost: `Event Booster: Ressourcen`,
 | 
			
		||||
    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
 | 
			
		||||
    worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
 | 
			
		||||
    worldState_starDays: `Sternen-Tage`,
 | 
			
		||||
    worldState_galleonOfGhouls: `Galeone der Ghule`,
 | 
			
		||||
    enabled: `[UNTRANSLATED] Enabled`,
 | 
			
		||||
 | 
			
		||||
@ -242,6 +242,7 @@ dict = {
 | 
			
		||||
    worldState_affinityBoost: `Affinity Boost`,
 | 
			
		||||
    worldState_resourceBoost: `Resource Boost`,
 | 
			
		||||
    worldState_tennoLiveRelay: `TennoLive Relay`,
 | 
			
		||||
    worldState_baroTennoConRelay: `Baro's TennoCon Relay`,
 | 
			
		||||
    worldState_starDays: `Star Days`,
 | 
			
		||||
    worldState_galleonOfGhouls: `Galleon of Ghouls`,
 | 
			
		||||
    enabled: `Enabled`,
 | 
			
		||||
 | 
			
		||||
@ -243,6 +243,7 @@ dict = {
 | 
			
		||||
    worldState_affinityBoost: `Potenciador de Afinidad`,
 | 
			
		||||
    worldState_resourceBoost: `Potenciador de Recursos`,
 | 
			
		||||
    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
 | 
			
		||||
    worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
 | 
			
		||||
    worldState_starDays: `Días estelares`,
 | 
			
		||||
    worldState_galleonOfGhouls: `Galeón de Gules`,
 | 
			
		||||
    enabled: `[UNTRANSLATED] Enabled`,
 | 
			
		||||
 | 
			
		||||
@ -243,6 +243,7 @@ dict = {
 | 
			
		||||
    worldState_affinityBoost: `Booster d'Affinité`,
 | 
			
		||||
    worldState_resourceBoost: `Booster de Ressource`,
 | 
			
		||||
    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
 | 
			
		||||
    worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
 | 
			
		||||
    worldState_starDays: `Jours Stellaires`,
 | 
			
		||||
    worldState_galleonOfGhouls: `Galion des Goules`,
 | 
			
		||||
    enabled: `[UNTRANSLATED] Enabled`,
 | 
			
		||||
 | 
			
		||||
@ -243,6 +243,7 @@ dict = {
 | 
			
		||||
    worldState_affinityBoost: `[UNTRANSLATED] Affinity Boost`,
 | 
			
		||||
    worldState_resourceBoost: `[UNTRANSLATED] Resource Boost`,
 | 
			
		||||
    worldState_tennoLiveRelay: `[UNTRANSLATED] TennoLive Relay`,
 | 
			
		||||
    worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
 | 
			
		||||
    worldState_starDays: `[UNTRANSLATED] Star Days`,
 | 
			
		||||
    worldState_galleonOfGhouls: `[UNTRANSLATED] Galleon of Ghouls`,
 | 
			
		||||
    enabled: `[UNTRANSLATED] Enabled`,
 | 
			
		||||
 | 
			
		||||
@ -243,6 +243,7 @@ dict = {
 | 
			
		||||
    worldState_affinityBoost: `经验加成`,
 | 
			
		||||
    worldState_resourceBoost: `资源加成`,
 | 
			
		||||
    worldState_tennoLiveRelay: `TennoLive 中继站`,
 | 
			
		||||
    worldState_baroTennoConRelay: `[UNTRANSLATED] Baro's TennoCon Relay`,
 | 
			
		||||
    worldState_starDays: `活动:星日`,
 | 
			
		||||
    worldState_galleonOfGhouls: `战术警报:尸鬼的帆船战舰`,
 | 
			
		||||
    enabled: `启用`,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user