Skip to content

Commit

Permalink
Merge pull request #139 from mike-koch/next-release
Browse files Browse the repository at this point in the history
3.3.3
  • Loading branch information
mike-koch committed Aug 13, 2017
2 parents 9b438dc + f87714a commit 874ce94
Show file tree
Hide file tree
Showing 13,655 changed files with 204 additions and 1,623 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions config.json
Expand Up @@ -19,8 +19,8 @@

"config": {
"name": "ets2-mobile-route-advisor",
"title": "Mobile Route Advisor (3.3.2)",
"author": "mkoch227 and denilsonsa",
"title": "Mobile Route Advisor (3.3.3)",
"author": "mkoch227 and contributors",
"width": -1,
"height": -1,

Expand Down
6 changes: 6 additions & 0 deletions dashboard.css
Expand Up @@ -101,6 +101,9 @@ a {
flex-shrink: 0;
-webkit-flex-basis: 2em;
-ms-flex-preferred-size: 2em;
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
flex-basis: 2em;

text-align: center;
Expand Down Expand Up @@ -291,6 +294,9 @@ a {
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-moz-user-select: none;
-khtml-user-select: none;
user-select: none;
}
.dashboard > nav > * {
-webkit-box-flex: 0;
Expand Down
11 changes: 8 additions & 3 deletions dashboard.html
Expand Up @@ -61,8 +61,6 @@
<svg width="0.7em" height="0.7em"><use xlink:href="#svg-arrow-up" fill="currentColor"/></svg>
</button>
</div>
<div id="speed-limit" class="ol-unselectable ol-control game-specific"><span class="speedLimitRoundedKmhMph"></span></div>
<div id="map-text" class="hasJob ol-unselectable ol-control"><span data-mra-text="ETA"></span>: <span class="navigation-estimatedTime"></span>, <span class="navigationEstimatedDistanceKmMi"></span> <span class="distanceUnits"></span>, <span class="navigation-timeToDestination"></span></div>

<div class="dashboard connected">
<aside>
Expand Down Expand Up @@ -103,6 +101,13 @@

<article id="_map">
<p class="loading-text" data-mra-text="LoadingMapPleaseWait"></p>
<div class="_no-map">
<div class="_row">
<p style="margin-top: 250px">No map available</p>
<div id="map-text" class="hasJob ol-unselectable ol-control"><span data-mra-text="ETA"></span>: <span class="navigation-estimatedTime"></span>, <span class="navigationEstimatedDistanceKmMi"></span> <span class="distanceUnits"></span>, <span class="navigation-timeToDestination"></span></div>
<div id="speed-limit" class="ol-unselectable ol-control game-specific"><span class="speedLimitRoundedKmhMph"></span></div>
</div>
</div>
</article>

<article id="_cargo">
Expand Down Expand Up @@ -190,7 +195,7 @@
<article id="_about">
<p id="version">Mobile Route Advisor </p>
<p id="update-status" class="_yellow-color" style="display: none">A newer version is available!</p>
<p><a href="https://github.com/mkoch227/ets2-mobile-route-advisor" target="_blank">https://github.com/mkoch227/ets2-mobile-route-advisor</a></p>
<p><a href="https://github.com/mike-koch/ets2-mobile-route-advisor" target="_blank">https://github.com/mike-koch/ets2-mobile-route-advisor</a></p>
</article>
</div>

Expand Down
36 changes: 24 additions & 12 deletions dashboard.js
Expand Up @@ -63,19 +63,25 @@ Funbit.Ets.Telemetry.Dashboard.prototype.filter = function (data) {
data.navigation.estimatedTime = getTime(data.navigation.estimatedTime, 24);
data.navigation.estimatedTime12h = getTime(estimatedTime24h, 12);
data.navigation.timeToDestination = processTimeDifferenceArray(timeToDestinationArray);
data.job.remainingTimeArray = getDaysHoursMinutesAndSeconds(data.job.remainingTime);
data.job.remainingTime = processTimeDifferenceArray(data.job.remainingTimeArray);

// ETS2-specific logic
data.isWorldOfTrucksContract = isWorldOfTrucksContract(data);

data.job.remainingTimeArray = getDaysHoursMinutesAndSeconds(data.job.remainingTime);
data.job.remainingTime = processTimeDifferenceArray(data.job.remainingTimeArray);

if (data.isEts2) {
data.jobIncome = getEts2JobIncome(data.job.income);
}

// ATS-specific logic
if (data.isAts) {
data.jobIncome = getAtsJobIncome(data.job.income);
}
$('#_map').find('._no-map').show();
$('#_map').find('.loading-text').hide();
} else {
$('#_map').find('._no-map').hide();
}

// Non-WoT stuff here
if (!data.isWorldOfTrucksContract || data.isAts) {
Expand Down Expand Up @@ -457,15 +463,18 @@ function processDomChanges(data) {
g_configPrefix = data.game.gameName.toLowerCase();
}

// Initialize JavaScript
var mapPack = g_skinConfig[g_configPrefix].mapPack;
// Initialize JavaScript if ETS2
if (g_configPrefix === 'ets2') {
var mapPack = g_skinConfig[g_configPrefix].mapPack;

// Process map pack JSON
$.getJSON(g_pathPrefix + '/maps/' + mapPack + '/config.json', function(json) {
g_mapPackConfig = json;
// Process map pack JSON
$.getJSON(g_pathPrefix + '/maps/' + mapPack + '/config.json', function(json) {
g_mapPackConfig = json;

loadScripts(mapPack, 0, g_mapPackConfig.scripts);
});
loadScripts(mapPack, 0, g_mapPackConfig.scripts);
});
}


// Process Speed Units
var distanceUnits = g_skinConfig[g_configPrefix].distanceUnits;
Expand Down Expand Up @@ -519,7 +528,10 @@ function loadScripts(mapPack, index, array) {

function goToMap() {
showTab('_map');
g_map.updateSize();

if (g_configPrefix === 'ets2') {
g_map.updateSize();
}
}

function updateSpeedIndicator(speedLimit, currentSpeed) {
Expand Down Expand Up @@ -571,7 +583,7 @@ var g_translations;
var g_skinConfig;

// The current version of ets2-mobile-route-advisor
var g_currentVersion = '3.3.2';
var g_currentVersion = '3.3.3';

// The currently running game
var g_runningGame;
Expand Down
Binary file modified img/player.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/player.png.old
Binary file not shown.
Binary file modified img/player_proportions.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/player_proportions.png.old
Binary file not shown.
3 changes: 2 additions & 1 deletion language/en-US.json
Expand Up @@ -23,5 +23,6 @@
"FridayAbbreviated": "Fri",
"SaturdayAbbreviated": "Sat",
"WorldOfTrucksContract": "World of Trucks Contract",
"LoadingMapPleaseWait": "Loading map, please wait..."
"LoadingMapPleaseWait": "Loading map, please wait...",
"NoMapAvailable": "No map available"
}
3 changes: 0 additions & 3 deletions maps/ats/config.json
Expand Up @@ -8,8 +8,5 @@
" https://github.com/mike-koch/ets2-mobile-route-advisor/wiki/Creating-a-Map-Pack"
],
"scripts": [
"js/cities.js",
"js/map.js",
"js/ol.js"
]
}

0 comments on commit 874ce94

Please sign in to comment.