diff --git a/OwO.cs b/OwO.cs new file mode 100644 index 0000000..1287aae --- /dev/null +++ b/OwO.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Net; +using UnityEngine; +using UnityEngine.UI; +using VRLoader.Attributes; +using VRLoader.Modules; + +namespace Ruby.Main +{ + [ModuleInfo("OwO Module", "vCutie-1.0", "DubyaDude Senpai and Native-kun <3")] + + public class OwO : VRModule + { + public static bool isOwOifyOn = true; + + public void Update() + { + if (isOwOifyOn) + { + Text[] texts = MonoBehaviour.FindObjectsOfType(); + + foreach (Text text in texts) + { + string textString = text.text; + + //Filters out the text that has already been converted as well as those with special colors + //(changes color to cowow) + if (!textString.Contains("⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧") && !textString.Contains("color=")) + { + textString = Owoify(textString); + + //⛧ is an invisible character in VRChat, therefore I used this as a 'tag' + //to see if something was already converted or not. + text.text = textString + "⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧⛧"; + } + } + } + } + + //The actual OwO-ify filter provided by Native + public static System.Random randomizer = new System.Random(); + public static string Owoify(string text) + { + string[] owoFaces = { "OwO", "Owo", "owO", "ÓwÓ", "ÕwÕ", "@w@", "ØwØ", "øwø", "uwu", "UwU", "☆w☆", "✧w✧", "♥w♥", "゜w゜", "◕w◕", "ᅌwᅌ", "◔w◔", "ʘwʘ", "⓪w⓪", " ︠ʘw ︠ʘ", "(owo)" }; + string[] owoStrings = { "OwO *what's this*", "OwO *notices bulge*", "uwu yu so warm~", "owo pounces on you~~" }; + + string owoified = text; + owoified = owoified.Replace('r', 'w'); + owoified = owoified.Replace('l', 'w'); + owoified = owoified.Replace('R', 'W'); + owoified = owoified.Replace('L', 'W'); + + switch (randomizer.Next(0, 1)) + { + case 0: + owoified = owoified.Replace("n", "ny"); + break; + case 1: + owoified = owoified.Replace("n", "nya"); + break; + } + switch (randomizer.Next(0, 1)) + { + case 0: + owoified = owoified.Replace("!", "!"); + break; + case 1: + owoified = owoified.Replace("!", $" {owoFaces[randomizer.Next(0, owoFaces.Length)]}"); + break; + } + switch (randomizer.Next(0, 1)) + { + case 0: + owoified = owoified.Replace("?", "?!"); + break; + case 1: + owoified = owoified.Replace("?", $" {owoFaces[randomizer.Next(0, owoFaces.Length)]}"); + break; + } + switch (randomizer.Next(0, 9)) + { + case 7: + owoified = owoified += $" {owoStrings[randomizer.Next(0, owoStrings.Length)]}"; + break; + } + + return owoified; + } + } +} + diff --git a/OwO.csproj b/OwO.csproj new file mode 100644 index 0000000..377d3f6 --- /dev/null +++ b/OwO.csproj @@ -0,0 +1,66 @@ + + + + + Debug + AnyCPU + {288B5E55-E8EC-46EC-A841-FD543EF5B1B8} + Library + Properties + OwO_Module + OwO_Module + v3.5 + 512 + + OnOutputUpdated + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + References\UnityEngine.dll + + + References\UnityEngine.CoreModule.dll + + + References\UnityEngine.UI.dll + + + References\VRLoader.dll + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OwO.sln b/OwO.sln new file mode 100644 index 0000000..d6ad177 --- /dev/null +++ b/OwO.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.352 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwO", "OwO.csproj", "{288B5E55-E8EC-46EC-A841-FD543EF5B1B8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {288B5E55-E8EC-46EC-A841-FD543EF5B1B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {288B5E55-E8EC-46EC-A841-FD543EF5B1B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {288B5E55-E8EC-46EC-A841-FD543EF5B1B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {288B5E55-E8EC-46EC-A841-FD543EF5B1B8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {92C97687-A191-48D3-95E5-6A44AA4ADBAF} + EndGlobalSection +EndGlobal diff --git a/References/UnityEngine.CoreModule.dll b/References/UnityEngine.CoreModule.dll new file mode 100644 index 0000000..34cfad7 Binary files /dev/null and b/References/UnityEngine.CoreModule.dll differ diff --git a/References/UnityEngine.UI.dll b/References/UnityEngine.UI.dll new file mode 100644 index 0000000..f9d3a87 Binary files /dev/null and b/References/UnityEngine.UI.dll differ diff --git a/References/UnityEngine.dll b/References/UnityEngine.dll new file mode 100644 index 0000000..2842b72 Binary files /dev/null and b/References/UnityEngine.dll differ diff --git a/References/VRLoader.dll b/References/VRLoader.dll new file mode 100644 index 0000000..de668be Binary files /dev/null and b/References/VRLoader.dll differ