Skip to content

Commit

Permalink
Initial Push
Browse files Browse the repository at this point in the history
  • Loading branch information
DubyaDude committed Aug 12, 2019
1 parent 1f47cbf commit de5b08b
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 0 deletions.
92 changes: 92 additions & 0 deletions OwO.cs
Original file line number Diff line number Diff line change
@@ -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<Text>();

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;
}
}
}

66 changes: 66 additions & 0 deletions OwO.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{288B5E55-E8EC-46EC-A841-FD543EF5B1B8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OwO_Module</RootNamespace>
<AssemblyName>OwO_Module</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>References\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>References\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>References\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="VRLoader">
<HintPath>References\VRLoader.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="OwO.cs" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
25 changes: 25 additions & 0 deletions OwO.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.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
Binary file added References/UnityEngine.CoreModule.dll
Binary file not shown.
Binary file added References/UnityEngine.UI.dll
Binary file not shown.
Binary file added References/UnityEngine.dll
Binary file not shown.
Binary file added References/VRLoader.dll
Binary file not shown.

0 comments on commit de5b08b

Please sign in to comment.