close #72 support for "shattered systems" added

This commit is contained in:
Exodus4D
2015-11-17 23:40:37 +01:00
parent 456bdf3f3e
commit f11d7a2ac7
9 changed files with 92 additions and 5 deletions

View File

@@ -68,6 +68,7 @@ class CcpSystemsMapper extends \RecursiveArrayIterator {
$iterator['security'] == 8 ||
$iterator['security'] == 9
){
// k-space system
$trueSec = round($iterator['trueSec'], 3);
if($trueSec <= 0){
@@ -82,8 +83,21 @@ class CcpSystemsMapper extends \RecursiveArrayIterator {
$security = 'H';
}
}
}else{
}elseif(
$iterator['security'] == 1 ||
$iterator['security'] == 2 ||
$iterator['security'] == 3 ||
$iterator['security'] == 4 ||
$iterator['security'] == 5 ||
$iterator['security'] == 6
){
// standard wormhole system
$security = 'C' . $iterator['security'];
}elseif(
$iterator['security'] == 13
){
// shattered wormhole system
$security = 'SH';
}
return $security;

View File

@@ -254,6 +254,42 @@ define([], function() {
7: { // Ghost
1: 'Superior Blood Raider Covert Research Facility' //*
}
},
13: { // Shattered Wormholes
5: { // Wormhole (some of them are static)
1: 'P060 - C1',
2: 'Z647 - C1',
3: 'D382 - C2',
4: 'L005 - C2',
5: 'N766 - C2',
6: 'C247 - C3',
7: 'K346 - C3',
8: 'M267 - C3',
9: 'O477 - C3',
10: 'X877 - C4',
11: 'Y683 - C4',
12: 'H296 - C5',
13: 'H900 - C5',
14: 'H296 - C5',
15: 'N062 - C5',
16: 'V911 - C5',
17: 'U574 - C6',
18: 'V753 - C6',
19: 'W237 - C6',
20: 'B274 - HS',
21: 'D792 - HS',
22: 'D845 - HS',
23: 'N110 - HS',
24: 'A239 - LS',
25: 'C391 - LS',
26: 'J244 - LS',
27: 'U201 - LS',
28: 'U210 - LS',
29: 'C248 - NS',
30: 'E545 - NS',
31: 'K346 - NS',
32: 'Z060 - NS'
}
}
}, // system type (k-space)
2: {

View File

@@ -147,6 +147,9 @@ define(['jquery'], function($) {
security: {
class: 'pf-system-sec'
},
'SH': {
class: 'pf-system-sec-unknown'
},
'H': {
class: 'pf-system-sec-highSec'
},
@@ -352,6 +355,16 @@ define(['jquery'], function($) {
1: 'E004 - C1',
2: 'Z006 - C3',
5: 'Q003 - 0.0'
},
13: { // Shattered Wormholes (some of them are static)
1: 'E004 - C1',
2: 'L005 - C2',
3: 'Z006 - C3',
4: 'M001 - C4',
5: 'C008 - C5',
6: 'G008 - C6',
7: 'Q003 - C7'
}
},
// incoming wormholes

View File

@@ -194,12 +194,20 @@ define([
parentElement.prepend(moduleElement);
// shattered wormhole info data
var shatteredWormholeInfo = false;
// add security class for statics
if(systemData.statics){
if(
systemData.statics &&
systemData.statics.length > 0
){
for(var i = 0; i < systemData.statics.length; i++){
systemData.statics[i].class = Util.getSecurityClassForSystem( systemData.statics[i].security );
}
}else if(systemData.type.id === 1){
// system type "wormhole" but no statics => "shattered wormhole"
shatteredWormholeInfo = true;
}
var effectName = Util.getEffectInfoForSystem(systemData.effect, 'name');
@@ -414,6 +422,8 @@ define([
descriptionTextareaClass: config.descriptionTextareaElementClass,
descriptionTooltipClass: config.descriptionTextareaTooltipClass,
shatteredWormholeInfo: shatteredWormholeInfo,
ajaxConstellationInfoUrl: Init.path.getConstellationData,
systemConstellationLinkClass: config.constellationLinkClass,

View File

@@ -7,9 +7,8 @@ define([
'app/init',
'app/util',
'app/render',
'config/signature_type',
'bootbox'
], function($, Init, Util, Render, SignatureType, bootbox) {
], function($, Init, Util, Render, bootbox) {
'use strict';
var config = {

View File

@@ -1366,6 +1366,9 @@ define([
case '0.0':
areaId = 12;
break;
case 'SH':
areaId = 13;
break;
default:
// w-space
for(var i = 1; i <= 6; i++){

File diff suppressed because one or more lines are too long

View File

@@ -95,6 +95,14 @@
<td class="text-right {{class}}">{{security}}</td>
</tr>
{{/system.statics}}
{{#shatteredWormholeInfo}}
<tr>
<td class="text-right pf-help"></td>
<td>Shattered System</td>
<td class="text-right pf-font-capitalize {{securityClass}}">Unknown statics</td>
<td class="text-right"></td>
</tr>
{{/shatteredWormholeInfo}}
</tbody>
</table>
</div>

View File

@@ -559,6 +559,10 @@ select:active, select:hover {
color: $blue;
}
.pf-system-sec-unknown{
color: $indigo;
}
// system status ======================================================
.pf-system-status-friendly{