From 3d8c609ee65a7ddca081e8c33d6bd9501009193c Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@mailbox.org> Date: Mon, 20 Feb 2023 00:08:44 +0100 Subject: [PATCH] Remove unused code from pit fights --- src/004-base/basePitFight.js | 46 +------------------ src/facilities/pit/fights/0_lethalRandom.js | 4 -- .../pit/fights/0_nonLethalRandom.js | 16 ------- .../pit/fights/1_lethalBodyguard.js | 4 -- .../pit/fights/1_nonLethalBodyguard.js | 4 -- .../pit/fights/2_lethalScheduledBG.js | 14 ------ 6 files changed, 1 insertion(+), 87 deletions(-) diff --git a/src/004-base/basePitFight.js b/src/004-base/basePitFight.js index a7e805f306c..38962ec438c 100644 --- a/src/004-base/basePitFight.js +++ b/src/004-base/basePitFight.js @@ -9,13 +9,6 @@ App.Facilities.Pit.Fights.BaseFight = class BaseFight { this.params = {}; } - /** Get a short description to show in the fight activation UI - * @returns {string} - */ - get uiDescription() { - return "base fight"; - } - /** A unique key, so we can queue the fight. * @returns {string} */ @@ -48,40 +41,7 @@ App.Facilities.Pit.Fights.BaseFight = class BaseFight { return 1; } - /** - * If the fight can be queued from the pit screen - * @returns {boolean} - */ - get selectable() { - return true; - } - - /** - * @typedef {object} fightOption - * @property {string} name - * @property {string} value - */ - - /** - * @typedef {object} fightOptions - * @property {string} name - * @property {string} key - * @property {Array<fightOption>} values - * @property {*} default - */ - - /** - * Options for the fight. For every option there is an array with valid values and a name and key for each one. - * The selection for the options are supplied to {@link App.Facilities.Pit.Fights.BaseFight#param the param member} - * as an object as key/value pairs before calling {@link App.Facilities.Pit.Fights.BaseFight#execute execute}. - * A value must be passed for every option - * @returns {Array<fightOptions>} - */ - get options() { - return []; - } - - /** Get a short description to show when selecting the fight during the event + /** Get a short description to show when selecting the fight during the event. * Assumes fight can be run and actors have been cast already * @returns {DocumentFragment} */ @@ -191,10 +151,6 @@ App.Facilities.Pit.Fights.BaseFight = class BaseFight { /** This is a trivial fight for use as an example. */ App.Facilities.Pit.Fights.TestFight = class extends App.Facilities.Pit.Fights.BaseFight { - get uiDescription() { - return "test fight"; - } - get key() { return "test"; } diff --git a/src/facilities/pit/fights/0_lethalRandom.js b/src/facilities/pit/fights/0_lethalRandom.js index 39cc2acb73f..43ee468940a 100644 --- a/src/facilities/pit/fights/0_lethalRandom.js +++ b/src/facilities/pit/fights/0_lethalRandom.js @@ -1,9 +1,5 @@ /** Lethal 1v1 between random slaves. */ App.Facilities.Pit.Fights.LR1v1 = class extends App.Facilities.Pit.Fights.BaseFight { - get uiDescription() { - return "1-vs-1 between two random slaves"; - } - fightDescription() { const f = new DocumentFragment(); f.append("1-vs-1 fight between ", App.UI.DOM.slaveDescriptionDialog(getSlave(this.actors[0])), ` and `, diff --git a/src/facilities/pit/fights/0_nonLethalRandom.js b/src/facilities/pit/fights/0_nonLethalRandom.js index 0fbac628e6b..230261672ef 100644 --- a/src/facilities/pit/fights/0_nonLethalRandom.js +++ b/src/facilities/pit/fights/0_nonLethalRandom.js @@ -1,21 +1,5 @@ /** Nonlethal 1v1 between random slaves. */ App.Facilities.Pit.Fights.NlR1v1 = class extends App.Facilities.Pit.Fights.BaseFight { - get uiDescription() { - return "1-vs-1 between two random slaves"; - } - - get options() { - return [{ - name: "Respect virginities", - key: "virginities", - values: [ - {name: "None", value: "none"}, {name: "Vaginal", value: "vaginal"}, - {name: "Anal", value: "anal"}, {name: "All", value: "all"} - ], - default: "all" - }]; - } - get key() { return "nl r 1v1"; } diff --git a/src/facilities/pit/fights/1_lethalBodyguard.js b/src/facilities/pit/fights/1_lethalBodyguard.js index 91a4bfcbc2f..1c6f7ec9ef4 100644 --- a/src/facilities/pit/fights/1_lethalBodyguard.js +++ b/src/facilities/pit/fights/1_lethalBodyguard.js @@ -1,9 +1,5 @@ /** Lethal 1v1 between the BG and a random slave. */ App.Facilities.Pit.Fights.LBg1v1 = class extends App.Facilities.Pit.Fights.LR1v1 { - get uiDescription() { - return "1-vs-1 between your bodyguard and a random slave"; - } - fightDescription() { const f = new DocumentFragment(); f.append("1-vs-1 fight between your bodyguard ", App.UI.DOM.slaveDescriptionDialog(getSlave(this.actors[0])), ` and `, diff --git a/src/facilities/pit/fights/1_nonLethalBodyguard.js b/src/facilities/pit/fights/1_nonLethalBodyguard.js index aa66c9bb98d..27799333857 100644 --- a/src/facilities/pit/fights/1_nonLethalBodyguard.js +++ b/src/facilities/pit/fights/1_nonLethalBodyguard.js @@ -1,9 +1,5 @@ /** Nonlethal 1v1 between the BG and a random slave. */ App.Facilities.Pit.Fights.NlBg1v1 = class extends App.Facilities.Pit.Fights.NlR1v1 { - get uiDescription() { - return "1-vs-1 between your bodyguard and a random slave"; - } - fightDescription() { const f = new DocumentFragment(); f.append("1-vs-1 fight between your bodyguard ", App.UI.DOM.slaveDescriptionDialog(getSlave(this.actors[0])), ` and `, diff --git a/src/facilities/pit/fights/2_lethalScheduledBG.js b/src/facilities/pit/fights/2_lethalScheduledBG.js index 195f75a4866..9c9ffc8f7b7 100644 --- a/src/facilities/pit/fights/2_lethalScheduledBG.js +++ b/src/facilities/pit/fights/2_lethalScheduledBG.js @@ -1,23 +1,9 @@ /** Lethal 1v1 between the BG and a random slave. */ App.Facilities.Pit.Fights.LSchBg1v1 = class extends App.Facilities.Pit.Fights.LBg1v1 { - get uiDescription() { - return "Scheduled 1-vs-1 between your bodyguard and a set slave"; - } - get key() { return "l sch bg 1v1"; } - get selectable() { - return false; - } - - get options() { - return [{ - name: "Slave", key: "slaveID", default: null, values: [] - }]; - } - fightPrerequisites() { return [() => !!getSlave(this.params.slaveID), ...super.fightPrerequisites()]; } -- GitLab