fixes
This commit is contained in:
parent
287e48053d
commit
c2db84d6d1
|
|
@ -23,7 +23,6 @@ namespace Novetus.ClientScriptTester
|
|||
OutputBox.AppendText(str + LocalVars.DoubleSpacedNewLine);
|
||||
}
|
||||
|
||||
OutputBox.Text.TrimEnd();
|
||||
OutputBox.SelectionStart = 0;
|
||||
OutputBox.ScrollToCaret();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -469,22 +469,21 @@ public class GlobalFuncs
|
|||
}
|
||||
}
|
||||
|
||||
public static bool CopyMapToRBXAsset()
|
||||
public static void FixedFileCopy(string src, string dest, bool overwrite)
|
||||
{
|
||||
if (File.Exists(dest))
|
||||
{
|
||||
File.SetAttributes(dest, FileAttributes.Normal);
|
||||
}
|
||||
|
||||
File.Copy(src, dest, overwrite);
|
||||
}
|
||||
|
||||
public static string CopyMapToRBXAsset()
|
||||
{
|
||||
bool success;
|
||||
string clientcontentpath = GlobalPaths.ClientDir + @"\\" + GlobalVars.UserConfiguration.SelectedClient + @"\\content\\temp.rbxl";
|
||||
|
||||
try
|
||||
{
|
||||
File.Copy(GlobalVars.UserConfiguration.MapPath, clientcontentpath, true);
|
||||
success = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
|
||||
return success;
|
||||
FixedFileCopy(GlobalVars.UserConfiguration.MapPath, clientcontentpath, true);
|
||||
return GlobalPaths.AltBaseGameDir + "temp.rbxl";
|
||||
}
|
||||
|
||||
public static void LoadClientValues(string clientpath)
|
||||
|
|
@ -541,7 +540,7 @@ public class GlobalFuncs
|
|||
|
||||
if (!File.Exists(fullpath))
|
||||
{
|
||||
File.Copy(GlobalPaths.ConfigDir + "\\ReShade_default.ini", fullpath, true);
|
||||
File.Copy(GlobalPaths.ConfigDir + "\\ReShade_default.ini", fullpath);
|
||||
ReShadeValues(fullpath, write, true);
|
||||
}
|
||||
else
|
||||
|
|
@ -555,28 +554,32 @@ public class GlobalFuncs
|
|||
foreach (DirectoryInfo dir in Dirs)
|
||||
{
|
||||
string fulldirpath = dir.FullName + @"\" + cfgname;
|
||||
|
||||
if (!File.Exists(fulldirpath))
|
||||
{
|
||||
File.Copy(fullpath, fulldirpath, true);
|
||||
ReShadeValues(fulldirpath, write, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ReShadeValues(fulldirpath, write, false);
|
||||
}
|
||||
|
||||
string fulldllpath = dir.FullName + @"\opengl32.dll";
|
||||
|
||||
if (GlobalVars.UserConfiguration.ReShade)
|
||||
{
|
||||
if (!File.Exists(fulldirpath))
|
||||
{
|
||||
File.Copy(fullpath, fulldirpath);
|
||||
ReShadeValues(fulldirpath, write, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ReShadeValues(fulldirpath, write, false);
|
||||
}
|
||||
|
||||
if (!File.Exists(fulldllpath))
|
||||
{
|
||||
File.Copy(GlobalPaths.ConfigDirData + "\\opengl32.dll", fulldllpath, true);
|
||||
File.Copy(GlobalPaths.ConfigDirData + "\\opengl32.dll", fulldllpath);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(fulldirpath))
|
||||
{
|
||||
File.Delete(fulldirpath);
|
||||
}
|
||||
|
||||
if (File.Exists(fulldllpath))
|
||||
{
|
||||
File.Delete(fulldllpath);
|
||||
|
|
|
|||
|
|
@ -341,8 +341,8 @@ public class ScriptFuncs
|
|||
.Replace("%hat3ws%", GlobalPaths.WebServer_HatDir + GlobalVars.UserCustomization.Hat3)
|
||||
.Replace("%extraws%", GlobalPaths.WebServer_ExtraDir + GlobalVars.UserCustomization.Extra)
|
||||
.Replace("%hat4ws%", GlobalPaths.WebServer_HatDir + GlobalVars.UserCustomization.Extra)
|
||||
.Replace("%mapfiled%", GlobalPaths.BaseGameDir + GlobalVars.UserConfiguration.MapPathSnip.Replace(@"\\", @"\"))
|
||||
.Replace("%mapfilec%", GlobalFuncs.CopyMapToRBXAsset() ? GlobalPaths.AltBaseGameDir + "temp.rbxl" : "")
|
||||
.Replace("%mapfiled%", GlobalPaths.BaseGameDir + GlobalVars.UserConfiguration.MapPathSnip.Replace(@"\\", @"\").Replace(@"/", @"\"))
|
||||
.Replace("%mapfilec%", GlobalFuncs.CopyMapToRBXAsset())
|
||||
.Replace("%tripcode%", GlobalVars.UserConfiguration.PlayerTripcode)
|
||||
.Replace("%scripttype%", Generator.GetNameForType(type))
|
||||
.Replace("%addonscriptpath%", GlobalPaths.AddonScriptPath);
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ del /s /q Novetus\clients\ClientScriptTester\ReShade.ini
|
|||
del /s /q Novetus\clients\ClientScriptTester\OPENGL32.log
|
||||
del /s /q Novetus\clients\ClientScriptTester\opengl32.dll
|
||||
del /s /q Novetus\clients\ClientScriptTester\DefaultPreset.ini
|
||||
del /s /q Novetus\clients\ClientScriptTester\content\temp.rbxl
|
||||
|
||||
del /s /q Novetus\config\servers.txt
|
||||
del /s /q Novetus\config\ports.txt
|
||||
|
|
|
|||
Loading…
Reference in New Issue