コード例 #1
0
        /// <summary>
        /// create Harmony patches
        /// </summary>
        public static bool CreatePatches()
        {
            // check Harmony
            if (!HarmonyHelper.IsHarmonyInstalled)
            {
                ColossalFramework.UI.UIView.library.ShowModal <ExceptionPanel>("ExceptionPanel").SetMessage("Missing Dependency",
                                                                                                            "The Enhanced Outside Connections View mod requires the 'Harmony (Mod Dependency)' mod.  \n\nPlease subscribe to the 'Harmony (Mod Dependency)' mod and restart the game.", error: false);
                return(false);
            }

            // create the patches
            if (!BuildingAIPatch.CreateGetColorPatches())
            {
                return(false);
            }
            if (!VehicleAIPatch.CreateGetColorPatches())
            {
                return(false);
            }
            if (!OCIVPPatch.CreateUpdatePanelPatch())
            {
                return(false);
            }

            // success
            return(true);
        }
コード例 #2
0
        private static void Begin()
        {
            var harmony = new Harmony(HarmonyId);

            RenderManagerPatch.Patch(harmony);
            NetManagerPatch.Patch(harmony);
            NetNodePatch.Patch(harmony);
            NetSegmentPatch.Patch(harmony);
            NetLanePatch.Patch(harmony);
            VehicleManagerPatch.Patch(harmony);
            VehiclePatch.Patch(harmony);
            CitizenManagerPatch.Patch(harmony);
            CitizenInstancePatch.Patch(harmony);
            BuildingManagerPath.Patch(harmony);
            BuildingAIPatch.Patch(harmony);
        }