This repository was archived by the owner on Jul 6, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 132132 < div class = "{{status}}" >
133133 < h2 > { { status} } </ h2 >
134134 { { #each neighbors} }
135- { { #if name} }
136- < h3 > { { hostiles} } hostile{ { #if hostiles} } s{ { / i f } } i n { { n a m e } } < / h3 >
135+ { { #if system . name} }
136+ < h3 > { { hostiles} } hostile{ { #if hostiles} } s{ { / i f } } i n { { s y s t e m . n a m e } } < / h3 >
137137 { { / i f } }
138138 { { / e a c h } }
139139 </div >
@@ -169,15 +169,13 @@ <h3>{{hostiles}} hostile{{#if hostiles}}s{{/if}} in {{name}}</h3>
169169
170170 < script type ="text/x-handlebars-template " id ="scanTemplate ">
171171 < div class = "scan" >
172-
173172 < table class = "description" onclick = "ScanList.toggleCollapse(this);" >
174173 < tr >
175174 < td class = "reported-by" > < a href = "javascript:CCPEVE.showInfo(1377, {{reporterId}});" > { { reporter} } </ a > shared scan results</ td >
176175 < td class = "system" > < a href = "javascript:CCPEVE.showInfo(5,{{systemId}});" > { { systemName} } </ a > </ td >
177176 < td class = "reported-at" > { { time} } </ td >
178177 </ tr >
179178 </ table >
180-
181179 < div class = "results-container collapsible" >
182180 < ul class = "actions" >
183181 < li > < a class = "btn" onclick = "scanFilter(this, 'grid');" > On Grid</ a > </ li >
Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ var SystemMap = {
88
99 // let's count things
1010 hostile_count : function ( system ) {
11+ if ( system == undefined ) { return 0 ; }
1112 return ( system . name !== undefined ) ? $ . grep ( Data . hostiles , function ( h ) { return system . name === h . systemName ; } ) . length : 0
1213 } ,
1314
1415 friendly_count : function ( system ) {
16+ if ( system == undefined ) { return 0 ; }
1517 return ( system . name !== undefined ) ? $ . grep ( Data . members , function ( h ) { return system . name === h . systemName ; } ) . length : 0
1618 } ,
1719
@@ -247,12 +249,12 @@ var SystemMap = {
247249 updateHud : function ( system_name ) {
248250 var system = { name : system_name }
249251 system . neighbors = $ . map ( SystemMap . links , function ( n ) {
250- if ( n . target . name === system_name ) {
251- n . source . hostiles = SystemMap . hostile_count ( n . source ) ;
252+ if ( n . target . system && n . target . system . name === system_name ) {
253+ n . source . hostiles = SystemMap . hostile_count ( n . source . system ) ;
252254 return n . source ;
253255 }
254- if ( n . source . name === system_name ) {
255- n . target . hostiles = SystemMap . hostile_count ( n . target ) ;
256+ if ( n . source . system && n . source . system . name === system_name ) {
257+ n . target . hostiles = SystemMap . hostile_count ( n . target . system ) ;
256258 return n . target ;
257259 }
258260 } ) ;
You can’t perform that action at this time.
0 commit comments