boolean requirePower = false;
IGridNode gn = ((IActionHost) getTile()).getActionableNode();
if ( gn != null )
{
IGrid g = gn.getGrid();
if ( g != null )
{
if ( requirePower )
{
IEnergyGrid eg = g.getCache( IEnergyGrid.class );
if ( !eg.isNetworkPowered() )
{
return false;
}
}
ISecurityGrid sg = g.getCache( ISecurityGrid.class );
if ( sg.hasPermission( player, requiredPermission ) )
return true;
}
}