BIG FORMATING COMMIT

This commit is contained in:
2023-07-30 15:55:22 +02:00
parent 088fce0aaa
commit 91972107eb
103 changed files with 1610 additions and 1585 deletions

View File

@@ -6,51 +6,53 @@ import lib.KVStore;
import cc.Settings;
class KernelSettings {
private static inline function setAllowStartup(value: Bool) {
Settings.set("shell.allow_startup", value);
}
private static inline function setAllowStartup(value:Bool) {
Settings.set("shell.allow_startup", value);
}
private static inline function setAllowStartupFromFloppy(value: Bool) {
Settings.set("shell.allow_disk_startup", value);
}
private static inline function setAllowStartupFromFloppy(value:Bool) {
Settings.set("shell.allow_disk_startup", value);
}
private static function set(name: String, value: Dynamic) {
var kvstore = new KVStore("kernel");
kvstore.set(name, value);
kvstore.save();
}
private static function set(name:String, value:Dynamic) {
var kvstore = new KVStore("kernel");
kvstore.set(name, value);
kvstore.save();
}
private static function get(name: String): Null<Dynamic> {
var kvstore = new KVStore("kernel");
return kvstore.get(name);
}
private static function get(name:String):Null<Dynamic> {
var kvstore = new KVStore("kernel");
return kvstore.get(name);
}
public static var hostname(get,set): String;
private static var _hostname:String = get("hostname");
private static inline function get_hostname():String {
public static var hostname(get, set):String;
private static var _hostname:String = get("hostname");
private static inline function get_hostname():String {
return _hostname;
}
private static inline function set_hostname(value:String):String {
OS.setComputerLabel(value);
set("hostname", value);
_hostname = value;
return value;
private static inline function set_hostname(value:String):String {
OS.setComputerLabel(value);
set("hostname", value);
_hostname = value;
return value;
}
public static var siteController(get,set): NetworkID;
private static var _siteController:NetworkID = get("siteController");
public static var siteController(get, set):NetworkID;
private static var _siteController:NetworkID = get("siteController");
private static function get_siteController():NetworkID {
return _siteController;
}
private static function set_siteController(value:NetworkID):NetworkID {
if (value == null) {
return get_siteController();
}
if (value == null) {
return get_siteController();
}
set("siteController", value);
_siteController = value;
return value;
set("siteController", value);
_siteController = value;
return value;
}
}