-
Notifications
You must be signed in to change notification settings - Fork 1
/
Loader.cs
49 lines (40 loc) · 1.42 KB
/
Loader.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
using Dialogue;
using HarmonyLib;
using Randomizer.Config;
using Randomizer.Data;
using Randomizer.Loaders;
using UnityEngine;
using Winch.Core;
using Winch.Core.API;
namespace Randomizer;
public static class Loader
{
public static List<ItemData>? originalAllItems = null;
public static GameObject gameObject;
public static void Initialize()
{
new Harmony("mmbluey.randomizer").PatchAll();
gameObject = new GameObject("Randomizer");
gameObject.DontDestroyOnLoad();
RandomizerConfig.Initialize();
ModSaveData.Initialize();
DialogueAPI.Initialize();
// use specific seed as set in config
// else is set inside WindowsSaveStrategy.GetData: when save is loaded
if (RandomizerConfig.Instance.UseConfigSeed)
{
SeededRng.Seed = RandomizerConfig.Instance.Seed ?? SeededRng.Seed;
}
// attach event handling to winch events
DredgeEvent.AddressableEvents.ItemsLoaded.On += ItemLoader.PostItemLoad;
DredgeEvent.AddressableEvents.QuestsLoaded.On += QuestLoader.PostQuestLoad;
}
}
/*
* what have?
* - yarn DialogueRunner
* - questStepData -> yarnRootNode
* - questStepData -> QuestStepCondition
* - QuestStepCondition : ItemInventoryCondition ?! CompletedGridCondition : ItemCountCondition
* test by checing for ItemInventoryCondition & changing it, see if pursuit details update
*/