Made console a setting

This commit is contained in:
Anuken
2022-06-08 10:35:00 -04:00
parent 62c2d9d606
commit 13ac6e0331
10 changed files with 23 additions and 18 deletions
+3 -5
View File
@@ -170,8 +170,6 @@ public class Vars implements Loadable{
public static boolean headless;
/** whether steam is enabled for this game */
public static boolean steam;
/** whether typing into the console is enabled - developers only TODO change */
public static boolean enableConsole = true;
/** whether to clear sector saves when landing */
public static boolean clearSectors = false;
/** whether any light rendering is enabled */
@@ -369,7 +367,7 @@ public class Vars implements Loadable{
result = tags[level.ordinal()] + " " + result;
if(!headless && (ui == null || ui.scriptfrag == null)){
if(!headless && (ui == null || ui.consolefrag == null)){
logBuffer.add(result);
}else if(!headless){
if(!OS.isWindows){
@@ -378,12 +376,12 @@ public class Vars implements Loadable{
}
}
ui.scriptfrag.addMessage(Log.removeColors(result));
ui.consolefrag.addMessage(Log.removeColors(result));
}
}
};
Events.on(ClientLoadEvent.class, e -> logBuffer.each(ui.scriptfrag::addMessage));
Events.on(ClientLoadEvent.class, e -> logBuffer.each(ui.consolefrag::addMessage));
loadedLogger = true;
}