Add Catenary DC electrification layer, CommunityMapLocation fixes, and CI/CD
Deploy & Release / build-and-deploy (push) Successful in 1m3s
Deploy & Release / build-and-deploy (push) Successful in 1m3s
This commit is contained in:
11 files changed
+660
-20
No files matched your search
@@ -5,7 +5,7 @@ import * as Config from './config.js';
|
||||
import { Color } from './js/colorlib.js';
|
||||
import * as MapData from './js/mapdata.js';
|
||||
|
||||
const settingsVersion = 1;
|
||||
const settingsVersion = 2;
|
||||
|
||||
let settingEntries = [
|
||||
{
|
||||
@@ -17,6 +17,72 @@ let settingEntries = [
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Catenary Network',
|
||||
id: 'toggle_catenary',
|
||||
saveState: true,
|
||||
state: true,
|
||||
func: state =>{
|
||||
MapData.layers.catenary = state;
|
||||
MapData.view.dirty = true;
|
||||
},
|
||||
children: [
|
||||
{
|
||||
label: 'Catenary Color Mode',
|
||||
id: 'dropdown_catenaryColor',
|
||||
saveState: true,
|
||||
options: [
|
||||
'Voltage',
|
||||
'Substation',
|
||||
'Wire Type',
|
||||
],
|
||||
state: 'Voltage',
|
||||
func: state =>{
|
||||
MapData.setCatenaryColorMode(state);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Contact Wires',
|
||||
id: 'toggle_catenaryWires',
|
||||
saveState: true,
|
||||
state: true,
|
||||
func: state =>{
|
||||
MapData.layers.catenaryWires = state;
|
||||
MapData.view.dirty = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Traction Substations',
|
||||
id: 'toggle_catenarySubstations',
|
||||
saveState: true,
|
||||
state: true,
|
||||
func: state =>{
|
||||
MapData.layers.catenarySubstations = state;
|
||||
MapData.view.dirty = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Neutral Sections (Токоразделы)',
|
||||
id: 'toggle_catenaryNeutrals',
|
||||
saveState: true,
|
||||
state: true,
|
||||
func: state =>{
|
||||
MapData.layers.catenaryNeutrals = state;
|
||||
MapData.view.dirty = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Interruption Signs',
|
||||
id: 'toggle_catenaryInterruptions',
|
||||
saveState: true,
|
||||
state: true,
|
||||
func: state =>{
|
||||
MapData.layers.catenaryInterruptions = state;
|
||||
MapData.view.dirty = true;
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Color Mode',
|
||||
id: 'dropdown_trackColor',
|
||||
@@ -602,10 +668,18 @@ function populateKey(){
|
||||
addKeyEntry('garage', 'Garage');
|
||||
addKeyEntry('demonstrator', 'Demonstrator Spawn');
|
||||
addKeyEntry('player', 'Player');
|
||||
//Add empty entries to make entries align right in the columns.
|
||||
/*for(let i=0; i<1; i++){
|
||||
addKeyEntry();
|
||||
}*/
|
||||
populateCatenaryKey();
|
||||
}
|
||||
|
||||
function populateCatenaryKey(){
|
||||
const catKey = document.getElementById('legendCatenaryKey');
|
||||
if(!catKey) return;
|
||||
catKey.innerHTML = `
|
||||
<div style="margin: 3px 0;"><span style="display:inline-block;width:1.2em;height:1.2em;background:#0077b6;border-radius:50%;text-align:center;line-height:1.2em;font-size:11px;color:#fff;border:1px solid #fff;">⚡</span> Traction Substation</div>
|
||||
<div style="margin: 3px 0;"><span style="display:inline-block;width:1.2em;height:1.2em;background:#e63946;border-radius:3px;text-align:center;line-height:1.2em;font-size:10px;color:#fff;border:1px dashed #fff;">⛔</span> Neutral Section (0V Токораздел)</div>
|
||||
<div style="margin: 3px 0;"><span style="display:inline-block;width:1.2em;height:1.2em;background:#ff9f1c;border-radius:3px;text-align:center;line-height:1.2em;font-size:11px;color:#000;border:1px solid #000;">⤓</span> Lower Pantographs Warning</div>
|
||||
`;
|
||||
MapData.updateCatenaryLegend();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user