diff --git a/devTools/types/FC/facilities.d.ts b/devTools/types/FC/facilities.d.ts index cdb4521152c0ad3bc87ea764970e749cd597724d..0d3b8f87f52618dbd50148a081545a1f487634d9 100644 --- a/devTools/types/FC/facilities.d.ts +++ b/devTools/types/FC/facilities.d.ts @@ -182,6 +182,10 @@ declare namespace FC { trainingIDs: number[]; // Pit section + /** + * If there is a fight event at the end of the week. + */ + active: boolean /** The type of audience the Pit has. */ audience: "none" | "free" | "paid"; /** The type of decoration the Pit is using. */ diff --git a/src/events/scheduled/pitFight.js b/src/events/scheduled/pitFight.js index a7600081b747c7f6e105ad01fdd371cef2abd4ef..08d895aca5e87c1b82fc9b88159dcc76bd7df04d 100644 --- a/src/events/scheduled/pitFight.js +++ b/src/events/scheduled/pitFight.js @@ -2,6 +2,7 @@ App.Events.SEPitFight = class SEPitFight extends App.Events.BaseEvent { eventPrerequisites() { return [ () => !!V.pit, + () => V.pit.active, () => !V.pit.fought, ]; } diff --git a/src/facilities/pit/pit.js b/src/facilities/pit/pit.js index eca98984f9038677ac9977158b7e9464d93ae421..922dc56562a0a2cb6a26c718d2839c0e5cec7282 100644 --- a/src/facilities/pit/pit.js +++ b/src/facilities/pit/pit.js @@ -230,7 +230,11 @@ App.Facilities.Pit.pit = function() { const options = new App.UI.OptionsGroup(); - let option = options.addOption(null, "audience", V.pit) + options.addOption("Host fights once a week", "active", V.pit) + .addValue("Yes", true).on() + .addValue("No", false).off(); + + let option = options.addOption("Audience", "audience", V.pit) .addValue("Closed", "none") .addValue("Free", "free") .addValue("Paid", "paid"); diff --git a/src/facilities/pit/pitUtils.js b/src/facilities/pit/pitUtils.js index be581645138caa5afa6a1b3c2ec0ab4350087b25..b42689e232e204aa180958fb371b2a441044d719 100644 --- a/src/facilities/pit/pitUtils.js +++ b/src/facilities/pit/pitUtils.js @@ -6,6 +6,7 @@ App.Facilities.Pit.init = function() { trainingIDs: [], // Pit section + active:false, audience: "free", decoration: "standard", fighterIDs: [],