コード例 #1
0
        public override void OnLevelLoaded(LoadMode mode)
        {
            Log.Info($"OnLevelLoaded: {mode}");
            base.OnLevelLoaded(mode);

            try
            {
                ElevatedStops.AddElevatedStoptypes();
                ElevatedStops.AllowStreetLightsOnElevatedStops();

                if (HarmonyHelper.IsHarmonyInstalled)
                {
                    Patcher.PatchAll();
                    Log.Info("Patches deployed");
                }
                else
                {
                    Log.Info("Harmony not found");
                }
            }
            catch (Exception e)
            {
                Log.Error($"Failed deploying Patches: {e}");
            }
        }
コード例 #2
0
 public override void OnLevelLoaded(LoadMode mode)
 {
     base.OnLevelLoaded(mode);
     if (!HarmonyHelper.IsHarmonyInstalled)
     {
         return;
     }
     try
     {
         ElevatedStops.AddElevatedStoptypes();
         ElevatedStops.AllowStreetLightsOnElevatedStops();
         GetClosestLanePositionPatch.Apply();
         AddLaneConnectionPatch.Apply();
         RemoveLaneConnectionPatch.Apply();
         Log.Info("Patches deployed");
     }
     catch (Exception e)
     {
         Log.Error($"Failed deploying Patches: {e}");
     }
 }