Decompiled source of InfiniteFilmMod2 v1.1.0

InfiniteFilmMod2.dll

Decompiled 7 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using InfiniteFilmMod.Patches;
using Photon.Pun;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("InfiniteFilmMod2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InfiniteFilmMod2")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e4bb39ce-9380-41cb-bf88-492009caa86e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace InfiniteFilmMod2
{
	[BepInPlugin("PokeStone.InfiniteFilmMod", "Infinite Film Mod", "1.0.0.0")]
	public class InfiniteFilmModBase : BaseUnityPlugin
	{
		private const string modGUID = "PokeStone.InfiniteFilmMod";

		private const string modName = "Infinite Film Mod";

		private const string modVersion = "1.0.0.0";

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("PokeStone.InfiniteFilmMod");
			val.PatchAll(typeof(InfiniteFilmModBase));
			val.PatchAll(typeof(VideoCameraPatch));
		}
	}
}
namespace InfiniteFilmMod.Patches
{
	[HarmonyPatch(typeof(VideoCamera), "ConfigItem")]
	public class VideoCameraPatch
	{
		[HarmonyPostfix]
		public static void PostfixHasFilmLeft(VideoCamera __instance, ItemInstanceData data, PhotonView playerView)
		{
			VideoInfoEntry val = default(VideoInfoEntry);
			if (data.TryGetEntry<VideoInfoEntry>(ref val))
			{
				val.timeLeft = float.MaxValue;
			}
		}
	}
}