Deletes old output renderer and renames AutonomousAI folder to scripts

This commit is contained in:
Torantulino
2023-03-31 22:49:17 +01:00
parent fa5cc20f4a
commit 7f98e8adfe
18 changed files with 8 additions and 146 deletions

27
scripts/config.py Normal file
View File

@@ -0,0 +1,27 @@
class Singleton(type):
"""
Singleton metaclass for ensuring only one instance of a class.
"""
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
return cls._instances[cls]
class Config(metaclass=Singleton):
"""
Configuration class to store the state of bools for different scripts access.
"""
def __init__(self):
self.continuous_mode = False
self.speak_mode = False
def set_continuous_mode(self, value: bool):
self.continuous_mode = value
def set_speak_mode(self, value: bool):
self.speak_mode = value