using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using Atlas;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
using localpcnerd.SurvivalMode;
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Packer.SR_Department_of_Meat;
[BepInPlugin("Packer.SR_Department_of_Meat", "SR_Department_of_Meat", "0.1.1")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("nrgill28.Atlas", "1.0.1")]
public class SR_Department_of_MeatPlugin : BaseUnityPlugin
{
private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
internal static ManualLogSource Logger;
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
LoadAssets();
}
private void LoadAssets()
{
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "Packer.SR_Department_of_Meat");
AtlasPlugin.RegisterScene(Path.Combine(BasePath, "sr_departmentofmeat"));
}
}
public class SM_RoundGameObjects : MonoBehaviour
{
[Tooltip("What round these gameObjects get set")]
public int roundTrigger = 0;
[Tooltip("What state the gameObjects are set to")]
public bool setGameObjects = false;
[Tooltip("All affected gameObjects")]
public GameObject[] gameObjects;
private void Start()
{
}
private void Update()
{
}
public void EndOfRound()
{
if (SurvivalManager.Instance.currentRound + 1 == roundTrigger)
{
TriggerRoundChange();
}
}
private void TriggerRoundChange()
{
for (int i = 0; i < gameObjects.Length; i++)
{
if ((Object)(object)gameObjects[i] != (Object)null)
{
gameObjects[i].SetActive(setGameObjects);
}
}
}
}