Exemple #1
0
        public static void Init()
        {
            if (Utils.IsModActive(1764208250))
            {
                UnityEngine.Debug.LogWarning("More Vehicles is enabled, applying compatibility workaround");
                MaxVehicleCount = ushort.MaxValue + 1;
            }
            else
            {
                UnityEngine.Debug.Log("More Vehicles is not enabled");
                MaxVehicleCount = VehicleManager.MAX_VEHICLE_COUNT;
            }

            if (VehicleManagerMod._isDeployed)
            {
                return;
            }
            if (!VehicleManagerMod.TryLoadData(out VehicleManagerMod.m_cachedVehicleData))
            {
                Utils.Log((object)"Loading default vehicle data.");
            }
            Redirector <VehicleManagerMod> .Deploy();

            SerializableDataExtension.instance.EventSaveData += new SerializableDataExtension.SaveDataEventHandler(VehicleManagerMod.OnSaveData);
            VehicleManagerMod._isDeployed = true;
        }
        public static void Init()
        {
            if (VehicleManagerMod._isDeployed)
            {
                return;
            }
            if (!VehicleManagerMod.TryLoadData(out VehicleManagerMod.m_cachedVehicleData))
            {
                Utils.Log((object)"Loading default vehicle data.");
            }
            Redirector <VehicleManagerMod> .Deploy();

            SerializableDataExtension.instance.EventSaveData += new SerializableDataExtension.SaveDataEventHandler(VehicleManagerMod.OnSaveData);
            VehicleManagerMod._isDeployed = true;
        }