This is just Jetbrains formatting and code syntax styling

This commit is contained in:
CWX
2025-02-05 06:56:51 +00:00
parent ce78a2231e
commit f648f42721
382 changed files with 6348 additions and 10422 deletions
+94 -89
View File
@@ -1,103 +1,108 @@
namespace Server
namespace Server;
public static class ProgramStatics
{
public static class ProgramStatics
private static EntryType _entryType;
private static bool _debug;
private static bool _compiled;
private static bool _mods;
private static string? _sptVersion;
private static string? _commit;
private static double? _buildTime;
private static BuildInfo buildInfo; // TODO get from buildinfo.json
public static void Initialize()
{
private static EntryType _entryType;
buildInfo = new BuildInfo();
_entryType = buildInfo.entryType.GetValueOrDefault(EntryType.LOCAL);
private static bool _debug;
private static bool _compiled;
private static bool _mods;
private static string? _sptVersion;
private static string? _commit;
private static double? _buildTime;
private static BuildInfo buildInfo; // TODO get from buildinfo.json
public static void Initialize()
switch (_entryType)
{
buildInfo = new BuildInfo();
ProgramStatics._entryType = buildInfo.entryType.GetValueOrDefault(EntryType.LOCAL);
switch (ProgramStatics._entryType)
{
case EntryType.RELEASE:
_debug = false;
_compiled = true;
_mods = true;
break;
case EntryType.BLEEDING_EDGE:
_debug = true;
_compiled = true;
_mods = false;
break;
case EntryType.DEBUG:
case EntryType.BLEEDING_EDGE_MODS:
_debug = true;
_compiled = true;
_mods = true;
break;
case EntryType.LOCAL:
default: // EntryType.LOCAL
_debug = true;
_compiled = false;
_mods = true;
break;
}
}
// Public Static Getters
public static EntryType ENTRY_TYPE()
{
return _entryType;
}
public static bool DEBUG()
{
return ProgramStatics._debug;
}
public static bool COMPILED()
{
return ProgramStatics._compiled;
}
public static bool MODS()
{
return ProgramStatics._mods;
}
public static string? SPT_VERSION()
{
return ProgramStatics._sptVersion;
}
public static string? COMMIT()
{
return ProgramStatics._commit;
}
public static double? BUILD_TIME()
{
return ProgramStatics._buildTime;
case EntryType.RELEASE:
_debug = false;
_compiled = true;
_mods = true;
break;
case EntryType.BLEEDING_EDGE:
_debug = true;
_compiled = true;
_mods = false;
break;
case EntryType.DEBUG:
case EntryType.BLEEDING_EDGE_MODS:
_debug = true;
_compiled = true;
_mods = true;
break;
case EntryType.LOCAL:
default: // EntryType.LOCAL
_debug = true;
_compiled = false;
_mods = true;
break;
}
}
public enum EntryType
// Public Static Getters
public static EntryType ENTRY_TYPE()
{
LOCAL,
DEBUG,
RELEASE,
BLEEDING_EDGE,
BLEEDING_EDGE_MODS
return _entryType;
}
public class BuildInfo
public static bool DEBUG()
{
public BuildInfo()
{
sptVersion = "";
commit = "";
buildTime = 0;
}
return _debug;
}
public EntryType? entryType { get; set; }
public string? sptVersion { get; set; }
public string? commit { get; set; }
public double? buildTime { get; set; }
public static bool COMPILED()
{
return _compiled;
}
public static bool MODS()
{
return _mods;
}
public static string? SPT_VERSION()
{
return _sptVersion;
}
public static string? COMMIT()
{
return _commit;
}
public static double? BUILD_TIME()
{
return _buildTime;
}
}
public enum EntryType
{
LOCAL,
DEBUG,
RELEASE,
BLEEDING_EDGE,
BLEEDING_EDGE_MODS
}
public class BuildInfo
{
public BuildInfo()
{
sptVersion = "";
commit = "";
buildTime = 0;
}
public EntryType? entryType { get; set; }
public string? sptVersion { get; set; }
public string? commit { get; set; }
public double? buildTime { get; set; }
}