using HarmonyLib;
using UnityEngine;

namespace Sk0liosis_Enhanced.Patches;

[HarmonyPatch(typeof(RecRoomGameRoot))]
static class RecRoomGameRootPatches
{
    [HarmonyPatch(nameof(RecRoomGameRoot.Awake))]
    static void Postfix()
    {
        if (GameObject.Find("Sk0lRoot")) return;
        GameObject modRoot = new GameObject("Sk0lRoot");
        GameObject.DontDestroyOnLoad(modRoot);
        modRoot.AddComponent<Sk0lManager>();
    }
}
