Decompiled source of Fugitive v1.0.0

Fugitive_0b139ca5.dll

Decompiled 18 hours ago
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using BigPuzzleSDK;
using TMPro;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
public class CounterDisplay : MonoBehaviour
{
	[SerializeField]
	private PuzzleCountInput Counter;

	[SerializeField]
	private TextMeshPro TextDisplay;

	private float timer;

	private void Update()
	{
		timer += Time.deltaTime;
		if (timer >= 1f)
		{
			timer -= 1f;
			((TMP_Text)TextDisplay).SetText(Counter.Value.ToString());
		}
	}
}
public class FireworkShow : MonoBehaviour
{
	[SerializeField]
	private PuzzleFireworkLauncher[] Fireworks;

	[SerializeField]
	private float FireInterval = 0.4f;

	private float timer;

	private bool isSequencePlaying;

	private int fireworkIndex;

	public void BeginFireSequence()
	{
		if (PuzzleSDK.IsHost && !isSequencePlaying)
		{
			ShuffleFireworksOrder();
			timer = 0f;
			isSequencePlaying = true;
			fireworkIndex = 0;
		}
	}

	private void ShuffleFireworksOrder()
	{
		for (int i = 0; i < Fireworks.Length; i++)
		{
			PuzzleFireworkLauncher val = Fireworks[i];
			int num = Random.Range(i, Fireworks.Length);
			Fireworks[i] = Fireworks[num];
			Fireworks[num] = val;
		}
	}

	private void Update()
	{
		if (!PuzzleSDK.IsHost || !isSequencePlaying)
		{
			return;
		}
		timer += Time.deltaTime;
		if (timer >= FireInterval)
		{
			timer -= FireInterval;
			if (fireworkIndex < Fireworks.Length)
			{
				Fireworks[fireworkIndex].Fire();
				fireworkIndex++;
			}
			else
			{
				fireworkIndex = 0;
				isSequencePlaying = false;
			}
		}
	}
}
public class HoldToProgress : MonoBehaviour
{
	[SerializeField]
	private PuzzleProgressBar ProgressBar;

	[SerializeField]
	private PuzzleCountInput Counter;

	[SerializeField]
	private PuzzleFireworkLauncher FireworkLauncher;

	[SerializeField]
	private PuzzlePokeButton SabotageButton;

	[SerializeField]
	private PuzzleLight SabotageLight;

	[SerializeField]
	private int UnsabotagedPointsWhenDone = 3;

	[SerializeField]
	private int SabotagedPointsWhenDone = 2;

	[SerializeField]
	private int SabotageTotalAdd = 10;

	private float timer;

	private bool isProgressing;

	private bool isSabotaged;

	public void BeginProgress()
	{
		if (PuzzleSDK.IsHost && ProgressBar.Progress < ProgressBar.Total)
		{
			if (isSabotaged)
			{
				FireworkLauncher.Fire();
			}
			isProgressing = true;
			timer = 0f;
			ProgressBar.Increment();
		}
	}

	public void EndProgress()
	{
		if (PuzzleSDK.IsHost)
		{
			isProgressing = false;
			if (ProgressBar.Progress < ProgressBar.Total)
			{
				ProgressBar.Fail();
			}
		}
	}

	public void Reset()
	{
		if (PuzzleSDK.IsHost)
		{
			isProgressing = false;
			isSabotaged = false;
			timer = 0f;
			ProgressBar.Reset();
			SabotageButton.SetClickable(true);
			SabotageLight.TurnOff();
		}
	}

	public void Sabotage()
	{
		if (PuzzleSDK.IsHost)
		{
			isSabotaged = true;
			SabotageLight.TurnOn();
			ProgressBar.SetTotal(ProgressBar.Total + SabotageTotalAdd);
		}
	}

	private void OnProgressFull()
	{
		if (isSabotaged)
		{
			Counter.SetValue(Counter.Value + SabotagedPointsWhenDone);
		}
		else
		{
			Counter.SetValue(Counter.Value + UnsabotagedPointsWhenDone);
		}
		SabotageButton.SetClickable(false);
	}

	private void Update()
	{
		if (!PuzzleSDK.IsHost || !isProgressing)
		{
			return;
		}
		timer += Time.deltaTime;
		if (timer >= 1f)
		{
			timer -= 1f;
			ProgressBar.Increment();
			if (ProgressBar.Progress >= ProgressBar.Total)
			{
				isProgressing = false;
				OnProgressFull();
			}
		}
	}
}
public class ManyLightToggle : MonoBehaviour
{
	[SerializeField]
	private PuzzleLight[] RedLights;

	[SerializeField]
	private PuzzleLight[] GreenLights;

	[SerializeField]
	private HoldToProgress[] GoalPosts;

	[SerializeField]
	private PuzzleLight[] DecoyLights;

	[SerializeField]
	private PuzzlePokeButton[] DecoyButtons;

