after ages VERBOSE MODE

This commit is contained in:
⍚~Nex
2025-02-06 23:23:26 +01:00
parent 28868d8652
commit a06128472c
5 changed files with 12 additions and 16 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
- [x] Dialogue
- [ ] Finish Base Game port
- [x] Add credits
- [ ] Verbose mode (`--verbose`)
- [x] Verbose mode (`--verbose`)
- [ ] Tooltips
- [ ] Fix bugs
@@ -64,8 +64,8 @@ class CommandLineHandler {
Main.noCwdFix = true;
case "-livereload":
// do nothing
case "-verbose":
// do nothing
case "-v" | "-verbose" | "--verbose":
Main.verbose = true;
default:
Sys.println("Unknown command");
}
+6 -11
View File
@@ -143,25 +143,20 @@ class Logs {
traceColored(text, level);
}
public inline static function getPrefix(prefix:String) {
public inline static function getPrefix(prefix:String)
return logText('[${prefix}] ', BLUE);
}
public inline static function infos(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String) {
public inline static function infos(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String)
Logs.trace(text, INFO, color, prefix);
}
public inline static function verbose(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String) {
Logs.trace(text, VERBOSE, color, prefix);
}
public inline static function verbose(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String)
if (Main.verbose) Logs.trace(text, VERBOSE, color, prefix);
public inline static function warn(text:String, color:ConsoleColor = YELLOW, ?prefix:String) {
public inline static function warn(text:String, color:ConsoleColor = YELLOW, ?prefix:String)
Logs.trace(text, WARNING, color, prefix);
}
public inline static function error(text:String, color:ConsoleColor = RED, ?prefix:String) {
public inline static function error(text:String, color:ConsoleColor = RED, ?prefix:String)
Logs.trace(text, ERROR, color, prefix);
}
}
enum abstract Level(Int) {
+1
View File
@@ -33,6 +33,7 @@ class Main extends Sprite
public static var modToLoad:String = null;
public static var forceGPUOnlyBitmapsOff:Bool = #if windows false #else true #end;
public static var noTerminalColor:Bool = false;
public static var verbose:Bool = false;
public static var scaleMode:FunkinRatioScaleMode;
#if !mobile
@@ -92,7 +92,7 @@ class CreditsCodename extends funkin.options.OptionsScreen {
});
Options.contributors = contributors;
}
Logs.trace('[CreditsCodename] Contributors list Updated!', VERBOSE);
Logs.verbose('[CreditsCodename] Contributors list Updated!');
var errorOnMain:Bool = false;
var idk2 = GitHub.getOrganizationMembers(Flags.REPO_OWNER, function(e) {
@@ -103,7 +103,7 @@ class CreditsCodename extends funkin.options.OptionsScreen {
});
if(!errorOnMain) {
Options.mainDevs = [for(m in idk2) m.id];
Logs.trace('[CreditsCodename] Main Devs list Updated!', VERBOSE);
Logs.verbose('[CreditsCodename] Main Devs list Updated!');
}
return true;