-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlantDecorPatches.cs
70 lines (63 loc) · 1.96 KB
/
PlantDecorPatches.cs
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using HarmonyLib;
using UnityEngine;
class PlantDecorPatches
{
// utility
public static void ChangeDecorTo(GameObject go, EffectorValues decor)
{
var decorPlantComponent = go.GetComponent<PrickleGrass>();
decorPlantComponent.positive_decor_effect = decor;
var decorProvider = go.GetComponent<DecorProvider>();
if (decorProvider != null)
{
decorProvider.SetValues(decor);
}
}
// Jumping Joya
[HarmonyPatch(typeof(CactusPlantConfig), nameof(CactusPlantConfig.CreatePrefab))]
class JumpingJoya_CreatePrefab_Patch
{
public static void Postfix(GameObject __result)
{
ChangeDecorTo(__result, new EffectorValues(10, 3));
}
}
// Mirth Leaf
[HarmonyPatch(typeof(LeafyPlantConfig), nameof(LeafyPlantConfig.CreatePrefab))]
class MirthLeaf_CreatePrefab_Patch
{
public static void Postfix(GameObject __result)
{
ChangeDecorTo(__result, new EffectorValues(15, 4));
}
}
// Bluff Briar
[HarmonyPatch(typeof(PrickleGrassConfig), nameof(PrickleGrassConfig.CreatePrefab))]
class BluffBriar_CreatePrefab_Patch
{
public static void Postfix(GameObject __result)
{
ChangeDecorTo(__result, new EffectorValues(15, 4));
}
}
// Mellow Mallow
[HarmonyPatch(typeof(WineCupsConfig), nameof(WineCupsConfig.CreatePrefab))]
class MellowMallow_CreatePrefab_Patch
{
public static void Postfix(GameObject __result)
{
ChangeDecorTo(__result, new EffectorValues(15, 4));
}
}
// Bliss Burst
[HarmonyPatch(typeof(CylindricaConfig), nameof(CylindricaConfig.CreatePrefab))]
class BlissBurst_CreatePrefab_Patch
{
public static void Postfix(GameObject __result)
{
ChangeDecorTo(__result, new EffectorValues(15, 4));
}
}
// Bliss Burst (can't find)
// Mellow Mallow (can't find)
}