Beispiel #1
0
        public void Initialize(IManager manager, string ipcIdentifier)
        {
            try
            {
                var harmony = new Harmony("com.Larnin.CustomCar");

                harmony.PatchAll(Assembly.GetExecutingAssembly());
            }
            catch (Exception e)
            {
                Console.Out.WriteLine(e.ToString());
            }

            //DebugShaderList.Exec();
            ShaderTool.Instanciate();
            //AudioPlayer.Init();

            try
            {
                CarInfos carInfos = new CarInfos();
                carInfos.collectInfos();
                CarBuilder builder = new CarBuilder();
                builder.createCars(carInfos);
            }
            catch (Exception e)
            {
                ErrorList.add("An error occured while trying to load cars assets");
                Console.Out.WriteLine(e.ToString());
            }

            ModdedCarsColors.LoadAll();

            //disable loging cars
            //LogCarPrefabs.logCars();

            Events.MainMenu.Initialized.Subscribe(data =>
            {
                if (ErrorList.haveErrors())
                {
                    ErrorList.show();
                }
            });
        }
Beispiel #2
0
 static void Postfix(Profile __instance)
 {
     ModdedCarsColors.SaveAll();
 }