Skip to content

Commit e43ced9

Browse files
Add files via upload
1 parent 9ab3e79 commit e43ced9

File tree

4 files changed

+170
-0
lines changed

4 files changed

+170
-0
lines changed

Main.cs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using MelonLoader;
2+
using UnityEngine;
3+
using Normal.Realtime;
4+
using System.Collections;
5+
namespace ModTag
6+
{
7+
public static class BuildInfo
8+
{
9+
public const string Name = "ModTag"; // Name of the Mod. (MUST BE SET)
10+
public const string Description = "Adds a \"Mod Tag\" to the player's name."; // Description for the Mod. (Set as null if none)
11+
public const string Author = "BelugaTheAxolotl#2134"; // Author of the Mod. (MUST BE SET)
12+
public const string Company = "BricksVR Modding"; // Company that made the Mod. (Set as null if none)
13+
public const string Version = "0.1.0"; // Version of the Mod. (MUST BE SET)
14+
public const string DownloadLink = "https://github.com/BricksVR-Modding/ModTag/releases"; // Download Link for the Mod. (Set as null if none)
15+
}
16+
17+
public class ApplyTag : MelonMod
18+
{
19+
public override void OnSceneWasLoaded(int buildindex, string sceneName)
20+
{
21+
var rt = GameObject.Find("MetaObjects/Realtime").GetComponent<Realtime>();
22+
MelonCoroutines.Start(connectionCheck(rt));
23+
}
24+
public override void OnUpdate()
25+
{
26+
if(Input.GetKeyDown("u"))
27+
{
28+
var settings = GameObject.Find("MetaObjects/UserSettings").GetComponent<UserSettings>();
29+
if (settings.Nickname.Contains("(MODDED)")) return;
30+
settings.Nickname = settings.Nickname+"\n(MODDED)";
31+
}
32+
}
33+
public IEnumerator connectionCheck(Realtime rt)
34+
{
35+
while(true)
36+
{
37+
if(rt.connected)
38+
{
39+
var settings = GameObject.Find("MetaObjects/UserSettings").GetComponent<UserSettings>();
40+
if (!settings.Nickname.Contains("(MODDED)")) settings.Nickname = settings.Nickname + "\n(MODDED)";
41+
}
42+
else
43+
{
44+
var settings = GameObject.Find("MetaObjects/UserSettings").GetComponent<UserSettings>();
45+
if (settings.Nickname.Contains("(MODDED)")) settings.Nickname = settings.Nickname.Replace("\n(MODDED)", "");
46+
47+
}
48+
yield return new WaitForSeconds(1);
49+
}
50+
}
51+
}
52+
}

ModTag.csproj

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{788BC472-59F7-46F6-B760-65C18BA74389}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>BVRmodTag</RootNamespace>
11+
<AssemblyName>ModTag</AssemblyName>
12+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
<TargetFrameworkProfile />
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
18+
<DebugSymbols>false</DebugSymbols>
19+
<DebugType>None</DebugType>
20+
<Optimize>true</Optimize>
21+
<OutputPath>$(SolutionDir)Output\</OutputPath>
22+
<DefineConstants>
23+
</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
27+
<Prefer32Bit>false</Prefer32Bit>
28+
<DebugSymbols>false</DebugSymbols>
29+
</PropertyGroup>
30+
<ItemGroup>
31+
<Reference Include="Assembly-CSharp">
32+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\Assembly-CSharp.dll</HintPath>
33+
</Reference>
34+
<Reference Include="Il2Cppmscorlib">
35+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath>
36+
</Reference>
37+
<Reference Include="MelonLoader">
38+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\MelonLoader.dll</HintPath>
39+
</Reference>
40+
<Reference Include="Normal.Realtime">
41+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\Normal.Realtime.dll</HintPath>
42+
</Reference>
43+
<Reference Include="Normcore">
44+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\Normcore.dll</HintPath>
45+
</Reference>
46+
<Reference Include="System" />
47+
<Reference Include="UnhollowerBaseLib">
48+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath>
49+
</Reference>
50+
<Reference Include="Unity.TextMeshPro">
51+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\Unity.TextMeshPro.dll</HintPath>
52+
</Reference>
53+
<Reference Include="UnityEngine">
54+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\UnityEngine.dll</HintPath>
55+
</Reference>
56+
<Reference Include="UnityEngine.AssetBundleModule">
57+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
58+
</Reference>
59+
<Reference Include="UnityEngine.CoreModule">
60+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath>
61+
</Reference>
62+
<Reference Include="UnityEngine.InputLegacyModule">
63+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
64+
</Reference>
65+
<Reference Include="UnityEngine.InputModule">
66+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\UnityEngine.InputModule.dll</HintPath>
67+
</Reference>
68+
<Reference Include="UnityEngine.UI, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
69+
<SpecificVersion>False</SpecificVersion>
70+
<HintPath>D:\Program Files x86\Epic Games\SteamNotBroken\steamapps\common\BricksVR\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
71+
</Reference>
72+
</ItemGroup>
73+
<ItemGroup>
74+
<Compile Include="Properties\AssemblyInfo.cs" />
75+
<Compile Include="Main.cs" />
76+
</ItemGroup>
77+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
78+
</Project>

ModTag.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30128.74
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModName", "ModName.csproj", "{788BC472-59F7-46F6-B760-65C18BA74389}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{788BC472-59F7-46F6-B760-65C18BA74389}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{788BC472-59F7-46F6-B760-65C18BA74389}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
GlobalSection(SolutionProperties) = preSolution
17+
HideSolutionNode = FALSE
18+
EndGlobalSection
19+
GlobalSection(ExtensibilityGlobals) = postSolution
20+
SolutionGuid = {DDF15A6C-2A44-4EBE-BD85-F3EE61DCD8BF}
21+
EndGlobalSection
22+
EndGlobal

Properties/AssemblyInfo.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Reflection;
2+
using MelonLoader;
3+
4+
[assembly: AssemblyTitle(ModTag.BuildInfo.Description)]
5+
[assembly: AssemblyDescription(ModTag.BuildInfo.Description)]
6+
[assembly: AssemblyCompany(ModTag.BuildInfo.Company)]
7+
[assembly: AssemblyProduct(ModTag.BuildInfo.Name)]
8+
[assembly: AssemblyCopyright("Created by " + ModTag.BuildInfo.Author)]
9+
[assembly: AssemblyTrademark(ModTag.BuildInfo.Company)]
10+
[assembly: AssemblyVersion(ModTag.BuildInfo.Version)]
11+
[assembly: AssemblyFileVersion(ModTag.BuildInfo.Version)]
12+
[assembly: MelonInfo(typeof(ModTag.ApplyTag), ModTag.BuildInfo.Name, ModTag.BuildInfo.Version, ModTag.BuildInfo.Author, ModTag.BuildInfo.DownloadLink)]
13+
[assembly: MelonColor()]
14+
15+
// Create and Setup a MelonGame Attribute to mark a Melon as Universal or Compatible with specific Games.
16+
// If no MelonGame Attribute is found or any of the Values for any MelonGame Attribute on the Melon is null or empty it will be assumed the Melon is Universal.
17+
// Values for MelonGame Attribute can be found in the Game's app.info file or printed at the top of every log directly beneath the Unity version.
18+
[assembly: MelonGame("BricksVR", "BricksVR")]

0 commit comments

Comments
 (0)