mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
Cleaned up ray thread code a bit, swapped light if for inline if
This commit is contained in:
@@ -156,9 +156,11 @@ function setLight( ant, cat, item, state )
|
||||
let obj = elements.antennas[ant][cat][item];
|
||||
|
||||
if ( state ) {
|
||||
if ( cat == "dirs" ) { obj.addClass( "active_arrow" ) } else { obj.addClass( "active" ) };
|
||||
// if ( cat == "dirs" ) { obj.addClass( "active_arrow" ) } else { obj.addClass( "active" ) };
|
||||
cat == "dirs" ? obj.addClass( "active_arrow" ) : obj.addClass( "active" );
|
||||
} else {
|
||||
if ( cat == "dirs" ) { obj.removeClass( "active_arrow" ) } else { obj.removeClass( "active" ) };
|
||||
// if ( cat == "dirs" ) { obj.removeClass( "active_arrow" ) } else { obj.removeClass( "active" ) };
|
||||
cat == "dirs" ? obj.removeClass( "active_arrow" ) : obj.removeClass( "active" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user