Initial Commit

This commit is contained in:
Lachlan Leone
2024-01-20 20:00:35 +11:00
commit d78ae93c97
70 changed files with 3212 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
using System.Collections.Generic;
using HarmonyLib;
using Kitchen;
using UnityEngine;
namespace Pets.Patches
{
[HarmonyPatch(typeof(LocalViewRouter), "GetPrefab")]
public class LocalViewRouter_Patch
{
public static Dictionary<ViewType, GameObject> registeredPetViews = new();
static bool Prefix(LocalViewRouter __instance, ViewType view_type, ref GameObject __result)
{
if (!registeredPetViews.TryGetValue(view_type, out GameObject petPrefab)) return true;
__result = petPrefab;
return false;
}
}
}