internal static void InitHooks() { // late hook. On.RoR2.PreGameController.Awake += (origAwake, selfPreGameController) => { origAwake(selfPreGameController); On.RoR2.RuleBook.ApplyChoice += (orig, self, def) => { orig(self, def); UpdateValues?.Invoke(self, null); }; }; }
private static void _hookApplyChoice_RuleBook(On.RoR2.RuleBook.orig_ApplyChoice orig, RuleBook self, RuleChoiceDef choiceDef) { orig(self, choiceDef); UpdateValues?.Invoke(self, choiceDef); }