public static void Other(SGRoomControllerBase __instance, MethodBase __originalMethod) { Trap(() => { LogInfo($"SGRoomControllerBase_Other {__originalMethod.Name}"); if (DB[__instance] == false) { LogInfo("Initialize Widgets"); InitializeRoom(__instance); } }); }
public static bool InitWidgets(SGRoomControllerBase __instance) { return(Trap(() => { LogInfo($"SGRoomControllerBase.InitWidgets (want initialize? {allowInit})"); if (!allowInit) { DB[__instance] = false; return false; } DB[__instance] = true; return true; })); }
public static void InitializeRoom(SGRoomControllerBase room) { allowInit = true; room.InitWidgets(); allowInit = false; }