Made console a setting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user