Added project yay

This commit is contained in:
2026-02-24 10:34:05 +00:00
parent b41e1b704f
commit a3e0ddcfaf
3 changed files with 109 additions and 0 deletions

43
Plugin.cs Normal file
View File

@@ -0,0 +1,43 @@
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using RecRoom.Activities.Quest;
using RecRoom.Core.AI;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Sk0liosis
{
[BepInPlugin("com.splootybean.sk0liosis", "Sk0liosis", "1.0.2")]
public class Plugin : BasePlugin
{
internal static new ManualLogSource Log;
private readonly Harmony _harmony = new("Sk0liosis");
public static string[] videos = ["cnpuEwJZCJQ", "nwUfjW81GIE", "k32KJVBs_XE", "eQnZyEq8dKE", "oLjM6udnPoc", "7tFtyEsZSVs", "k7-rrqzw08U", "tjvCfojSEBk", "aymF58wwXDY", "Q6Wxm9Smf5c", "MpV62vSs12I", "s6ZZPA2DUnI", "xbGzExJ0F1Y", "a2zXsyDtNds", "MD-nhXyNFXg", "2zRJxT6Zfu0", "avfte4fbvJ4"];
public override void Load()
{
Log = base.Log;
Log.LogInfo("Did you know about THIS ureleased feature in Rec Room?");
_harmony.PatchAll();
}
[HarmonyPatch(typeof(QuestManager))]
internal class QuestManagerPatch
{
[HarmonyPatch("OnPlayerHealthChanged"), HarmonyPrefix]
private static void OnPlayerHealthChanged(QuestManager __instance, PhotonPlayer player, QuestManager.HealthChangeType healthChangeType, [Optional] Enemy enemyDeathAttacker, [Optional] PhotonPlayer friendlyFireDeathAttacker)
{
string randomVideo = videos[Random.Range(0, videos.Length)];
bool isDown = __instance.IsQuestRunning && player.IsLocal && (healthChangeType != QuestManager.HealthChangeType.Initialize || healthChangeType > QuestManager.HealthChangeType.Revive);
if (isDown)
{
{
Application.OpenURL($"https://youtube.com/watch/{randomVideo}");
}
}
}
}
}
}

44
Sk0liosis.csproj Normal file
View File

@@ -0,0 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>com.splootybean.sk0liosis</AssemblyName>
<Product>Sk0liosis</Product>
<Version>1.0.2</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.bepinex.dev/v3/index.json;
https://nuget.samboy.dev/v3/index.json
</RestoreAdditionalProjectSources>
<RootNamespace>Sk0liosis</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.*" IncludeAssets="compile" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.*" />
</ItemGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>AssemblyReferences\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>AssemblyReferences\Il2Cppmscorlib.dll</HintPath>
</Reference>
<Reference Include="Photon3Unity3D">
<HintPath>AssemblyReferences\Photon3Unity3D.dll</HintPath>
</Reference>
<Reference Include="RecRoom.Datastructures.Runtime">
<HintPath>AssemblyReferences\RecRoom.Datastructures.Runtime.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>AssemblyReferences\UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="AssemblyReferences\" />
</ItemGroup>
</Project>

22
Sk0liosis.sln Normal file
View File

@@ -0,0 +1,22 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35506.116 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sk0liosis", "Sk0liosis.csproj", "{E74FD2B1-3327-438E-8B6B-ADE7F4867916}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E74FD2B1-3327-438E-8B6B-ADE7F4867916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E74FD2B1-3327-438E-8B6B-ADE7F4867916}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E74FD2B1-3327-438E-8B6B-ADE7F4867916}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E74FD2B1-3327-438E-8B6B-ADE7F4867916}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal