#NEWLINE# def augment_map( self , solar_map ) : #NEWLINE# #INDENT# connections = 0 #NEWLINE# chain = self . get_chain ( ) #NEWLINE# if chain : #NEWLINE# #INDENT# for sig in chain [ 'chain' ] [ 'map' ] : #NEWLINE# #INDENT# if ( sig [ 'type' ] != 'GATE' ) : #NEWLINE# #INDENT# connections += 1 #NEWLINE# source = convert_to_int ( sig [ 'systemID' ] ) #NEWLINE# dest = convert_to_int ( sig [ 'connectionID' ] ) #NEWLINE# sig_source = sig [ 'signatureID' ] #NEWLINE# sig_dest = sig [ 'sig2ID' ] #NEWLINE# code_source = sig [ 'type' ] #NEWLINE# code_dest = sig [ 'sig2Type' ] #NEWLINE# if ( sig [ 'life' ] == 'Stable' ) : #NEWLINE# #INDENT# wh_life = 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# wh_life = 0 #NEWLINE# #UNINDENT# if ( sig [ 'mass' ] == 'Stable' ) : #NEWLINE# #INDENT# wh_mass = 2 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( sig [ 'mass' ] == 'Destab' ) : #NEWLINE# #INDENT# wh_mass = 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# wh_mass = 0 #NEWLINE# #UNINDENT# #UNINDENT# last_modified = datetime . strptime ( sig [ 'time' ] , '%Y-%m-%d %H:%M:%S' ) #NEWLINE# delta = ( datetime . utcnow ( ) - last_modified ) #NEWLINE# time_elapsed = round ( ( delta . total_seconds ( ) / 3600.0 ) , 1 ) #NEWLINE# if ( ( source != 0 ) and ( dest != 0 ) ) : #NEWLINE# #INDENT# size_result1 = self . eve_db . get_whsize_by_code ( code_source ) #NEWLINE# size_result2 = self . eve_db . get_whsize_by_code ( code_dest ) #NEWLINE# if ( size_result1 in [ 0 , 1 , 2 , 3 ] ) : #NEWLINE# #INDENT# wh_size = size_result1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( size_result2 in [ 0 , 1 , 2 , 3 ] ) : #NEWLINE# #INDENT# wh_size = size_result2 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# wh_size = self . eve_db . get_whsize_by_system ( source , dest ) #NEWLINE# #UNINDENT# #UNINDENT# solar_map . add_connection ( source , dest , SolarMap . WORMHOLE , [ sig_source , code_source , sig_dest , code_dest , wh_size , wh_life , wh_mass , time_elapsed ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return connections