static IEnumerator Postfix(IEnumerator __result, AddProgramApp __instance, OSProgramDesc desc, bool ___m_dayEnded) { ___m_dayEnded = false; ReflectionUtils.Run("ShowProgressDialog", __instance, new object[] { ScriptLocalization.AddPrograms.INSTALLING, desc }); yield return(ReflectionUtils.Run <IEnumerator>("ShowProgress", __instance, new object[] { 0f, 0.9f, (float)desc.m_installTime * 0.4f, true })); yield return(ReflectionUtils.Run <IEnumerator>("ShowProgress", __instance, new object[] { 0.9f, 0.95f, (float)desc.m_installTime * 0.6f, true })); yield return(ReflectionUtils.Run <IEnumerator>("ShowProgress", __instance, new object[] { 0.95f, 1f, 1f, false })); ComputerSoftware software = __instance.GetComponentInParent <VirtualComputer>().GetComputer().m_software; software.m_programs = new List <string>(software.m_programs) { desc.m_id }.ToArray(); var os = __instance.GetComponentInParent <OS>(); __instance.m_installPopup.SetActive(false); OSLogic.InstanceFor(os).AddProgram(desc.m_id); OSLogic.InstanceFor(os).UpdatePrograms(); ReflectionUtils.Run("UpdateProgramList", __instance); yield break; }
static void Postfix(OS __instance) { OSLogic.InstanceFor(__instance).Init(); }