ets2-dashboard-skin
Version:
Euro Truck Simulator 2 dashboard
32 lines (24 loc) • 612 B
JavaScript
/**
* @author: Emmanuel SMITH <emmanuel.smith@live-session.fr>
* project: customDefault
* file: utils.helpers.js
* Date: 26-Apr-20
* Time: 15:54
*/
import { io, telemetry } from './server.helpers';
const logIt = ( eventName, rawData, txt ) => {
io.emit( 'log', {
eventName: eventName,
rawData: rawData
} );
console.log( `[${ eventName }] ${ txt }`/*, JSON.stringify( rawData, null, 2 )*/ );
};
const currency = () => {
const alts = [ '?', '€', '$' ];
return alts[ telemetry.getGame().game.id || 0 ];
};
export {
logIt,
currency
};
export default {};