Update ScriptFuncs.cs
This commit is contained in:
parent
43c3995361
commit
bfeace05ed
|
|
@ -39,7 +39,7 @@ public class ScriptFuncs
|
||||||
{
|
{
|
||||||
rbxexe = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\RobloxApp.exe";
|
rbxexe = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\RobloxApp.exe";
|
||||||
}
|
}
|
||||||
if (info.SeperateFolders)
|
else if (info.SeperateFolders)
|
||||||
{
|
{
|
||||||
rbxexe = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\client\\RobloxApp_client.exe";
|
rbxexe = GlobalPaths.ClientDir + @"\\" + ClientName + @"\\client\\RobloxApp_client.exe";
|
||||||
}
|
}
|
||||||
|
|
@ -77,7 +77,8 @@ public class ScriptFuncs
|
||||||
+ GlobalVars.UserConfiguration.ServerBrowserServerName + "','"
|
+ GlobalVars.UserConfiguration.ServerBrowserServerName + "','"
|
||||||
+ GlobalVars.UserConfiguration.ServerBrowserServerAddress + "','"
|
+ GlobalVars.UserConfiguration.ServerBrowserServerAddress + "','"
|
||||||
+ (!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : GlobalVars.ExternalIP) + "','"
|
+ (!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : GlobalVars.ExternalIP) + "','"
|
||||||
+ GlobalVars.UserConfiguration.SelectedClient + "');";
|
+ GlobalVars.UserConfiguration.SelectedClient + "','"
|
||||||
|
+ GlobalVars.ProgramInformation.Version + "');";
|
||||||
case ScriptType.Solo:
|
case ScriptType.Solo:
|
||||||
case ScriptType.EasterEgg:
|
case ScriptType.EasterEgg:
|
||||||
return "_G.CSSolo("
|
return "_G.CSSolo("
|
||||||
|
|
@ -207,41 +208,9 @@ public class ScriptFuncs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetRawArgsForType(ScriptType type, string md5s, string luafile)
|
public static string GetRawArgsForType(ScriptType type, string ClientName, string luafile)
|
||||||
{
|
{
|
||||||
switch (type)
|
return "dofile('" + luafile + "'); " + Generator.GetScriptFuncForType(ClientName, type);
|
||||||
{
|
|
||||||
case ScriptType.Client:
|
|
||||||
return "dofile('" + luafile + "'); _G.CSConnect("
|
|
||||||
+ (GlobalVars.SelectedClientInfo.UsesID ? GlobalVars.UserConfiguration.UserID : 0) + ",'"
|
|
||||||
+ GlobalVars.IP + "',"
|
|
||||||
+ GlobalVars.JoinPort + ",'"
|
|
||||||
+ (GlobalVars.SelectedClientInfo.UsesPlayerName ? GlobalVars.UserConfiguration.PlayerName : "Player") + "',"
|
|
||||||
+ GlobalVars.Loadout + ","
|
|
||||||
+ md5s + ",'"
|
|
||||||
+ GlobalVars.UserConfiguration.PlayerTripcode + "');";
|
|
||||||
case ScriptType.Server:
|
|
||||||
return "dofile('" + luafile + "'); _G.CSServer("
|
|
||||||
+ GlobalVars.UserConfiguration.RobloxPort + ","
|
|
||||||
+ GlobalVars.UserConfiguration.PlayerLimit + ","
|
|
||||||
+ md5s + ","
|
|
||||||
+ GlobalVars.UserConfiguration.ShowServerNotifications.ToString().ToLower() + ",'"
|
|
||||||
+ GlobalVars.UserConfiguration.ServerBrowserServerName + "','"
|
|
||||||
+ GlobalVars.UserConfiguration.ServerBrowserServerAddress + "','"
|
|
||||||
+ (!string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : GlobalVars.ExternalIP) + "','"
|
|
||||||
+ GlobalVars.UserConfiguration.SelectedClient + "'); "
|
|
||||||
+ (!string.IsNullOrWhiteSpace(GlobalPaths.AddonScriptPath) ? " dofile('" + GlobalPaths.AddonScriptPath + "');" : "");
|
|
||||||
case ScriptType.Solo:
|
|
||||||
case ScriptType.EasterEgg:
|
|
||||||
return "dofile('" + luafile + "'); _G.CSSolo("
|
|
||||||
+ (GlobalVars.SelectedClientInfo.UsesID ? GlobalVars.UserConfiguration.UserID : 0) + ",'"
|
|
||||||
+ (GlobalVars.SelectedClientInfo.UsesPlayerName ? GlobalVars.UserConfiguration.PlayerName : "Player") + "',"
|
|
||||||
+ GlobalVars.soloLoadout + ");";
|
|
||||||
case ScriptType.Studio:
|
|
||||||
return "dofile('" + luafile + "'); _G.CSStudio();";
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int ConvertIconStringToInt()
|
public static int ConvertIconStringToInt()
|
||||||
|
|
@ -390,7 +359,7 @@ public class ScriptFuncs
|
||||||
.Replace("%hat4%", GlobalVars.UserCustomization.Extra)
|
.Replace("%hat4%", GlobalVars.UserCustomization.Extra)
|
||||||
.Replace("%extrad%", GlobalPaths.extraGameDir + GlobalVars.UserCustomization.Extra)
|
.Replace("%extrad%", GlobalPaths.extraGameDir + GlobalVars.UserCustomization.Extra)
|
||||||
.Replace("%hat4d%", GlobalPaths.hatGameDir + GlobalVars.UserCustomization.Extra)
|
.Replace("%hat4d%", GlobalPaths.hatGameDir + GlobalVars.UserCustomization.Extra)
|
||||||
.Replace("%args%", GetRawArgsForType(type, md5sd, luafile))
|
.Replace("%args%", GetRawArgsForType(type, ClientName, luafile))
|
||||||
.Replace("%mapfiled%", GlobalPaths.BaseGameDir + GlobalVars.UserConfiguration.MapPathSnip.Replace(@"\\", @"\").Replace(@"/", @"\"))
|
.Replace("%mapfiled%", GlobalPaths.BaseGameDir + GlobalVars.UserConfiguration.MapPathSnip.Replace(@"\\", @"\").Replace(@"/", @"\"))
|
||||||
.Replace("%mapfilec%", extractedCode.Contains("%mapfilec%") ? GlobalFuncs.CopyMapToRBXAsset() : "")
|
.Replace("%mapfilec%", extractedCode.Contains("%mapfilec%") ? GlobalFuncs.CopyMapToRBXAsset() : "")
|
||||||
.Replace("%tripcode%", GlobalVars.UserConfiguration.PlayerTripcode)
|
.Replace("%tripcode%", GlobalVars.UserConfiguration.PlayerTripcode)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue