HeliosLauncher/app/assets/athshield/parserAthShield.js
Sandro642 3cdad516c9 Add debug mode option to Athena's Shield configuration
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.
2024-10-26 16:26:54 +02:00

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