mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 02:42:22 +01:00
New config option: Enable all existing StW events!
This commit is contained in:
@@ -5,8 +5,10 @@ bUseConfigDisplayName=false
|
|||||||
displayName=LawinServer
|
displayName=LawinServer
|
||||||
|
|
||||||
[Profile]
|
[Profile]
|
||||||
# If this is set to true, every BR and StW seasonal quest will be on complete. Works for Battle Royale from Season 3 to Season 20 and for Save the World from Season 2 to Season X.
|
# If this is set to true, every BR and StW seasonal quest will be on complete. Works for Battle Royale from Season 3 to Season 21 and for Save the World from Season 2 to Season X.
|
||||||
bCompletedSeasonalQuests=false
|
bCompletedSeasonalQuests=false
|
||||||
|
# If this is set to true, all Save the World events will be displayed in lobby.
|
||||||
|
bAllSTWEventsActivated=false
|
||||||
|
|
||||||
[GameServer]
|
[GameServer]
|
||||||
# Matchmaker gameserver config, you can use this to connect to gameservers like rift (titanium), fortmp, etc... (they have to be hosting though).
|
# Matchmaker gameserver config, you can use this to connect to gameservers like rift (titanium), fortmp, etc... (they have to be hosting though).
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
- Changing items edit styles
|
- Changing items edit styles
|
||||||
- Support a Creator with specific codes
|
- Support a Creator with specific codes
|
||||||
- Fully working daily challenges system (New daily challenge every day, replacing daily challenges, etc...)
|
- Fully working daily challenges system (New daily challenge every day, replacing daily challenges, etc...)
|
||||||
- Seasonal Quests from Season 3 up to Season 20 (Can change)
|
- Seasonal Quests from Season 3 up to Season 21 (Can change)
|
||||||
- Purchasable battle pass from Season 2 to Season 10 (Can change)
|
- Purchasable battle pass from Season 2 to Season 10 (Can change)
|
||||||
- Discovery Tab
|
- Discovery Tab
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
const Express = require("express");
|
const Express = require("express");
|
||||||
const express = Express.Router();
|
const express = Express.Router();
|
||||||
const functions = require("./functions.js");
|
const functions = require("./functions.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
const iniparser = require("ini");
|
||||||
|
const config = iniparser.parse(fs.readFileSync(path.join(__dirname, "..", "Config", "config.ini")).toString());
|
||||||
|
|
||||||
express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
||||||
const memory = functions.GetVersionInfo(req);
|
const memory = functions.GetVersionInfo(req);
|
||||||
@@ -1062,6 +1066,81 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.Profile.bAllSTWEventsActivated == true) {
|
||||||
|
var Events = [
|
||||||
|
"EventFlag.Blockbuster2018",
|
||||||
|
"EventFlag.Blockbuster2018Phase1",
|
||||||
|
"EventFlag.Blockbuster2018Phase2",
|
||||||
|
"EventFlag.Blockbuster2018Phase3",
|
||||||
|
"EventFlag.Blockbuster2018Phase4",
|
||||||
|
"EventFlag.Fortnitemares",
|
||||||
|
"EventFlag.FortnitemaresPhase1",
|
||||||
|
"EventFlag.FortnitemaresPhase2",
|
||||||
|
"EventFlag.Frostnite",
|
||||||
|
"EventFlag.HolidayDeco",
|
||||||
|
"EventFlag.Horde",
|
||||||
|
"EventFlag.Mayday",
|
||||||
|
"EventFlag.Outpost",
|
||||||
|
"EventFlag.Phoenix.Adventure",
|
||||||
|
"EventFlag.Phoenix.Fortnitemares",
|
||||||
|
"EventFlag.Phoenix.Fortnitemares.Clip",
|
||||||
|
"EventFlag.Phoenix.NewBeginnings",
|
||||||
|
"EventFlag.Phoenix.NewBeginnings.SpringTraining",
|
||||||
|
"EventFlag.Phoenix.RoadTrip",
|
||||||
|
"EventFlag.Phoenix.Winterfest",
|
||||||
|
"EventFlag.Phoenix.Winterfest.GhostOfChristmas",
|
||||||
|
"EventFlag.RoadTrip2018",
|
||||||
|
"EventFlag.STWBrainstorm",
|
||||||
|
"EventFlag.STWFennix",
|
||||||
|
"EventFlag.STWIrwin",
|
||||||
|
"EventFlag.Season10.Phase2",
|
||||||
|
"EventFlag.Season10.Phase3",
|
||||||
|
"EventFlag.Season11.Fortnitemares.Quests.Phase1",
|
||||||
|
"EventFlag.Season11.Fortnitemares.Quests.Phase2",
|
||||||
|
"EventFlag.Season11.Fortnitemares.Quests.Phase3",
|
||||||
|
"EventFlag.Season11.Fortnitemares.Quests.Phase4",
|
||||||
|
"EventFlag.Season11.Frostnite",
|
||||||
|
"EventFlag.Season11.WinterFest.Quests.Phase1",
|
||||||
|
"EventFlag.Season11.WinterFest.Quests.Phase2",
|
||||||
|
"EventFlag.Season11.WinterFest.Quests.Phase3",
|
||||||
|
"EventFlag.Season12.NoDancing.Quests",
|
||||||
|
"EventFlag.Season12.Spies.Quests",
|
||||||
|
"EventFlag.Season9.Phase1",
|
||||||
|
"EventFlag.Season9.Phase2",
|
||||||
|
"EventFlag.Spring2018Phase1",
|
||||||
|
"EventFlag.Spring2018Phase2",
|
||||||
|
"EventFlag.Spring2018Phase3",
|
||||||
|
"EventFlag.Spring2018Phase4",
|
||||||
|
"EventFlag.Spring2019",
|
||||||
|
"EventFlag.Spring2019.Phase1",
|
||||||
|
"EventFlag.Spring2019.Phase2",
|
||||||
|
"EventFlag.Starlight",
|
||||||
|
"EventFlag.StormKing.Landmark",
|
||||||
|
"EventFlag.YarrrTwo"
|
||||||
|
]
|
||||||
|
|
||||||
|
for (var i = 0; i < Events.length; i++) {
|
||||||
|
var Event = Events[i];
|
||||||
|
var bAlreadyExists = false;
|
||||||
|
|
||||||
|
for (var x = 0; x < activeEvents.length; x++) {
|
||||||
|
var ActiveEvent = activeEvents[x];
|
||||||
|
if (ActiveEvent.eventType == Event) {
|
||||||
|
bAlreadyExists = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bAlreadyExists == false) {
|
||||||
|
activeEvents.push(
|
||||||
|
{
|
||||||
|
"eventType": Event,
|
||||||
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
"channels": {
|
"channels": {
|
||||||
"client-matchmaking": {
|
"client-matchmaking": {
|
||||||
|
|||||||
Reference in New Issue
Block a user