コード例 #1
0
        public void DataUpdate()
        {
            if (Base.PluginManager.GameName == "ETS2")
            {
                Cities.TryGetValue((string)Base.GetProp("Job.CitySource"), out TruckSimulatorPluginCity CitySource);
                Cities.TryGetValue((string)Base.GetProp("Job.CityDestination"), out TruckSimulatorPluginCity CityDestination);

                if (CitySource != null)
                {
                    Base.SetProp("L.Job.CitySource", CitySource.translation);
                    Base.SetProp("L.Job.CountrySource", CitySource.country_translation);
                    Base.SetProp("L.A.Job.CitySourceFromSDK", CitySource.api_ascii);
                    Base.SetProp("L.A.Job.CitySource", CitySource.translation_ascii);
                    Base.SetProp("L.A.Job.CountrySource", CitySource.country_translation_ascii);
                }

                if (CityDestination != null)
                {
                    Base.SetProp("L.Job.CityDestination", CityDestination.translation);
                    Base.SetProp("L.Job.CountryDestination", CityDestination.country_translation);
                    Base.SetProp("L.A.Job.CityDestinationFromSDK", CityDestination.api_ascii);
                    Base.SetProp("L.A.Job.CityDestination", CityDestination.translation_ascii);
                    Base.SetProp("L.A.Job.CountryDestination", CityDestination.country_translation_ascii);
                }
            }
        }
コード例 #2
0
        public void DataUpdate()
        {
            JobStatusUpdate();
            CalculateNavigationDistanceFrames();

            Base.SetProp("Job.Status", CurrentStatus);
            Base.SetProp("Job.InProgress", InProgress());
        }
コード例 #3
0
        public void DataUpdate()
        {
            var NavigationTime = (TimeSpan)Base.GetProp("Job.NavigationTime");

            Base.SetProp("Navigation.TotalDaysLeft", NavigationTime.Days);
            Base.SetProp("Navigation.TotalHoursLeft", NavigationTime.Hours);
            Base.SetProp("Navigation.Minutes", NavigationTime.Minutes);
        }
コード例 #4
0
        public void DataUpdate()
        {
            var WearAverageCalculationValue = WearAverageCalculation();

            if (WearAverageCalculationValue > WearAverage)
            {
                Base.TriggerEvent("DamageIncrease");
            }

            WearAverage = WearAverageCalculationValue;

            Base.SetProp("Damage.WearAverage", WearAverageCalculationValue);
            Base.SetProp("Damage.WearWarning", WearAverageCalculationValue > Base.Settings.WearWarningLevel);
        }
コード例 #5
0
        public void DataUpdate()
        {
            Base.SetProp("Job.OverSpeedLimit", OverSpeedLimit());
            Base.SetProp("Job.OverSpeedLimitPercentage", OverSpeedLimitPercentage());

            Base.SetProp("Job.NextRestWarning", ((TimeSpan)Base.GetProp("NextRestStopTime")).Hours < 1);

            var RemainingTime = (TimeSpan)Base.GetProp("JobValues.RemainingDeliveryTime.Time");

            Base.SetProp("Job.RemainingDeliveryTime.Time.Days", RemainingTime.Days);
            Base.SetProp("Job.RemainingDeliveryTime.Time.Hours", RemainingTime.Hours);
            Base.SetProp("Job.RemainingDeliveryTime.Time.Minutes", RemainingTime.Minutes);
        }
コード例 #6
0
        public void DataUpdate(ref GameData data)
        {
            var FuelAverageConsumptionCurrentValue = (float)Base.GetProp("TruckValues.CurrentValues.DashboardValues.FuelValue.AverageConsumption");

            FuelAverageConsumption = FuelAverageConsumptionCurrentValue > 0
                ? FuelAverageConsumptionCurrentValue
                : FuelAverageConsumption;

            Base.SetProp("Drivetrain.EcoRange", EcoRange(data.NewData.Rpms));
            Base.SetProp("Drivetrain.FuelRangeStable", FuelRangeStable());
            Base.SetProp("Drivetrain.FuelValue.AverageConsumptionLitresPer100Mile", FuelAverageConsumption * (float)160.9344);
            Base.SetProp("Drivetrain.FuelValue.AverageConsumptionMilesPerGallonUK", FuelAverageConsumption * (float)2.824809363);
            Base.SetProp("Drivetrain.FuelValue.AverageConsumptionMilesPerGallonUS", FuelAverageConsumption * (float)2.352145833);
            Base.SetProp("Drivetrain.GearDashboard", DrivetrainGearDashboardWithCrawler());
        }
コード例 #7
0
 public void DataUpdate()
 {
     Base.SetProp("Dashboard.DisplayUnitMetric", Base.Settings.DashUnitMetric);
 }
コード例 #8
0
 public void DataUpdate(ref GameData data)
 {
     Base.SetProp("Engine.Starting", ((bool)Base.GetProp("Drivetrain.EngineEnabled")) == false && data.NewData.Rpms > 0);
 }
コード例 #9
0
 public void DataUpdate()
 {
     Base.SetProp("Lights.HazardWarningOn", HazardWarningOn());
 }
コード例 #10
0
 public void DataUpdate(ref GameData data)
 {
     Base.SetProp("Drivetrain.EcoRange", EcoRange(data.NewData.Rpms));
     Base.SetProp("Drivetrain.FuelRangeStable", FuelRangeStable());
     Base.SetProp("Drivetrain.GearDashboard", DrivetrainGearDashboardWithCrawler());
 }