Ejemplo n.º 1
0
        private static void Prefix(InspectorDataPatient __instance, Patient patient, Level ___Level)
        {
            if (!Program.Enabled)
            {
                return;
            }

            Program.Log(patient.Name);

            if (__instance != null)
            {
                _instance = __instance;
                Program.Log("Instance set");
            }

            Program.Log("Instance = " + _instance);

            _HUD = ___Level.HUD;
            //_InspectorMenu = _HUD.FindMenu<InspectorMenu>(false);

            //can't access private methods by triple underlines argument - patching breaks
            //SendHome = ___SendHome;
            //SendForTreatment = ___SendForTreatment;

            //cant call public method on argument __instance for some reason
            //inspector stops working ingame. What the?
            //canSendHome = __instance.IsFooterButtonVisible(i);
        }
Ejemplo n.º 2
0
        static bool Prefix(InspectorDataPatient __instance, ref bool __result, int buttonIndex)
        {
            if (!Main.enabled || !Main.GetConfig().HideButtonSendtoTreatment)
            {
                return(true);
            }

            if (buttonIndex == 2)
            {
                __result = false;
                return(false);
            }

            return(true);
        }