This repository has been archived by the owner on Oct 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,829 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.29009.5 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VRCExtended", "VRCExtended\VRCExtended.csproj", "{7DF0802E-DB23-417B-A5CD-949B0471D3C4}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7DF0802E-DB23-417B-A5CD-949B0471D3C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7DF0802E-DB23-417B-A5CD-949B0471D3C4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7DF0802E-DB23-417B-A5CD-949B0471D3C4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7DF0802E-DB23-417B-A5CD-949B0471D3C4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {E8021B1F-1141-4C18-99AC-C52B4A136F9F} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace VRCExtended | ||
{ | ||
internal class AntiCrasherConfig | ||
{ | ||
#region AntiCrasherConfig Properties | ||
public static AntiCrasherConfig Instance { get; private set; } | ||
#endregion | ||
|
||
#region Polygon Crasher | ||
public bool PolyLimit { get; set; } | ||
public int MaxPolygons { get; set; } | ||
#endregion | ||
|
||
#region Particle Crasher | ||
public bool ParticleLimit { get; set; } | ||
public bool DetectPotentialCrasher { get; set; } | ||
public int MaxParticles { get; set; } | ||
#endregion | ||
|
||
#region Shader Crasher | ||
public bool ShaderBlacklist { get; set; } | ||
public bool UseOnlineBlacklist { get; set; } | ||
public string[] BlacklistedShaders { get; set; } | ||
#endregion | ||
|
||
public AntiCrasherConfig() => | ||
Instance = this; | ||
|
||
public static void CreateDefault() | ||
{ | ||
AntiCrasherConfig acc = new AntiCrasherConfig(); | ||
|
||
acc.PolyLimit = true; | ||
acc.MaxPolygons = 150000; | ||
|
||
acc.ParticleLimit = true; | ||
acc.DetectPotentialCrasher = false; | ||
acc.MaxParticles = 200; | ||
|
||
acc.ShaderBlacklist = true; | ||
acc.UseOnlineBlacklist = false; | ||
acc.BlacklistedShaders = new string[] | ||
{ | ||
"pretty", | ||
"bluescreen", | ||
"tesselation", | ||
"tesselated", | ||
"crasher", | ||
"instant crash paralyzer", | ||
"worldkill", | ||
"tessellation", | ||
"tessellated", | ||
"oofer", | ||
"starnest", | ||
"xxx", | ||
"dbtc", | ||
"kyuzu", | ||
"distancebased", | ||
"waifuserp", | ||
"loops", | ||
"izzy", | ||
"star", | ||
"diebitch" | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
using VRCModLogger = VRCModLoader.VRCModLogger; | ||
|
||
namespace VRCExtended | ||
{ | ||
internal static class ExtendedLogger | ||
{ | ||
public static void Log(string text) | ||
{ | ||
ConsoleColor oldColor = Console.ForegroundColor; | ||
if (oldColor == ConsoleColor.Black) | ||
oldColor = ConsoleColor.Gray; | ||
|
||
if (Console.CursorLeft > 1) | ||
Console.WriteLine(); | ||
Console.ForegroundColor = ConsoleColor.Green; | ||
VRCModLogger.Log("[VRCExtended] " + text); | ||
Console.ForegroundColor = oldColor; | ||
} | ||
public static void Log(object obj) | ||
{ | ||
ConsoleColor oldColor = Console.ForegroundColor; | ||
if (oldColor == ConsoleColor.Black) | ||
oldColor = ConsoleColor.Gray; | ||
|
||
if (Console.CursorLeft > 1) | ||
Console.WriteLine(); | ||
Console.ForegroundColor = ConsoleColor.Green; | ||
VRCModLogger.Log("[VRCExtended] " + obj.ToString()); | ||
Console.ForegroundColor = oldColor; | ||
} | ||
|
||
public static void LogWarning(string text) | ||
{ | ||
ConsoleColor oldColor = Console.ForegroundColor; | ||
if (oldColor == ConsoleColor.Black) | ||
oldColor = ConsoleColor.Gray; | ||
|
||
if (Console.CursorLeft > 1) | ||
Console.WriteLine(); | ||
Console.ForegroundColor = ConsoleColor.Yellow; | ||
VRCModLogger.Log("[VRCExtended] " + text); | ||
Console.ForegroundColor = oldColor; | ||
} | ||
public static void LogWarning(object obj) | ||
{ | ||
ConsoleColor oldColor = Console.ForegroundColor; | ||
if (oldColor == ConsoleColor.Black) | ||
oldColor = ConsoleColor.Gray; | ||
|
||
if (Console.CursorLeft > 1) | ||
Console.WriteLine(); | ||
Console.ForegroundColor = ConsoleColor.Yellow; | ||
VRCModLogger.Log("[VRCExtended] " + obj.ToString()); | ||
Console.ForegroundColor = oldColor; | ||
} | ||
|
||
public static void LogError(string text, Exception exception = null) | ||
{ | ||
ConsoleColor oldColor = Console.ForegroundColor; | ||
if (oldColor == ConsoleColor.Black) | ||
oldColor = ConsoleColor.Gray; | ||
|
||
if (Console.CursorLeft > 1) | ||
Console.WriteLine(); | ||
Console.ForegroundColor = ConsoleColor.Red; | ||
VRCModLogger.LogError("[VRCExtended] " + text); | ||
if (exception != null) | ||
VRCModLogger.LogError(exception.ToString()); | ||
Console.ForegroundColor = oldColor; | ||
} | ||
public static void LogError(object obj, Exception exception = null) | ||
{ | ||
ConsoleColor oldColor = Console.ForegroundColor; | ||
if (oldColor == ConsoleColor.Black) | ||
oldColor = ConsoleColor.Gray; | ||
|
||
if (Console.CursorLeft > 1) | ||
Console.WriteLine(); | ||
Console.ForegroundColor = ConsoleColor.Red; | ||
VRCModLogger.LogError("[VRCExtended] " + obj.ToString()); | ||
if (exception != null) | ||
VRCModLogger.LogError(exception.ToString()); | ||
Console.ForegroundColor = oldColor; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace VRCExtended | ||
{ | ||
internal static class ExtendedServer | ||
{ | ||
public static List<ExtendedUser> Users = new List<ExtendedUser>(); | ||
} | ||
} |
Oops, something went wrong.