	public void SetGoalPostsReady()
	{
		if (PuzzleSDK.IsHost)
		{
			PuzzleLight[] redLights = RedLights;
			for (int i = 0; i < redLights.Length; i++)
			{
				redLights[i].TurnOn();
			}
			redLights = GreenLights;
			for (int i = 0; i < redLights.Length; i++)
			{
				redLights[i].TurnOff();
			}
			HoldToProgress[] goalPosts = GoalPosts;
			for (int i = 0; i < goalPosts.Length; i++)
			{
				goalPosts[i].Reset();
			}
			redLights = DecoyLights;
			for (int i = 0; i < redLights.Length; i++)
			{
				redLights[i].TurnOff();
			}
			PuzzlePokeButton[] decoyButtons = DecoyButtons;
			for (int i = 0; i < decoyButtons.Length; i++)
			{
				decoyButtons[i].SetClickable(true);
			}
		}
	}

	public void TurnAllOff()
	{
		if (PuzzleSDK.IsHost)
		{
			PuzzleLight[] redLights = RedLights;
			for (int i = 0; i < redLights.Length; i++)
			{
				redLights[i].TurnOff();
			}
			redLights = GreenLights;
			for (int i = 0; i < redLights.Length; i++)
			{
				redLights[i].TurnOff();
			}
			HoldToProgress[] goalPosts = GoalPosts;
			for (int i = 0; i < goalPosts.Length; i++)
			{
				goalPosts[i].Reset();
			}
			redLights = DecoyLights;
			for (int i = 0; i < redLights.Length; i++)
			{
				redLights[i].TurnOff();
			}
		}
	}
}
public class PlayerTeleporter : MonoBehaviour
{
	[SerializeField]
	private Transform HomeTransform;

	public void TeleportPlayersToHome()
	{
		if (!PuzzleSDK.IsHost)
		{
			return;
		}
		foreach (PuzzlePlayer player in PuzzleSDK.players)
		{
			player.Teleport(HomeTransform);
		}
	}
}
[CompilerGenerated]
[EditorBrowsable(EditorBrowsableState.Never)]
[GeneratedCode("Unity.MonoScriptGenerator.MonoScriptInfoGenerator", null)]
internal class UnitySourceGeneratedAssemblyMonoScriptTypes_v1
{
	private struct MonoScriptData
	{
		public byte[] FilePathsData;

		public byte[] TypesData;

		public int TotalTypes;

		public int TotalFiles;

		public bool IsEditorOnly;
	}

	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	private static MonoScriptData Get()
	{
		return new MonoScriptData
		{
			FilePathsData = new byte[236]
			{
				0, 0, 0, 1, 0, 0, 0, 39, 92, 65,
				115, 115, 101, 116, 115, 92, 80, 117, 122, 122,
				108, 101, 83, 99, 114, 105, 112, 116, 115, 92,
				67, 111, 117, 110, 116, 101, 114, 68, 105, 115,
				112, 108, 97, 121, 46, 99, 115, 0, 0, 0,
				1, 0, 0, 0, 37, 92, 65, 115, 115, 101,
				116, 115, 92, 80, 117, 122, 122, 108, 101, 83,
				99, 114, 105, 112, 116, 115, 92, 70, 105, 114,
				101, 119, 111, 114, 107, 83, 104, 111, 119, 46,
				99, 115, 0, 0, 0, 1, 0, 0, 0, 39,
				92, 65, 115, 115, 101, 116, 115, 92, 80, 117,
				122, 122, 108, 101, 83, 99, 114, 105, 112, 116,
				115, 92, 72, 111, 108, 100, 84, 111, 80, 114,
				111, 103, 114, 101, 115, 115, 46, 99, 115, 0,
				0, 0, 1, 0, 0, 0, 40, 92, 65, 115,
				115, 101, 116, 115, 92, 80, 117, 122, 122, 108,
				101, 83, 99, 114, 105, 112, 116, 115, 92, 77,
				97, 110, 121, 76, 105, 103, 104, 116, 84, 111,
				103, 103, 108, 101, 46, 99, 115, 0, 0, 0,
				1, 0, 0, 0, 41, 92, 65, 115, 115, 101,
				116, 115, 92, 80, 117, 122, 122, 108, 101, 83,
				99, 114, 105, 112, 116, 115, 92, 80, 108, 97,
				121, 101, 114, 84, 101, 108, 101, 112, 111, 114,
				116, 101, 114, 46, 99, 115
			},
			TypesData = new byte[101]
			{
				0, 0, 0, 0, 15, 124, 67, 111, 117, 110,
				116, 101, 114, 68, 105, 115, 112, 108, 97, 121,
				0, 0, 0, 0, 13, 124, 70, 105, 114, 101,
				119, 111, 114, 107, 83, 104, 111, 119, 0, 0,
				0, 0, 15, 124, 72, 111, 108, 100, 84, 111,
				80, 114, 111, 103, 114, 101, 115, 115, 0, 0,
				0, 0, 16, 124, 77, 97, 110, 121, 76, 105,
				103, 104, 116, 84, 111, 103, 103, 108, 101, 0,
				0, 0, 0, 17, 124, 80, 108, 97, 121, 101,
				114, 84, 101, 108, 101, 112, 111, 114, 116, 101,
				114
			},
			TotalFiles = 5,
			TotalTypes = 5,
			IsEditorOnly = false
		};
	}
}
namespace BigPuzzleSDK.Generated;

[BepInPlugin("puzzle.fugitive_0b139ca5", "Fugitive_0b139ca5", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class BigPuzzleSDKGeneratedPlugin : BasePlugin
{
	public override void Load()
	{
		PuzzleSDK.RegisterAssemblyOf((object)this);
	}
}