-
Notifications
You must be signed in to change notification settings - Fork 0
/
TheDivineThrone.cs
40 lines (33 loc) · 1.09 KB
/
TheDivineThrone.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
namespace BandTogether;
public class TheDivineThrone : OWItemSocket
{
public override void Awake()
{
base.Awake();
_acceptableType = Shrubbery.ItemType;
}
public override void Start()
{
base.Start();
OnSocketableDonePlacing += OnShrubberyReSeatedUponItsHolyArborealThrone;
OnSocketableDoneRemoving += OnShrubberyRemovedFromItsHolyArborealThrone;
}
private void OnDestroy()
{
OnSocketableDonePlacing -= OnShrubberyReSeatedUponItsHolyArborealThrone;
OnSocketableDoneRemoving += OnShrubberyRemovedFromItsHolyArborealThrone;
}
private void OnShrubberyReSeatedUponItsHolyArborealThrone(OWItem item)
{
if (!ModMain.GetPersistentCondition("BT_START_STEAL_QUEST"))
{
base.EnableInteraction(false);
}
ModMain.SetPersistentCondition("BT_FINISH_SHRUB_QUEST", true);
}
private void OnShrubberyRemovedFromItsHolyArborealThrone(OWItem item)
{
base.EnableInteraction(false);
ReferenceLocator.GetShrubSocketNomai().EnableInteraction(true);
}
}