mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
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.
This commit is contained in:
parent
09646484f1
commit
3cdad516c9
@ -37,6 +37,9 @@ function startCLI() {
|
||||
if (answer.toLowerCase() === 'yes') {
|
||||
config.athenaShieldActivated = true
|
||||
|
||||
rl.question('Would you like to activate debug mode? (yes/no): ', (debugAnswer) => {
|
||||
config.debug = debugAnswer.toLowerCase() === 'yes' // Set debug to true or false
|
||||
|
||||
rl.question('Would you like to hide or block the menu? (hide/block): ', (menuAnswer) => {
|
||||
if (menuAnswer.trim().startsWith('//')) {
|
||||
console.log('This is a comment; the line is ignored.')
|
||||
@ -45,10 +48,10 @@ function startCLI() {
|
||||
}
|
||||
|
||||
if (menuAnswer.toLowerCase() === 'hide') {
|
||||
config.menuVisibility = 'hidden' // Change to 'hidden'
|
||||
config.menuVisibility = 'hidden' // Set to 'hidden'
|
||||
console.log('Athena\'s Shield activated. Menu hidden.')
|
||||
} else if (menuAnswer.toLowerCase() === 'block') {
|
||||
config.menuVisibility = 'blocked' // Change to 'blocked'
|
||||
config.menuVisibility = 'blocked' // Set to 'blocked'
|
||||
console.log('Athena\'s Shield activated. Menu blocked.')
|
||||
} else {
|
||||
console.log('Invalid option for the menu.')
|
||||
@ -60,10 +63,12 @@ function startCLI() {
|
||||
saveConfig(config)
|
||||
rl.close()
|
||||
})
|
||||
})
|
||||
} else if (answer.toLowerCase() === 'no') {
|
||||
console.log('Athena\'s Shield not activated. Closing the CLI.')
|
||||
config.athenaShieldActivated = false
|
||||
config.menuVisibility = 'visible' // Reset to default value
|
||||
config.menuVisibility = 'visible' // Reset to default
|
||||
config.debug = 'false'
|
||||
|
||||
// Save the modified configuration
|
||||
saveConfig(config)
|
||||
|
@ -25,6 +25,11 @@ class AthenaShield {
|
||||
get type() {
|
||||
return this.config.menuVisibility
|
||||
}
|
||||
|
||||
// Récupérer le mode debug
|
||||
get debug() {
|
||||
return this.config.debug
|
||||
}
|
||||
}
|
||||
|
||||
// Exporter une instance de la classe
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"athenaShieldActivated": false,
|
||||
"menuVisibility": "visible"
|
||||
"menuVisibility": "visible",
|
||||
"debug": "false"
|
||||
}
|
Loading…
Reference in New Issue
Block a user