Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
ComponentToggle Rewrite - Redid EVERYTHING
Browse files Browse the repository at this point in the history
  • Loading branch information
MintLily committed Dec 18, 2021
1 parent e0d8761 commit 7b70dd9
Show file tree
Hide file tree
Showing 28 changed files with 1,693 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.vs/
Output/
obj/
ComponentToggle_old/Output/
ComponentToggle_old/obj/
ComponentToggle_old/bin/
.git/
Utilities/WebAdded/README.md
.idea/
ComponentToggle_old/Utilities/WebAdded/
.idea/
ComponentToggleExtended/obj/
ComponentToggleExtended/Output/
ComponentToggleExtended/bin/
ComponentToggle.json
15 changes: 12 additions & 3 deletions ComponentToggle.sln
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30225.117
# Visual Studio Version 17
VisualStudioVersion = 17.1.31911.260
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentToggle", "ComponentToggle.csproj", "{095732D0-1256-447D-928F-66B9CB400F82}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentToggle", "ComponentToggle_old\ComponentToggle.csproj", "{095732D0-1256-447D-928F-66B9CB400F82}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentToggleExtended", "ComponentToggleExtended\ComponentToggleExtended.csproj", "{17200B04-56EB-45C9-8AB3-625ADA2349DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{095732D0-1256-447D-928F-66B9CB400F82}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{095732D0-1256-447D-928F-66B9CB400F82}.Debug|Any CPU.Build.0 = Release|Any CPU
{095732D0-1256-447D-928F-66B9CB400F82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{095732D0-1256-447D-928F-66B9CB400F82}.Release|Any CPU.Build.0 = Release|Any CPU
{17200B04-56EB-45C9-8AB3-625ADA2349DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17200B04-56EB-45C9-8AB3-625ADA2349DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17200B04-56EB-45C9-8AB3-625ADA2349DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17200B04-56EB-45C9-8AB3-625ADA2349DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
58 changes: 58 additions & 0 deletions ComponentToggleExtended/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System;
using ComponentToggleExtended.Utilities;
using MelonLoader;

namespace ComponentToggleExtended {
public class BuildInfo {
public const string Name = "ComponentToggle";
public const string Author = "Lily";
public const string Company = null;
public const string Version = "2.0.0";
public const string DownloadLink = "https://github.com/MintLily/ComponentToggle";
public const string Description = "Toggle certain components with VRChat. (Toggle Pickup, Pickup Objects, Video Players, Pens, Chairs, Mirrors, Post Processing, and Avatar Pedestals)";
}

public class Main : MelonMod {
private MelonMod Instance;
public static bool isDebug;
public static MelonPreferences_Category melon;
public static MelonPreferences_Entry<bool> VRC_Pickup, VRC_Pickup_Objects, VRC_SyncVideoPlayer, Pens, VRC_Station, VRC_MirrorReflect, PostProcessing, VRC_AvatarPedestal;

public override void OnApplicationStart() {
Instance = this;
if (MelonDebug.IsEnabled() || Environment.CommandLine.Contains("--ct.debug")) {
isDebug = true;
Log("Debug mode is active", isDebug);
}

melon = MelonPreferences.CreateCategory(BuildInfo.Name, BuildInfo.Name);
VRC_Pickup = melon.CreateEntry("EnablePickup", true, "Enable Pickup");
VRC_Pickup_Objects = melon.CreateEntry("ShowPickupObjects", true, "Show Pickup Objects");
VRC_SyncVideoPlayer = melon.CreateEntry("ShowVideoPlayers", true, "Show Video Players");
Pens = melon.CreateEntry("ShowPens", true, "Show Pens / Erasers");
VRC_Station = melon.CreateEntry("EnableChairs", true, "Enable Chairs");
VRC_MirrorReflect = melon.CreateEntry("ShowMirrors", true, "Show Mirrors");
PostProcessing = melon.CreateEntry("EnablePostProcessing", true, "Enable Post Processing");
VRC_AvatarPedestal = melon.CreateEntry("ShowAvatarsPedestals", true, "Show Avatars Pedestals");

Menu.Init();
Patches.PatchVRC_Station(); // VRC_Station with HarmonyX
}

public void Log(string message, bool debug = false) {
if (debug)
LoggerInstance.Msg(ConsoleColor.Green, message);
else LoggerInstance.Msg(message);
}

public static bool WorldWasChanged = false;

public override void OnSceneWasLoaded(int buildIndex, string sceneName) {
if (buildIndex == -1 && buildIndex != 0 && buildIndex != 1) {
WorldWasChanged = true;
WorldObjects.DoActions();
}
MelonCoroutines.Start(WorldLogic.CheckWorld());
}
}
}
129 changes: 129 additions & 0 deletions ComponentToggleExtended/ComponentToggleExtended.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?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>{17200B04-56EB-45C9-8AB3-625ADA2349DE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ComponentToggleExtended</RootNamespace>
<AssemblyName>ComponentToggleExtended</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</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="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="AVProVideo.Extensions.Timeline">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\AVProVideo.Extensions.Timeline.dll</HintPath>
</Reference>
<Reference Include="AVProVideo.Extensions.UnityUI">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\AVProVideo.Extensions.UnityUI.dll</HintPath>
</Reference>
<Reference Include="AVProVideo.Extensions.VisualEffectGraph">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\AVProVideo.Extensions.VisualEffectGraph.dll</HintPath>
</Reference>
<Reference Include="AVProVideo.Runtime">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\AVProVideo.Runtime.dll</HintPath>
</Reference>
<Reference Include="DataModel">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\DataModel.dll</HintPath>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath>
</Reference>
<Reference Include="MelonLoader">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\MelonLoader.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UIExpansionKit">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\Mods\UIExpansionKit.dll</HintPath>
</Reference>
<Reference Include="UnhollowerBaseLib">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath>
</Reference>
<Reference Include="UnhollowerRuntimeLib">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerRuntimeLib.dll</HintPath>
</Reference>
<Reference Include="Unity.Postprocessing.Runtime">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\Unity.Postprocessing.Runtime.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VideoModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.VideoModule.dll</HintPath>
</Reference>
<Reference Include="VRCCore-Editor">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCCore-Editor.dll</HintPath>
</Reference>
<Reference Include="VRCCore-Standalone">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCCore-Standalone.dll</HintPath>
</Reference>
<Reference Include="VRCSDK2">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCSDK2.dll</HintPath>
</Reference>
<Reference Include="VRCSDK3">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCSDK3.dll</HintPath>
</Reference>
<Reference Include="VRCSDK3A">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCSDK3A.dll</HintPath>
</Reference>
<Reference Include="VRCSDKBase">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\VRChat\MelonLoader\Managed\VRCSDKBase.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Menu.cs" />
<Compile Include="Patches.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utilities\RoomExtensions.cs" />
<Compile Include="Utilities\WorldLogic.cs" />
<Compile Include="WorldObjects.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>rename $(TargetFileName) ComponentToggle.dll</PostBuildEvent>
</PropertyGroup>
</Project>
Loading

0 comments on commit 7b70dd9

Please sign in to comment.