extends Node var testmode: bool = true var errortest: bool = true var logmode: int = 4 const IP_ADDRESS: String = "127.0.0.1" const PORT: int = 25262 const MAX_CLIENTS: int = 1024 func _ready() -> void: var args: PackedStringArray = OS.get_cmdline_args() var skip: bool = false for i: int in range(args.size()): if !skip: Log.info("Argument %s passed." % args[i]) match args[i]: "--testmode": testmode = true "--errortest": errortest = true "--logmode": logmode = int(args[i+1]) skip = true _: Log.warning("Unknown argument: %s!" % args[i]) run_tests() func run_tests() -> void: if testmode: Log.info("Starting singleton tests.") Networking.test() Log.test() if errortest: Log.error("Test", "Test")