config file changes

This commit is contained in:
Bitl 2022-03-06 11:52:34 -07:00
parent d0a6a0ac19
commit 503d34c289
7 changed files with 61 additions and 27 deletions

View File

@ -69,13 +69,16 @@ public class INIFile
{
try
{
string[] lines = File.ReadAllLines(path);
foreach(string line in lines)
if (File.Exists(path))
{
if (line.Contains(SearchString))
string[] lines = File.ReadAllLines(path);
foreach (string line in lines)
{
return true;
if (line.Contains(SearchString))
{
return true;
}
}
}

View File

@ -208,6 +208,15 @@ public class GlobalFuncs
public static void Config(string cfgpath, bool write, bool doubleCheck = false)
{
bool forcewrite = false;
if(!File.Exists(cfgpath))
{
// force write mode on if the file doesn't exist.
write = true;
forcewrite = true;
}
if (write)
{
//WRITE
@ -240,6 +249,12 @@ public class GlobalFuncs
ini.IniWriteValue(section, "NewGUI", GlobalVars.UserConfiguration.NewGUI.ToString());
ConfigUseOldValIfExists(ini, section, "ItemMakerDisableHelpMessage", "AssetSDKDisableHelpMessage", GlobalVars.UserConfiguration.DisabledAssetSDKHelp.ToString(), write);
ConfigUseOldValIfExists(ini, section, "AssetLocalizerSaveBackups", "AssetSDKFixerSaveBackups", GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups.ToString(), write);
if (forcewrite)
{
// try again....
Config(cfgpath, false, doubleCheck);
}
}
else
{
@ -353,22 +368,25 @@ public class GlobalFuncs
}
}
string curval = GenerateAndReturnTripcode();
if (!GlobalVars.PlayerTripcode.Equals(curval))
if (!forcewrite)
{
GlobalVars.PlayerTripcode = curval;
}
string curval = GenerateAndReturnTripcode();
if (!GlobalVars.PlayerTripcode.Equals(curval))
{
GlobalVars.PlayerTripcode = curval;
}
if (!File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization))
{
Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, true);
}
else
{
Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, write);
}
if (!File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization))
{
Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, true);
}
else
{
Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, write);
}
ReShade(GlobalPaths.ConfigDir, "ReShade.ini", write);
ReShade(GlobalPaths.ConfigDir, "ReShade.ini", write);
}
}
public static bool ResetMapIfNecessary()

View File

@ -1,11 +1,18 @@
1.3 v?.2022.1
Changes from 1.3 v2.2022.1:
1.3 Snapshot v22.8100.20815
Enhancements:
- Added the ability to sign scripts.
- There are 2 ways to sign scripts, use the new ClientScript variables for generated join scripts, or use the File -> Sign Script Manually (For Modern Clients) option.
- New ClientScript variables:
- %signgeneratedjoinscript% - Signs the generated join script if "Generate scripts and fix map loading for 2007/2012+" is enabled.
- %usenewsignformat% - for %signgeneratedjoinscript%, uses the new client signature format found on newer clients.
- The generated key files are stored in the same path as the script file, so using the same key is viable.
- New ClientScript variables:
- %signgeneratedjoinscript% - Signs the generated join script if "Generate scripts and fix map loading for 2007/2012+" is enabled.
- %usenewsignformat% - for %signgeneratedjoinscript%, uses the new client signature format found on newer clients.
- %useloadfile% - Uses the "loadfile" function instead of "dofile" for generated join scripts if "Generate scripts and fix map loading for 2007/2012+" is enabled.
- %userbxassetforgeneration% - When "Generate scripts and fix map loading for 2007/2012+" is enabled, use "rbxasset" as the main path we should get the file from.
- Added better Bootstrapper error handling.
- Made config saving more reliable on initial startup.
----------------------------------------------------------------------------
1.3 v2.2022.1
@ -160,6 +167,8 @@ Lite version changes:
- Removed .NET Framework 2.0 dependency.
- Removed the soundtrack.
----------------------------------------------------------------------------
Post 1.3
----------------------------------------------------------------------------
1.3 v11.2021.1
Changes from Pre-Release 5:
- The server hosting panel is closed by default in the Stylish view. You must now click "Server" if you want to edit hosting settings and launch a server.

View File

@ -28,6 +28,8 @@ General:
%newgui% - Returns if the 2011L interface is enabled on 2011M clients. Can be used as a toggle switch for other client-side CoreScript features.
%signgeneratedjoinscript% - Signs the generated join script if "Generate scripts and fix map loading for 2007/2012+" is enabled.
%usenewsignformat% - for %signgeneratedjoinscript%, uses the new client signature format found on newer clients.
%useloadfile% - Uses the "loadfile" function instead of "dofile" for generated join scripts if "Generate scripts and fix map loading for 2007/2012+" is enabled.
%userbxassetforgeneration% - When "Generate scripts and fix map loading for 2007/2012+" is enabled, use "rbxasset" as the main path we should get the file from.
Server:
%limit% - Max Player limit.

View File

@ -41,7 +41,7 @@ ECHO 2 - Microsoft .NET Framework 4.0 (REQUIRED for the Novetus Launcher)
ECHO 3 - .NET 4.0 Update (KB2468871, REQUIRED for Windows XP and Vista)
ECHO 4 - Microsoft Visual C++ Redistributables 2005 (32-bit, REQUIRED for 2007)
ECHO 5 - Microsoft Visual C++ Redistributables 2008 (32-bit, REQUIRED for 2008 and above)
ECHO 6 - Media Feature Pack for Windows N Editions (REQUIRED for 2011+)
ECHO 6 - Media Feature Pack for Windows 8/8.1/10/11 N Editions (REQUIRED for 2011+)
ECHO 7 - Exit
ECHO.
SET /P M=Choose an option by typing the number corresponding to which depenency you want to install:

View File

@ -5,8 +5,9 @@ DefaultMap=Dev - Baseplate2048.rbxl
UserAgentRegisterClient1=2007M
UserAgentRegisterClient2=2010L
ExtendedVersionNumber=True
ExtendedVersionEditChangelog=False
ExtendedVersionTemplate=%version% v?.2022.%extended-revision%%lite%
ExtendedVersionEditChangelog=True
//ExtendedVersionTemplate=%version% v?.2022.%extended-revision%%lite%
ExtendedVersionTemplate=%version% Snapshot v22.%build%.%revision%
ExtendedVersionRevision=1
IsLite=False
InitialBootup=False

View File

@ -204,4 +204,5 @@ Látom.
[normal]Tell me how it felt when you walked on water.|Did you get your wish?
[stylish]Tell me how it felt when you walked on water. Did you get your wish?
[normal]GET TO THE SHIPS! IT'S OUR ONLY CHANCE!|From the 1986 Transformers movie.
Standing here, I realize...
Standing here, I realize...
good grief!