mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-23 04:02:14 -08:00
3cdad516c9
Introduced an option to activate debug mode in Athena's Shield. Updated relevant JavaScript files and configuration to handle the debug mode setting. Added a new method for retrieving the debug status within the parserAthShield.js class.
38 lines
906 B
JavaScript
38 lines
906 B
JavaScript
const fs = require('fs')
|
|
const path = require('path')
|
|
|
|
// Chemin vers le fichier de configuration
|
|
const configPath = path.join(__dirname, 'variables.athshield')
|
|
|
|
// Classe pour gérer Athena's Shield
|
|
class AthenaShield {
|
|
constructor() {
|
|
this.config = this.loadConfig()
|
|
}
|
|
|
|
// Charger les variables depuis le fichier
|
|
loadConfig() {
|
|
const rawData = fs.readFileSync(configPath)
|
|
return JSON.parse(rawData.toString())
|
|
}
|
|
|
|
// Récupérer le statut d'Athena's Shield
|
|
get status() {
|
|
return this.config.athenaShieldActivated
|
|
}
|
|
|
|
// Récupérer la visibilité du menu
|
|
get type() {
|
|
return this.config.menuVisibility
|
|
}
|
|
|
|
// Récupérer le mode debug
|
|
get debug() {
|
|
return this.config.debug
|
|
}
|
|
}
|
|
|
|
// Exporter une instance de la classe
|
|
const athenaShieldInstance = new AthenaShield()
|
|
module.exports = athenaShieldInstance
|