Skip to content
This repository has been archived by the owner on Oct 24, 2019. It is now read-only.

Commit

Permalink
Initial code push
Browse files Browse the repository at this point in the history
  • Loading branch information
AtiLion committed Jul 12, 2019
1 parent 5069961 commit e11c1c7
Show file tree
Hide file tree
Showing 19 changed files with 1,829 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# Project Specific
lib/

# User-specific files
*.suo
*.user
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,23 @@ If you have any more questions feel free to ask them in the [Issues](https://git
> - Does this mod work in VR? *Yes, the mod is designed to work fully with VR as well as desktop*
> - Avatars are taking longer to load with local colliders. *An avatar with a ton of colliders will take longer to load as it has to register all of them*
> - Sometimes all of the colliders go weird. *If an avatar has a world sized bone collider on it, it may cause things to start and look weird as the collider interacts with all of yours*
## How to compile ##
1. Make sure you have a program that can compile C# code
2. Create a folder called *"lib"*
3. Make sure the lib folder contains the following files:
- Assembly-CSharp.dll
- Assembly-CSharp-firstpass.dll
- Newtonsoft.Json.dll
- UnityEngine.AudioModule.dll
- UnityEngine.CoreModule.dll
- UnityEngine.dll
- UnityEngine.ParticleSystemModule.dll
- UnityEngine.PhysicsModule.dll
- UnityEngine.TextRenderingModule.dll
- UnityEngine.UI.dll
- VRCCore-Standalone.dll
- VRCSDK2.dll
- VRCModLoader.dll
- VRCTools.dll
4. Use your compiler to compile the code
25 changes: 25 additions & 0 deletions VRCExtended.sln
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
72 changes: 72 additions & 0 deletions VRCExtended/AntiCrasherConfig.cs
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"
};
}
}
}
91 changes: 91 additions & 0 deletions VRCExtended/ExtendedLogger.cs
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;
}
}
}
12 changes: 12 additions & 0 deletions VRCExtended/ExtendedServer.cs
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>();
}
}
Loading

0 comments on commit e11c1c7

Please sign in to comment.