yea
This commit is contained in:
papershredder432 2023-10-07 22:02:55 -04:00
parent 8041ae33d2
commit 5dbb9b6bba
3 changed files with 102 additions and 0 deletions

25
src/FuckYouBeta.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FuckYouBeta", "FuckYouBeta\FuckYouBeta.csproj", "{D6EE7067-3BCF-42A2-B85E-307648BCA6B6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D6EE7067-3BCF-42A2-B85E-307648BCA6B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6EE7067-3BCF-42A2-B85E-307648BCA6B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6EE7067-3BCF-42A2-B85E-307648BCA6B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6EE7067-3BCF-42A2-B85E-307648BCA6B6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {37B533D4-9466-4A66-9CA6-03C094669DAB}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>FuckYouBeta</AssemblyName>
<Description>Fuck offs the beta warning</Description>
<Version>1.0.0</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<Copyright>papershredder432#0883</Copyright>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>deps\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Aki.Reflection">
<HintPath>deps\Aki.Reflection.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>deps\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>deps\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>deps\BepInEx.dll</HintPath>
</Reference>
<Reference Include="Comfort">
<HintPath>deps\Comfort.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>deps\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>deps\UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

34
src/FuckYouBeta/Plugin.cs Normal file
View File

@ -0,0 +1,34 @@
using BepInEx;
using Comfort.Common;
using EFT.UI;
using System.Reflection;
using UnityEngine;
namespace FuckYouBeta
{
[BepInPlugin("com.FuckYouBeta", "Fuck You Beta", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
Logger.LogInfo($"FuckYouBeta is loaded!");
}
private void OnDestroy()
{
Logger.LogInfo($"FuckYouBeta is unloaded!");
}
void FixedUpdate()
{
MenuScreen screen = Singleton<CommonUI>.Instance.MenuScreen;
if (screen == null) return;
var field = typeof(MenuScreen).GetField("_alphaWarningGameObject", BindingFlags.NonPublic | BindingFlags.Instance);
var e = field.GetValue(screen) as GameObject;
e.SetActive(false);
field.SetValue(screen, e);
}
}
}