-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPrefabMod.cs
More file actions
27 lines (23 loc) · 817 Bytes
/
PrefabMod.cs
File metadata and controls
27 lines (23 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using HarmonyLib;
namespace CstiDetailedCardProgress;
internal class PrefabMod
{
[HarmonyPostfix]
[HarmonyPatch(typeof(GameManager), "Awake")]
public static void GameManagerAwakePostfix(GameManager __instance)
{
// make weather card inspect-able
if (Plugin.WeatherCardInspectable)
{
CardGraphics graphics = CardVisualsManager.Instance.WeatherCardVisualsPrefab;
// pre-1.04 patch
if (graphics == null)
{
graphics = __instance.WeatherCardPrefab.GetComponent<CardGraphics>();
if (__instance.CurrentWeatherCard != null) __instance.CurrentWeatherCard.BlocksRaycasts = true;
}
if (graphics == null) return;
graphics.DontBlockRaycasts = false;
}
}
}