- Improved "Drifter" wormhole support, #847
This commit is contained in:
@@ -181,6 +181,7 @@ class SystemModel extends AbstractMapTrackingModel {
|
||||
}
|
||||
|
||||
$data->locked = $this->locked;
|
||||
$data->drifter = $this->isDrifter();
|
||||
$data->rallyUpdated = strtotime($this->rallyUpdated);
|
||||
$data->rallyPoke = $this->rallyPoke;
|
||||
$data->description = $this->description ? : '';
|
||||
@@ -699,6 +700,14 @@ class SystemModel extends AbstractMapTrackingModel {
|
||||
return ($this->typeId->id === 3 && $this->security === 'A');
|
||||
}
|
||||
|
||||
/**
|
||||
* check whether this system is in drifter-space
|
||||
* @return bool
|
||||
*/
|
||||
public function isDrifter() : bool {
|
||||
return in_array($this->security, ['C14', 'C15', 'C16', 'C17', 'C18']);
|
||||
}
|
||||
|
||||
/**
|
||||
* send rally point poke to various "APIs"
|
||||
* -> send to a Slack channel
|
||||
|
||||
@@ -244,6 +244,21 @@ define([], () => {
|
||||
},
|
||||
'C12': {
|
||||
class: 'pf-system-sec-special'
|
||||
},
|
||||
'C14': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C15': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C16': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C17': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C18': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
}
|
||||
},
|
||||
// true sec
|
||||
@@ -627,6 +642,14 @@ define([], () => {
|
||||
8: 'A009 - C13'
|
||||
}
|
||||
},
|
||||
// Drifter wormholes (can only appear in k-space)
|
||||
drifterWormholes: {
|
||||
1: 'S877 - C14 Sentinel',
|
||||
2: 'B735 - C15 Barbican',
|
||||
3: 'V928 - C16 Vidette',
|
||||
4: 'C414 - C17 Conflux',
|
||||
5: 'R259 - C18 Redoubt'
|
||||
},
|
||||
// incoming wormholes
|
||||
incomingWormholes: {
|
||||
1: 'K162 - C1/2/3 (unknown)',
|
||||
|
||||
@@ -548,6 +548,7 @@ define([
|
||||
system.data('constellation', data.constellation.name);
|
||||
system.data('planets', data.planets);
|
||||
system.data('shattered', data.shattered);
|
||||
system.data('drifter', data.drifter);
|
||||
system.data('statics', data.statics);
|
||||
system.data('updated', parseInt(data.updated.updated));
|
||||
system.data('changed', false);
|
||||
@@ -3075,6 +3076,7 @@ define([
|
||||
currentUser: data.currentUser, // if user is currently in this system
|
||||
planets: data.planets,
|
||||
shattered: data.shattered ? 1 : 0,
|
||||
drifter: data.drifter ? 1 : 0,
|
||||
statics: data.statics,
|
||||
userCount: parseInt(data.userCount) || 0,
|
||||
position: MapUtil.getSystemPosition(system)
|
||||
|
||||
@@ -770,8 +770,12 @@ define([
|
||||
let headInfoLeft = [];
|
||||
let headInfoRight = [];
|
||||
|
||||
if(data.drifter){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-wave-square ' + Util.getSecurityClassForSystem(data.security) + '" title="drifter"></i>');
|
||||
}
|
||||
|
||||
if(data.shattered){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-skull ' + Util.getSecurityClassForSystem('SH') + '" title="shattered"></i>');
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-chart-pie ' + Util.getSecurityClassForSystem('SH') + '" title="shattered"></i>');
|
||||
}
|
||||
|
||||
// check systemData if headInfo element is needed
|
||||
|
||||
@@ -29,12 +29,39 @@ define([
|
||||
*/
|
||||
$.fn.showJumpInfoDialog = function(){
|
||||
requirejs(['text!templates/dialog/jump_info.html', 'mustache', 'datatables.loader'], (template, Mustache) => {
|
||||
let iconShattered = '<i class="fas fa-fw fa-chart-pie pf-system-sec-unknown"></i>';
|
||||
let iconDrifter = '<i class="fas fa-fw fa-wave-square pf-system-sec-drifter"></i>';
|
||||
|
||||
let staticsMatrixHead = [
|
||||
let formatTableBodyData = (head, matrixBody) => {
|
||||
return matrixBody.map((row, rowIndex) => {
|
||||
return row.map((label, colIndex) => {
|
||||
// get security name from "matrix Head" data if NOT first column
|
||||
let secName = colIndex ? head[0][colIndex] : label;
|
||||
return {
|
||||
label: label,
|
||||
class: Util.getSecurityClassForSystem(secName),
|
||||
hasPopover: colIndex && label.length
|
||||
};
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// Statics table first ------------------------------------------------------------------------------------
|
||||
let headGroupFirst = [
|
||||
[
|
||||
{label: '', class: 'separator-right', style: 'width: 55px;'},
|
||||
{colspan: 6, label: 'W-space', class: 'separator-right'},
|
||||
{colspan: 3, label: 'K-space', class: 'separator-right'},
|
||||
{label: 'Thera', class: 'separator-right'},
|
||||
{label: iconShattered}
|
||||
]
|
||||
];
|
||||
|
||||
let headFirst = [
|
||||
['From╲To', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'H', 'L', '0.0', 'C12', 'C13']
|
||||
];
|
||||
|
||||
let staticsMatrixBody = [
|
||||
let matrixBodyFirst = [
|
||||
['C1', 'H121', 'C125', 'O883', 'M609', 'L614', 'S804', 'N110', 'J244', 'Z060', 'F353', ''],
|
||||
['C2', 'Z647', 'D382', 'O477', 'Y683', 'N062', 'R474', 'B274', 'A239', 'E545', 'F135', ''],
|
||||
['C3', 'V301', 'I182', 'N968', 'T405', 'N770', 'A982', 'D845', 'U210', 'K346', 'F135', ''],
|
||||
@@ -48,22 +75,48 @@ define([
|
||||
['?', 'E004', 'L005', 'Z006', 'M001', 'C008', 'G008', '' , '' , 'Q003', '' , 'A009']
|
||||
];
|
||||
|
||||
|
||||
let staticsTableDataFirst = {
|
||||
headGroup: headGroupFirst,
|
||||
head: headFirst,
|
||||
body: formatTableBodyData(headFirst, matrixBodyFirst)
|
||||
};
|
||||
|
||||
// Statics table second -----------------------------------------------------------------------------------
|
||||
|
||||
let headGroupSecond = [
|
||||
[
|
||||
{label: '', class: 'separator-right', style: 'width: 55px;'},
|
||||
{label: iconDrifter + ' ' + 'Sentinel', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Barbican', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Vidette', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Conflux', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Redoubt'}
|
||||
]
|
||||
];
|
||||
|
||||
let headSecond = [
|
||||
['From╲To', 'C14', 'C15', 'C16', 'C17', 'C18']
|
||||
];
|
||||
|
||||
let matrixBodySecond = [
|
||||
['?', 'S877', 'B735', 'V928', 'C414', 'R259']
|
||||
];
|
||||
|
||||
let staticsTableDataSecond = {
|
||||
headline: 'Drifter W-space',
|
||||
headGroup: headGroupSecond,
|
||||
head: headSecond,
|
||||
body: formatTableBodyData(headSecond, matrixBodySecond)
|
||||
};
|
||||
|
||||
let staticsTablesData = [staticsTableDataFirst, staticsTableDataSecond];
|
||||
|
||||
let data = {
|
||||
config: config,
|
||||
popoverTriggerClass: Util.config.popoverTriggerClass,
|
||||
wormholes: Object.keys(Init.wormholes).map(function(k){ return Init.wormholes[k]; }), // convert Json to array
|
||||
staticsMatrixHead: staticsMatrixHead,
|
||||
staticsMatrixBody: staticsMatrixBody.map((row, rowIndex) => {
|
||||
return row.map((label, colIndex) => {
|
||||
// get security name from "matrix Head" data if NOT first column
|
||||
let secName = colIndex ? staticsMatrixHead[0][colIndex] : label;
|
||||
return {
|
||||
label: label,
|
||||
class: Util.getSecurityClassForSystem(secName),
|
||||
hasPopover: colIndex && label.length
|
||||
};
|
||||
});
|
||||
}),
|
||||
staticsTablesData: staticsTablesData,
|
||||
massValue: function(){
|
||||
return function(value, render){
|
||||
let mass = render(value);
|
||||
|
||||
@@ -273,7 +273,7 @@ define([
|
||||
}
|
||||
},{
|
||||
name: 'shattered',
|
||||
title: '<i class="fas fa-skull" title="shattered" data-toggle="tooltip"></i>',
|
||||
title: '<i class="fas fa-chart-pie" title="shattered" data-toggle="tooltip"></i>',
|
||||
width: 10,
|
||||
className: ['text-center', 'min-screen-l'].join(' '),
|
||||
searchable: false,
|
||||
@@ -282,7 +282,7 @@ define([
|
||||
display: (cellData, type, rowData, meta) => {
|
||||
let value = '';
|
||||
if(cellData){
|
||||
value = '<i class="fas fa-skull fa-fw ' + Util.getSecurityClassForSystem('SH') + '"></i>';
|
||||
value = '<i class="fas fa-chart-pie fa-fw ' + Util.getSecurityClassForSystem('SH') + '"></i>';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -86,10 +86,19 @@ define([
|
||||
if(parts.length === 2){
|
||||
// wormhole data -> 2 columns
|
||||
let securityClass = Util.getSecurityClassForSystem(getSystemSecurityFromLabel(parts[1]));
|
||||
// some labels have a "suffix" label that should not have the securityClass
|
||||
let labelParts = parts[1].split(/\s(.+)/);
|
||||
let label = labelParts[0];
|
||||
let suffix = labelParts[1] ? labelParts[1] : '';
|
||||
|
||||
let classes = [securityClass, Util.config.popoverTriggerClass, Util.config.helpDefaultClass];
|
||||
|
||||
markup += '<span>' + parts[0] + '</span> ';
|
||||
markup += '<i class="fas fa-long-arrow-alt-right txt-color txt-color-grayLight"></i>';
|
||||
markup += '<span class="' + securityClass + ' ' + Util.config.popoverTriggerClass + ' ' + Util.config.helpDefaultClass +
|
||||
'" data-name="' + parts[0] + '"> ' + parts[1] + ' </span>';
|
||||
markup += '<span class="' + classes.join(' ') + '" data-name="' + parts[0] + '"> ' + label + '</span>';
|
||||
if(suffix.length){
|
||||
markup += ' <span>' + suffix + '</span>';
|
||||
}
|
||||
}else{
|
||||
markup += '<span>' + state.text + '</span>';
|
||||
}
|
||||
@@ -122,9 +131,16 @@ define([
|
||||
|
||||
switch(formatType){
|
||||
case 'wormhole':
|
||||
// some labels have a "suffix" label that should not have the securityClass
|
||||
let labelParts = parts[1].split(/\s(.+)/);
|
||||
let label = labelParts[0];
|
||||
let suffix = labelParts[1] ? labelParts[1] : '';
|
||||
|
||||
|
||||
markup += '<div class="col-xs-3">' + parts[0] + '</div>';
|
||||
markup += '<div class="col-xs-2 text-center"><i class="fas fa-long-arrow-alt-right"></i></div>';
|
||||
markup += '<div class="col-xs-7 ' + securityClass + '">' + parts[1] + '</div>';
|
||||
markup += '<div class="col-xs-3 ' + securityClass + '">' + label + '</div>';
|
||||
markup += '<div class="col-xs-4 text-right">' + suffix + '</div>';
|
||||
break;
|
||||
case 'system':
|
||||
markup += '<div class="col-xs-10">' + parts[0] + '</div>';
|
||||
@@ -333,7 +349,7 @@ define([
|
||||
markup += '</div>';
|
||||
markup += '<div class="col-sm-2 text-right ' + data.secClass + '">' + data.security + '</div>';
|
||||
markup += '<div class="col-sm-2 text-right ' + shatteredClass + '">';
|
||||
markup += '<i class="fas fa-fw fa-skull ' + hideShatteredClass + '"></i>';
|
||||
markup += '<i class="fas fa-fw fa-chart-pie ' + hideShatteredClass + '"></i>';
|
||||
markup += '</div>';
|
||||
markup += '<div class="col-sm-2 text-right ' + data.trueSecClass + '">' + data.trueSec + '</div></div>';
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ define([
|
||||
systemStatusId: systemData.status.id,
|
||||
systemStatusClass: Util.getStatusInfoForSystem(systemData.status.id, 'class'),
|
||||
systemStatusLabel: Util.getStatusInfoForSystem(systemData.status.id, 'label'),
|
||||
securityClass: Util.getSecurityClassForSystem( systemData.security ),
|
||||
securityClass: Util.getSecurityClassForSystem(systemData.security),
|
||||
trueSec: systemData.trueSec.toFixed(1),
|
||||
trueSecClass: Util.getTrueSecClassForSystem( systemData.trueSec ),
|
||||
effectName: effectName,
|
||||
|
||||
@@ -311,7 +311,25 @@ define([
|
||||
newSelectOptions.push({ text: 'Frigate', children: frigateWHData});
|
||||
}
|
||||
|
||||
// add possible incoming holes
|
||||
// add potential drifter holes (k-space only)
|
||||
if([30, 31, 32].includes(areaId)){
|
||||
let drifterWHData = [];
|
||||
for(let drifterKey in Init.drifterWormholes){
|
||||
if(
|
||||
drifterKey > 0 &&
|
||||
Init.drifterWormholes.hasOwnProperty(drifterKey)
|
||||
){
|
||||
newSelectOptionsCount++;
|
||||
drifterWHData.push( {value: newSelectOptionsCount, text: Init.drifterWormholes[drifterKey]} );
|
||||
}
|
||||
}
|
||||
|
||||
if(drifterWHData.length > 0){
|
||||
newSelectOptions.push({ text: 'Drifter', children: drifterWHData});
|
||||
}
|
||||
}
|
||||
|
||||
// add potential incoming holes
|
||||
let incomingWHData = [];
|
||||
for(let incomingKey in Init.incomingWormholes){
|
||||
if(
|
||||
@@ -337,7 +355,7 @@ define([
|
||||
}
|
||||
|
||||
// static wormholes (DO NOT CACHE) (not all C2 WHs have the same statics,...
|
||||
if( groupId === 5 ){
|
||||
if(groupId === 5){
|
||||
// add static WH(s) for this system
|
||||
if(systemData.statics){
|
||||
let staticWHData = [];
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -244,6 +244,21 @@ define([], () => {
|
||||
},
|
||||
'C12': {
|
||||
class: 'pf-system-sec-special'
|
||||
},
|
||||
'C14': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C15': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C16': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C17': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
},
|
||||
'C18': {
|
||||
class: 'pf-system-sec-drifter'
|
||||
}
|
||||
},
|
||||
// true sec
|
||||
@@ -627,6 +642,14 @@ define([], () => {
|
||||
8: 'A009 - C13'
|
||||
}
|
||||
},
|
||||
// Drifter wormholes (can only appear in k-space)
|
||||
drifterWormholes: {
|
||||
1: 'S877 - C14 Sentinel',
|
||||
2: 'B735 - C15 Barbican',
|
||||
3: 'V928 - C16 Vidette',
|
||||
4: 'C414 - C17 Conflux',
|
||||
5: 'R259 - C18 Redoubt'
|
||||
},
|
||||
// incoming wormholes
|
||||
incomingWormholes: {
|
||||
1: 'K162 - C1/2/3 (unknown)',
|
||||
|
||||
@@ -548,6 +548,7 @@ define([
|
||||
system.data('constellation', data.constellation.name);
|
||||
system.data('planets', data.planets);
|
||||
system.data('shattered', data.shattered);
|
||||
system.data('drifter', data.drifter);
|
||||
system.data('statics', data.statics);
|
||||
system.data('updated', parseInt(data.updated.updated));
|
||||
system.data('changed', false);
|
||||
@@ -3075,6 +3076,7 @@ define([
|
||||
currentUser: data.currentUser, // if user is currently in this system
|
||||
planets: data.planets,
|
||||
shattered: data.shattered ? 1 : 0,
|
||||
drifter: data.drifter ? 1 : 0,
|
||||
statics: data.statics,
|
||||
userCount: parseInt(data.userCount) || 0,
|
||||
position: MapUtil.getSystemPosition(system)
|
||||
|
||||
@@ -770,8 +770,12 @@ define([
|
||||
let headInfoLeft = [];
|
||||
let headInfoRight = [];
|
||||
|
||||
if(data.drifter){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-wave-square ' + Util.getSecurityClassForSystem(data.security) + '" title="drifter"></i>');
|
||||
}
|
||||
|
||||
if(data.shattered){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-skull ' + Util.getSecurityClassForSystem('SH') + '" title="shattered"></i>');
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-chart-pie ' + Util.getSecurityClassForSystem('SH') + '" title="shattered"></i>');
|
||||
}
|
||||
|
||||
// check systemData if headInfo element is needed
|
||||
|
||||
@@ -29,12 +29,39 @@ define([
|
||||
*/
|
||||
$.fn.showJumpInfoDialog = function(){
|
||||
requirejs(['text!templates/dialog/jump_info.html', 'mustache', 'datatables.loader'], (template, Mustache) => {
|
||||
let iconShattered = '<i class="fas fa-fw fa-chart-pie pf-system-sec-unknown"></i>';
|
||||
let iconDrifter = '<i class="fas fa-fw fa-wave-square pf-system-sec-drifter"></i>';
|
||||
|
||||
let staticsMatrixHead = [
|
||||
let formatTableBodyData = (head, matrixBody) => {
|
||||
return matrixBody.map((row, rowIndex) => {
|
||||
return row.map((label, colIndex) => {
|
||||
// get security name from "matrix Head" data if NOT first column
|
||||
let secName = colIndex ? head[0][colIndex] : label;
|
||||
return {
|
||||
label: label,
|
||||
class: Util.getSecurityClassForSystem(secName),
|
||||
hasPopover: colIndex && label.length
|
||||
};
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// Statics table first ------------------------------------------------------------------------------------
|
||||
let headGroupFirst = [
|
||||
[
|
||||
{label: '', class: 'separator-right', style: 'width: 55px;'},
|
||||
{colspan: 6, label: 'W-space', class: 'separator-right'},
|
||||
{colspan: 3, label: 'K-space', class: 'separator-right'},
|
||||
{label: 'Thera', class: 'separator-right'},
|
||||
{label: iconShattered}
|
||||
]
|
||||
];
|
||||
|
||||
let headFirst = [
|
||||
['From╲To', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'H', 'L', '0.0', 'C12', 'C13']
|
||||
];
|
||||
|
||||
let staticsMatrixBody = [
|
||||
let matrixBodyFirst = [
|
||||
['C1', 'H121', 'C125', 'O883', 'M609', 'L614', 'S804', 'N110', 'J244', 'Z060', 'F353', ''],
|
||||
['C2', 'Z647', 'D382', 'O477', 'Y683', 'N062', 'R474', 'B274', 'A239', 'E545', 'F135', ''],
|
||||
['C3', 'V301', 'I182', 'N968', 'T405', 'N770', 'A982', 'D845', 'U210', 'K346', 'F135', ''],
|
||||
@@ -48,22 +75,48 @@ define([
|
||||
['?', 'E004', 'L005', 'Z006', 'M001', 'C008', 'G008', '' , '' , 'Q003', '' , 'A009']
|
||||
];
|
||||
|
||||
|
||||
let staticsTableDataFirst = {
|
||||
headGroup: headGroupFirst,
|
||||
head: headFirst,
|
||||
body: formatTableBodyData(headFirst, matrixBodyFirst)
|
||||
};
|
||||
|
||||
// Statics table second -----------------------------------------------------------------------------------
|
||||
|
||||
let headGroupSecond = [
|
||||
[
|
||||
{label: '', class: 'separator-right', style: 'width: 55px;'},
|
||||
{label: iconDrifter + ' ' + 'Sentinel', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Barbican', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Vidette', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Conflux', class: 'separator-right'},
|
||||
{label: iconDrifter + ' ' + 'Redoubt'}
|
||||
]
|
||||
];
|
||||
|
||||
let headSecond = [
|
||||
['From╲To', 'C14', 'C15', 'C16', 'C17', 'C18']
|
||||
];
|
||||
|
||||
let matrixBodySecond = [
|
||||
['?', 'S877', 'B735', 'V928', 'C414', 'R259']
|
||||
];
|
||||
|
||||
let staticsTableDataSecond = {
|
||||
headline: 'Drifter W-space',
|
||||
headGroup: headGroupSecond,
|
||||
head: headSecond,
|
||||
body: formatTableBodyData(headSecond, matrixBodySecond)
|
||||
};
|
||||
|
||||
let staticsTablesData = [staticsTableDataFirst, staticsTableDataSecond];
|
||||
|
||||
let data = {
|
||||
config: config,
|
||||
popoverTriggerClass: Util.config.popoverTriggerClass,
|
||||
wormholes: Object.keys(Init.wormholes).map(function(k){ return Init.wormholes[k]; }), // convert Json to array
|
||||
staticsMatrixHead: staticsMatrixHead,
|
||||
staticsMatrixBody: staticsMatrixBody.map((row, rowIndex) => {
|
||||
return row.map((label, colIndex) => {
|
||||
// get security name from "matrix Head" data if NOT first column
|
||||
let secName = colIndex ? staticsMatrixHead[0][colIndex] : label;
|
||||
return {
|
||||
label: label,
|
||||
class: Util.getSecurityClassForSystem(secName),
|
||||
hasPopover: colIndex && label.length
|
||||
};
|
||||
});
|
||||
}),
|
||||
staticsTablesData: staticsTablesData,
|
||||
massValue: function(){
|
||||
return function(value, render){
|
||||
let mass = render(value);
|
||||
|
||||
@@ -273,7 +273,7 @@ define([
|
||||
}
|
||||
},{
|
||||
name: 'shattered',
|
||||
title: '<i class="fas fa-skull" title="shattered" data-toggle="tooltip"></i>',
|
||||
title: '<i class="fas fa-chart-pie" title="shattered" data-toggle="tooltip"></i>',
|
||||
width: 10,
|
||||
className: ['text-center', 'min-screen-l'].join(' '),
|
||||
searchable: false,
|
||||
@@ -282,7 +282,7 @@ define([
|
||||
display: (cellData, type, rowData, meta) => {
|
||||
let value = '';
|
||||
if(cellData){
|
||||
value = '<i class="fas fa-skull fa-fw ' + Util.getSecurityClassForSystem('SH') + '"></i>';
|
||||
value = '<i class="fas fa-chart-pie fa-fw ' + Util.getSecurityClassForSystem('SH') + '"></i>';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -86,10 +86,19 @@ define([
|
||||
if(parts.length === 2){
|
||||
// wormhole data -> 2 columns
|
||||
let securityClass = Util.getSecurityClassForSystem(getSystemSecurityFromLabel(parts[1]));
|
||||
// some labels have a "suffix" label that should not have the securityClass
|
||||
let labelParts = parts[1].split(/\s(.+)/);
|
||||
let label = labelParts[0];
|
||||
let suffix = labelParts[1] ? labelParts[1] : '';
|
||||
|
||||
let classes = [securityClass, Util.config.popoverTriggerClass, Util.config.helpDefaultClass];
|
||||
|
||||
markup += '<span>' + parts[0] + '</span> ';
|
||||
markup += '<i class="fas fa-long-arrow-alt-right txt-color txt-color-grayLight"></i>';
|
||||
markup += '<span class="' + securityClass + ' ' + Util.config.popoverTriggerClass + ' ' + Util.config.helpDefaultClass +
|
||||
'" data-name="' + parts[0] + '"> ' + parts[1] + ' </span>';
|
||||
markup += '<span class="' + classes.join(' ') + '" data-name="' + parts[0] + '"> ' + label + '</span>';
|
||||
if(suffix.length){
|
||||
markup += ' <span>' + suffix + '</span>';
|
||||
}
|
||||
}else{
|
||||
markup += '<span>' + state.text + '</span>';
|
||||
}
|
||||
@@ -122,9 +131,16 @@ define([
|
||||
|
||||
switch(formatType){
|
||||
case 'wormhole':
|
||||
// some labels have a "suffix" label that should not have the securityClass
|
||||
let labelParts = parts[1].split(/\s(.+)/);
|
||||
let label = labelParts[0];
|
||||
let suffix = labelParts[1] ? labelParts[1] : '';
|
||||
|
||||
|
||||
markup += '<div class="col-xs-3">' + parts[0] + '</div>';
|
||||
markup += '<div class="col-xs-2 text-center"><i class="fas fa-long-arrow-alt-right"></i></div>';
|
||||
markup += '<div class="col-xs-7 ' + securityClass + '">' + parts[1] + '</div>';
|
||||
markup += '<div class="col-xs-3 ' + securityClass + '">' + label + '</div>';
|
||||
markup += '<div class="col-xs-4 text-right">' + suffix + '</div>';
|
||||
break;
|
||||
case 'system':
|
||||
markup += '<div class="col-xs-10">' + parts[0] + '</div>';
|
||||
@@ -333,7 +349,7 @@ define([
|
||||
markup += '</div>';
|
||||
markup += '<div class="col-sm-2 text-right ' + data.secClass + '">' + data.security + '</div>';
|
||||
markup += '<div class="col-sm-2 text-right ' + shatteredClass + '">';
|
||||
markup += '<i class="fas fa-fw fa-skull ' + hideShatteredClass + '"></i>';
|
||||
markup += '<i class="fas fa-fw fa-chart-pie ' + hideShatteredClass + '"></i>';
|
||||
markup += '</div>';
|
||||
markup += '<div class="col-sm-2 text-right ' + data.trueSecClass + '">' + data.trueSec + '</div></div>';
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ define([
|
||||
systemStatusId: systemData.status.id,
|
||||
systemStatusClass: Util.getStatusInfoForSystem(systemData.status.id, 'class'),
|
||||
systemStatusLabel: Util.getStatusInfoForSystem(systemData.status.id, 'label'),
|
||||
securityClass: Util.getSecurityClassForSystem( systemData.security ),
|
||||
securityClass: Util.getSecurityClassForSystem(systemData.security),
|
||||
trueSec: systemData.trueSec.toFixed(1),
|
||||
trueSecClass: Util.getTrueSecClassForSystem( systemData.trueSec ),
|
||||
effectName: effectName,
|
||||
|
||||
@@ -311,7 +311,25 @@ define([
|
||||
newSelectOptions.push({ text: 'Frigate', children: frigateWHData});
|
||||
}
|
||||
|
||||
// add possible incoming holes
|
||||
// add potential drifter holes (k-space only)
|
||||
if([30, 31, 32].includes(areaId)){
|
||||
let drifterWHData = [];
|
||||
for(let drifterKey in Init.drifterWormholes){
|
||||
if(
|
||||
drifterKey > 0 &&
|
||||
Init.drifterWormholes.hasOwnProperty(drifterKey)
|
||||
){
|
||||
newSelectOptionsCount++;
|
||||
drifterWHData.push( {value: newSelectOptionsCount, text: Init.drifterWormholes[drifterKey]} );
|
||||
}
|
||||
}
|
||||
|
||||
if(drifterWHData.length > 0){
|
||||
newSelectOptions.push({ text: 'Drifter', children: drifterWHData});
|
||||
}
|
||||
}
|
||||
|
||||
// add potential incoming holes
|
||||
let incomingWHData = [];
|
||||
for(let incomingKey in Init.incomingWormholes){
|
||||
if(
|
||||
@@ -337,7 +355,7 @@ define([
|
||||
}
|
||||
|
||||
// static wormholes (DO NOT CACHE) (not all C2 WHs have the same statics,...
|
||||
if( groupId === 5 ){
|
||||
if(groupId === 5){
|
||||
// add static WH(s) for this system
|
||||
if(systemData.statics){
|
||||
let staticWHData = [];
|
||||
|
||||
@@ -56,33 +56,46 @@
|
||||
|
||||
{{! "Statics" tab ---------------------------------------------------------------------------------------------- }}
|
||||
<div role="tabpanel" class="tab-pane fade" id="{{config.wormholeInfoDialogStaticId}}">
|
||||
{{#staticsTablesData}}
|
||||
|
||||
{{#headline}}
|
||||
<h4>{{.}}</h4>
|
||||
{{/headline}}
|
||||
|
||||
<div class="pf-dynamic-area">
|
||||
<table class="compact stripe order-column row-border {{config.wormholeInfoStaticTableClass}}">
|
||||
<thead>
|
||||
{{#staticsMatrixHead}}
|
||||
{{#headGroup}}
|
||||
<tr>
|
||||
{{#.}}
|
||||
<th class="text-center {{#securityClass}}{{.}}{{/securityClass}}">{{.}}</th>
|
||||
<th class="text-center {{#class}}{{.}}{{/class}}" {{#colspan}}colspan="{{.}}"{{/colspan}} {{#style}}style="{{.}}"{{/style}}>{{{label}}}</th>
|
||||
{{/.}}
|
||||
</tr>
|
||||
{{/staticsMatrixHead}}
|
||||
{{/headGroup}}
|
||||
{{#head}}
|
||||
<tr>
|
||||
{{#.}}
|
||||
<th class="text-center {{#securityClass}}{{.}}{{/securityClass}}">{{{.}}}</th>
|
||||
{{/.}}
|
||||
</tr>
|
||||
{{/head}}
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#staticsMatrixBody}}
|
||||
{{#body}}
|
||||
<tr>
|
||||
{{#.}}
|
||||
<td class="text-center">
|
||||
{{#label}}
|
||||
<div class="{{class}} {{#hasPopover}}pf-help-default {{popoverTriggerClass}}{{/hasPopover}}" data-name="{{.}}">{{.}}</div>
|
||||
|
||||
{{/label}}
|
||||
</td>
|
||||
{{/.}}
|
||||
</tr>
|
||||
{{/staticsMatrixBody}}
|
||||
{{/body}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{/staticsTablesData}}
|
||||
</div>
|
||||
|
||||
{{! "Jump distance" tab ---------------------------------------------------------------------------------------- }}
|
||||
|
||||
@@ -171,12 +171,12 @@
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<table class="table table-condensed" style="font-size: 12px">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="col-sm-2 text-center">k-space</td>
|
||||
<td></td>
|
||||
<td class="col-sm-2 text-center"></td>
|
||||
<td>K-space</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -204,12 +204,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<table class="table table-condensed" style="font-size: 12px">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="col-sm-2 text-center">w-space</td>
|
||||
<td></td>
|
||||
<td class="col-sm-3 text-center"></td>
|
||||
<td>W-space</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -231,12 +231,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<table class="table table-condensed" style="font-size: 12px">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="col-sm-2 text-center">w-space</td>
|
||||
<td></td>
|
||||
<td class="col-sm-3 text-center"></td>
|
||||
<td>W-space</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -247,10 +247,27 @@
|
||||
<td class="text-right"><samp class="pf-system-security-0-0">-1.0</samp></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center pf-system-sec-unknown">SH</td>
|
||||
<td>Shattered wormhole</td>
|
||||
<td class="text-center pf-system-sec-unknown">C13</td>
|
||||
<td>Shattered wormhole <i class="fas fa-fw fa-chart-pie pf-system-sec-unknown"></i></td>
|
||||
<td class="text-right"><samp class="pf-system-security-0-0">-1.0</samp></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center pf-system-sec-drifter">C14 - C18</td>
|
||||
<td>Drifter wormhole <i class="fas fa-fw fa-wave-square pf-system-sec-drifter"></i></td>
|
||||
<td class="text-right"><samp class="pf-system-security-0-0">-1.0</samp></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-3">
|
||||
<table class="table table-condensed" style="font-size: 12px">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="col-sm-2 text-center"></td>
|
||||
<td>A-space</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center pf-system-sec-abyssal">A</td>
|
||||
<td>Abyss system</td>
|
||||
|
||||
@@ -34,10 +34,13 @@
|
||||
<table class="table table-condensed pf-table-fixed {{infoTableClass}}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th class="pf-table-cell-50">Name</th>
|
||||
<th class="text-right pf-table-cell-ellipses-auto pf-system-info-name-cell">
|
||||
{{#system.drifter}}
|
||||
<i class="fas fa-fw fa-wave-square {{securityClass}}" data-toggle="tooltip" title="drifter"></i>
|
||||
{{/system.drifter}}
|
||||
{{#system.shattered}}
|
||||
<i class="fas fa-fw fa-skull {{shatteredClass}}" data-toggle="tooltip" title="shattered"></i>
|
||||
<i class="fas fa-fw fa-chart-pie {{shatteredClass}}" data-toggle="tooltip" title="shattered"></i>
|
||||
{{/system.shattered}}
|
||||
<span class="pf-help-default {{nameInfoClass}} {{#systemNameClass}}{{system.security}}{{/systemNameClass}}">{{system.name}}</span>
|
||||
</th>
|
||||
|
||||
@@ -62,6 +62,10 @@ $pink-darker: #782d77;
|
||||
// purple
|
||||
$purple-dark: #3e264e;
|
||||
|
||||
// aqua
|
||||
$aqua-light: #44be99;
|
||||
$aqua: #44aa82;
|
||||
|
||||
// ranking
|
||||
$gold: #cfb53b;
|
||||
$silver: #c0c0c0;
|
||||
|
||||
@@ -269,6 +269,14 @@ select:active, select:hover {
|
||||
// smaller and less padding
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
|
||||
&:first-child{
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&:last-child{
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.clearfix.pf-result-image [class*="col-"]{
|
||||
@@ -623,6 +631,10 @@ table{
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
&.pf-table-cell-50{
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
&.pf-table-cell-100{
|
||||
max-width: 100px;
|
||||
}
|
||||
@@ -1181,6 +1193,10 @@ table{
|
||||
color: $yellow-dark;
|
||||
}
|
||||
|
||||
.pf-system-sec-drifter{
|
||||
color: $aqua;
|
||||
}
|
||||
|
||||
// system status ==================================================================================
|
||||
|
||||
.pf-system-status-friendly{
|
||||
|
||||
Reference in New Issue
Block a user